I am working on an ML project to predict a particular boolean column. I am using SVM's in SKlearn. I have some features I am trying to use as my descriptive features. These features contain integers (label encoding) and have a max of three unique values. The confusion matrix and classification report that is produced after I make the prediction is down below. I can't understand why it is classifying zero results. Any help? image of code here
The code below is using one descriptive feature that contains three unique integers, and the target feature is a boolean column.
from sklearn.metrics import confusion_matrix
confusion_matrix(y_test, y_pred)
array([[9309, 0],
[8896, 0]], dtype=int64)
from sklearn.metrics import classification_report
print(classification_report(y_test, y_pred))
precision recall f1-score support
0 0.51 1.00 0.68 9309
1 0.00 0.00 0.00 8896
accuracy 0.51 18205
Here is the encoding and the training
encoder = preprocessing.LabelEncoder()
df['Gaze'] = encoder.fit_transform(df['Gaze'])
df['Blink'] = encoder.fit_transform(df['Blink'])
df['Brows'] = encoder.fit_transform(df['Brows'])
df['QuestionType'] = encoder.fit_transform(df['QuestionType'])
y = df[['QuestionType']]
X = df[['Blush']]
from sklearn.svm import SVC
clf = SVC(kernel='linear')
from sklearn.preprocessing import MinMaxScaler
scaling = MinMaxScaler(feature_range=(-1,1)).fit(X_train)
X_train = scaling.transform(X_train)
X_test = scaling.transform(X_test)
clf.fit(X_train, y_train)
y_score = clf.decision_function(X_test)
y_pred = clf.predict(X_test)