EasyDeepLearn

Local Outlier Factor (LOF) — how does it work?

medium

Answer

  • For each point, compare its local density (via k-NN distances) to that of its neighbors.
  • LOF > 1: point is in a lower-density region than its neighbors → outlier.
  • Handles clusters of varying density — a big advantage over global thresholds.
  • Cost O(n2)O(n^{2}) or O(n log n) with indexes.
  • Weakness: sensitive to k.
  • Standard in tabular anomaly detection alongside Isolation Forest.
Check yourself — multiple choice
  • Random
  • Ratio of local density to neighbors' density; LOF > 1 → outlier; handles varying-density clusters; sensitive to k
  • Same as k-means
  • Not real

LOF: local density ratio vs neighbors; handles varying densities.

#anomaly-detection#density

Practise Unsupervised Learning

214 interview questions in this topic.

Related questions