What are you trying to achieve with this code?
If you label everything as 1, the highest accuracy will be obtained if
everything is labeled as 1.
So even if the interface was implemented, the result would not be helpful.
On 10/06/2017 12:53 AM, Lifan Xu wrote:
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!
_______________________________________________
scikit-learn mailing list
scikit-learn@python.org
https://mail.python.org/mailman/listinfo/scikit-learn
_______________________________________________
scikit-learn mailing list
scikit-learn@python.org
https://mail.python.org/mailman/listinfo/scikit-learn