As EllipticEnvelope fits a hypothetical Gaussian distribution, leveraging parametric and statistical assumptions, OneClassSVM is a machine learning algorithm that learns what the distribution of the features should be from the data itself, and therefore is applicable in a large variety of situations when you want to be able to catch all the outliers but also the unusual data examples.

It is great if you already have a clean dataset and have it fitted by machine learning algorithms. Afterwards, OneClassSVM can be summoned to check if any new example fits in the historical distribution, and if it doesn't, it will signal a novel example, which might be both an error or some new, previously unseen situation.

Just think of data science ...

Get Python Data Science Essentials - Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.