0
$\begingroup$

My goal is to use the LocalOutlierFactor class from scikit-learn to do real-time Novelty Detection. This can be achieved by setting novelty=True in the constructor, though I'm a little bit confused by the parameter contamination.

Such parameter, which must be in (0, 0.5], is used to specify the amount of outliers in the training set. This makes perfect sense when in an Outlier Detection setting (i.e. when novelty=False is passed to the constructor of LocalOutlierFactor), but I can't understand its purpose in a Novelty Detection setting.

The point is that I'm assuming there are no outliers in the training set, but at the same time I cannot just set contamination=0 because it must be in (0, 0.5]. I know that I could set it to a very small value like 1e-16 or something, but it feels like a hack to me.

So what is the parameter contamination used for in a Novelty Detection setting?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.