Controls
Presets
Parameters
Model checks
The science
Idea. A one-class SVM learns the region where "normal" data lives from examples of normal data only. With the RBF kernel k(x,y) = exp(-γ|x-y|²) it finds the function f(x) = Σi αi k(xi, x) - ρ; points with f ≥ 0 are normal, f < 0 are flagged as anomalies. The yellow line is f = 0.
Optimisation. The weights solve the dual problem min ½ αTKα subject to 0 ≤ αi ≤ 1/(νn) and Σαi = 1, here by sequential minimal optimisation (SMO). Points with α > 0 are the support vectors; those with α = 1/(νn) lie outside the boundary.
What the sliders do. ν is an upper bound on the fraction of training points left outside and a lower bound on the fraction of support vectors (Schölkopf et al., 2001) - the page checks this exactly. γ sets how local the boundary is: small γ gives a smooth blob, large γ hugs every point and approaches a density estimate. For ν = 1 the solution is exactly a kernel density estimate.
Simplifications. Two-dimensional synthetic data (a Gaussian blob, a ring or two clusters, plus uniformly scattered contamination) so the whole decision surface can be drawn. Real anomaly detection scales γ to the data, works in many dimensions and judges by precision/recall on held-out data. Checks: dual feasibility, KKT conditions, the ν-property, strong duality (primal = -dual), the ν = 1 kernel-density limit, translation invariance and positive semi-definiteness of the Gram matrix.