Wrong parameter in LOF wrapper
I noticed that the Local Outlier Factor wrapper is used as a novelty detector but does not set the flag novelty
at instantiation.
The details are explained here but the main point is the following:
Note that neighbors.LocalOutlierFactor does not support
predict
,decision_function
andscore_samples
methods by default but only afit_predict
method, as this estimator was originally meant to be applied for outlier detection. The scores of abnormality of the training samples are accessible through thenegative_outlier_factor_
attribute.If you really want to use neighbors.LocalOutlierFactor for novelty detection, i.e. predict labels or compute the score of abnormality of new unseen data, you can instantiate the estimator with the
novelty
parameter set toTrue
before fitting the estimator. In this case,fit_predict
is not available.