#476·pyod

Error in hbos with auto for n_bins

Author: markfried96Created Jan 30, 2023Updated Sep 21, 2026

I'm trying to use the hbos algorithm with the auto parameter for n_bins. PyOD creates the model without any problems. But when I'm trying to call the decision_function on the trained model with a new data point, I get the following error:

"attempt to get argmax of an empty sequence"

This happens in the following function: _calculate_outlier_scores_auto -> get_optimal_n_bins(X[:, i]) -> np.argmax(maximum_likelihood) ->attempt to get argmax of an empty sequence

Does anyone have a quick solution? Am I doing something wrong?