5. 训练模型
clfcv.fit(X_train, y_train.astype('int'))
6. 使用模型来对测试集进行预测
test_result = clfcv.predict(X_test.astype('int'))
7. 模型评估
import sklearn.metrics as metrics
print("决策树准确度:")
print(metrics.classification_report(y_test,test_result))
但是在运行代码的时候报错了
7. 模型评估
import sklearn.metrics as metrics
print("决策树准确度:")
print(metrics.classification_report(y_test,test_result))
报错:Classification metrics can't handle a mix of continuous and multiclass targets
请问该怎么解决呢