Hi Mamun,
from sklearn.metrics import roc_curve, auc
from sklearn.svm import OneClassSVM
ocsvm = OneClassSVM().fit(X_train)
scoring = - ocsvm.decision_function(X_test) # the lower, the more normal
fpr, tpr, thresholds = roc_curve(y_test, scoring)
AUC = auc(fpr, tpr)
HTH
Nicolas
2016-06-06 19:2
Hi Nicolas,
Thanks for your reply. Apology for the naive question.
I can see from the example that we can plot the decision boundary using the
decision function.
Not sure how can I extract the ROC and PRC metric from there. A small example
would greatly help.
Thanks,
Mamun
> On 3 Jun 2016, at
Hi Mamun,
You can draw ROC and PR curves using the OCSVM decision_function
Nicolas
2016-06-03 11:54 GMT-04:00 Mamun Rashid :
> Hi everyone,
> I am running OneClassSVM method. It seems unlike the normal SVC, which has
> an option to return probability, this method does not have any option to
> ret
Hi everyone,
I am running OneClassSVM method. It seems unlike the normal SVC, which has an
option to return probability, this method does not have any option to retrieve
probability values.
I would like to draw some performance metric such as the ROC and Precision
Recall about the performance o