2021-07-07 ValueError: Classification metrics can't handle a mix of binary and continuous targets

做基于树的特征选择时遇到这个错误:

“ValueError: Classification metrics can't handle a mix of binary and continuous targets”

经过检查,是一个分类任务,结果导包的时候导成了回归的函数。

RandomForestRegressor 更正为 RandomForestClassifier,即可!


你可能感兴趣的:(2021-07-07 ValueError: Classification metrics can't handle a mix of binary and continuous targets)