HomeAI & Machine LearningData Mining: Local Outlier Factor Explorer

Data Mining: Local Outlier Factor Explorer (2D)

Interactive 2D data mining lab: watch the real Local Outlier Factor (LOF) algorithm score every point in a varying-density point cloud, compare it live against a naive global-distance-threshold detector, click a point to inspect its k-nearest neighbours, and tune k live.

AI & Machine Learning2DModerate60 FPS📱 Mobile-adapted⇄ 3D version
2d-data-mining ↗ Open standalone

This lab renders a synthetic 2D point cloud with deliberately varying density — one tight dense cluster, one loose-but-internally-consistent sparse cluster, a planted local outlier sitting just off the dense cluster's edge, and a few genuine global outliers scattered around — and runs the real Local Outlier Factor algorithm over it from scratch: for every point it brute-force computes distances to all others, finds the k nearest neighbours, derives a local reachability density from their reach-distances, and scores each point by how much sparser its neighbourhood is than its neighbours' neighbourhoods. Points are coloured by that score from blue (LOF ≈ 1) through yellow to red (LOF far above 1), the k slider changes how many neighbours define "local", a comparison toggle overlays a naive global-distance-threshold detector so you can see it wrongly flag the whole sparse cluster while missing the planted local outlier that LOF catches correctly, and clicking any point draws lines to its k-nearest neighbours while reporting its exact LOF score and 1-NN distance.

⚙ Under the hood

An interactive 3D data mining lab that runs the real Local Outlier Factor algorithm over a point cloud, coloring every point by how much sparser its local neighborhood is than its neighbors' neighborhoods.

data miningoutlier detectionLOFclusteringanomaly detectionmachine learning

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)