File “D:\yangshan\Teng\Anaconda3\envs\yangshan\lib\site-packages\sklearn\metrics\classification.py”, line 81, in _check_targets
“and {1} targets”.format(type_true, type_pred))
ValueError: Classification metrics can’t handle a mix of binary and continuous targets
出错原因是因为test_f1 = f1_score(test_labels, test_predict,average=“binary”)
test_predict含有0/1以外的标志。