这是一个二进制分类任务,我有 15K 1 和 11K 0(目标)
我尝试了以下方法:
X = feature_cols
y = department_wise[['Threshold']]
X_train, X_test, y_train, y_test = train_test_split(X,y,test_size=0.2, random_state=1)
model = RandomForestClassifier()
model.fit(X, y)
predicted_labels = model.predict(X_test)
X_test 仅预测 0,准确率约为 88%。我不明白为什么,因为我的数据集甚至没有不平衡。无论我尝试使用什么其他分类器,它都能以高精度显示相同的结果。请让我知道我哪里出错了。