Home▸Mathematics▸Discriminant Analysis 2D: LDA vs QDA on Correlated Gaussian Clusters

Discriminant Analysis 2D: LDA vs QDA on Correlated Gaussian Clusters

Interactive 2D discriminant-analysis simulator: two correlated bivariate-Gaussian classes with live covariance ellipses and the exact Bayes decision boundary — a straight line under LDA's shared-covariance assumption, or a curved conic under QDA's per-class covariance — plus a discriminant-score heatmap and live classification accuracy.

Mathematics2DAdvanced60 FPS📱 Mobile-adapted⇄ 3D version
2d-multivariate-statistics ↗ Open standalone

Two bivariate-Gaussian classes sit in the (x,y) plane, each with its own tunable covariance ellipse. This simulator computes the real Bayes discriminant function δk(x) = -½(x-μk)'Σk⁻¹(x-μk) - ½ln|Σk| + ln πk for every point and renders the exact decision boundary where the two classes tie — a straight line under Linear Discriminant Analysis' shared-covariance assumption, or a curved conic under Quadratic Discriminant Analysis' per-class covariance. A synced heatmap panel shows the raw discriminant score field, and a bar panel tracks each class's live covariance eigenvalues. Drag the correlation sliders to reshape each class's covariance ellipse, pull the means apart, resample points, pan/zoom the main view, and watch live classification accuracy update as misclassified points light up red.

⚙ Under the hood

Two correlated bivariate-Gaussian classes with live covariance ellipses and the exact Bayes decision boundary — a straight line under LDA's shared-covariance assumption, or a curved conic under QDA's per-class covariance — plus a discriminant-score heatmap and live classification accuracy.

statisticsdiscriminant analysiscovarianceclassificationLDAQDA

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

What did you find?

Add reproduction steps (optional)