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

Reply via email to