I have trained a binary SVM classifier and made predictions like the following:
classifier = svm(formula = type ~ .,
data = train,
type = 'C-classification',
kernel = 'polynomial')
y_pred = predict(classifier, newdata = test[1:57])
The label that I am training against (type) is a factor. The prediction (y_pred) in this case is also a factor list. How can I obtain the probability/logits of these predictions so that I can produce a ROC curve?