# Sklearn LocalOutlierFactor contamination parameter

Can anyone provide an intuitive explanation of the choice of contamination parameter used in sklearn's LocalOutlierFactor implementation when contamination="auto" ?

The sklearn guide suggests "as described in the paper" but I couldn't find anything obvious. Thanks.

• I second this question, and none of the answers below really address it... Did you find an answer to this @sandyp?
– Sos
Sep 21 '20 at 15:43

## 2 Answers

You are specifying with a floating point number what proportion of the data you are fitting on is an outlier. If you use 'Auto' it will default to 0.1. Note that in the current documentation, there is a changed note specifying that it will default to 0.2 in a future version.

• In the current documentation, it says it will default to whatever is in the paper. I couldn't find it in the paper. Oct 25 '19 at 22:35

(this answer assumes you were asking about how the offset_ attribute was chosen when contamination="auto")

The only place in the paper that I can conceive of that factor coming from is Section 7.3, where the original authors explored soccer data and say

Below we discuss all the local outliers with LOF > 1.5 (see table 3), and explain why they are exceptional.