I'm using Local outlier factor algorithm provided by Scikit-learn for outlier detection. For the evaluation i want to use auc measure.
clf = LocalOutlierFactor(n_neighbors=20, contamination=outlier_frac, novelty=False)
pred_y=clf.**fit_predict**(data)
false_postive_rate, true_positive_rate, thresholds = **roc_curve**(labels, pred_y)
auc_measure=auc(false_postive_rate,true_positive_rate)
Unfortunaly roc_curve requires the predicted probabilities or decision function not the predicted class labels. However, LOF for outlier detection does not contain this. I tried to create decision function by my self. But i'm not sure about its feasabilty.
Scorelist=clf.negative_outlier_factor_
threshold = stats.scoreatpercentile(Scorelist, 100 * outlier_frac)
decision=clf.negative_outlier_factor_-threshold
How to obtain the predicted probabilties or the decision function for LOF outlier detection , since there is decision function for LOF novelty detection.