[scikit-learn] question for using GridSearchCV on LocalOutlierFactor
Lifan Xu
xulifan at udel.edu
Thu Oct 5 18:53:56 EDT 2017
Hi,
I was trying to train a model for anomaly detection. I only have
the normal data which are all labeled as 1. Here is my code:
clf =
sklearn.model_selection.GridSearchCV(sklearn.neighbors.LocalOutlierFactor(),
parameters,
scoring="accuracy",
cv=kfold,
n_jobs=10)
clf.fit(vectors, labels)
But it complains "AttributeError: 'LocalOutlierFactor' object has
no attribute 'predict'".
It looks like LocalOutlierFactor only has fit_predict(), but no
predict().
My question is will predict() be implemented?
Thanks!
More information about the scikit-learn
mailing list