I am using OneClassSVM for a binary classification problem. I have a dataset where the target variable is labeled 0 or 1. I don't know if OneClassSVM can be used for binary or multi classification problems, but when I try to predict I get the following: y_true:
[0 0 0 1 1 0 0 1 1 0 1 1 0 0 0 1 1 1 0 1 0 0 1 1 0 0 1 1 1 0 1 0 1 1 1 0 1
1 1 0 1 0 0 0 1 1 0 1 0 1 0 0 1 0 1 1 0 1 1 0 1 1 1 0 0 1 1 1 0 0 0 0 0 1
0 1 1 1 0 1 0 0 1 0 0 0 0 0 1 0 1 1 0 1 0 1 1 0 0 0 0 1 1 0 1 0 1 0 0 1 1
0 1 0 0 1 0 0 0 1 0 1 1 1 1 1]
y_pred:
[-1 1 1 1 -1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 -1 1 1
1 1 -1 1 1 1 1 1 1 -1 1 1 1 1 -1 1 1 1 1 1 -1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1
There are many -1 values in the y_pred I assume these are the instances where the model was trying to predict the class 0 but could not ?
Main Question: can OneClassSVM be used for binary classification ?