← Lab
lodabin
confirmedupstream bugPython · pyodSystems & data structuresJuly 25, 2026
the question
Does pyod's LODA score each point using the histogram bin it actually falls into?
what came out
pyod's LODA looks up bins with searchsorted(limits[:n_bins-1], v, 'left'), searching the left edges rather than the interior edges, so every interior point is scored with the bin to its right. Recomputing with the correct lookup lifts AUC from 0.964 to 1.0 and is strictly better on 15/15 seeds.
method & receipts
- Result: confirmed
- Reproducible — one script re-runs the whole thing from scratch.
- Tested — a correctness/benchmark suite ships alongside the code.
→ read the code and re-run it
github.com/v-code01/lodabin