Python/机器学习:我可以将多个预测模型组合成一个模型吗
我正在研究一个预测模型,最初使用的是随机森林算法。我想把不同的预测算法结合在一起,以提高我的准确性 我尝试了这个,但我得到了一个错误:Python/机器学习:我可以将多个预测模型组合成一个模型吗,python,model,machine-learning,classification,Python,Model,Machine Learning,Classification,我正在研究一个预测模型,最初使用的是随机森林算法。我想把不同的预测算法结合在一起,以提高我的准确性 我尝试了这个,但我得到了一个错误: models = [RandomForestClassifier(n_estimators=200), GradientBoostingClassifier(n_estimators=100)] %time cross_val_score(models, X2, Y_target).mean() 错误: estimator should a be an est
models = [RandomForestClassifier(n_estimators=200), GradientBoostingClassifier(n_estimators=100)]
%time cross_val_score(models, X2, Y_target).mean()
错误:
estimator should a be an estimator implementing 'fit' method
有办法做到这一点吗?(有没有比装袋更简单的方法?使用
投票分类器实现背后的思想是将
概念上不同的机器学习分类器和使用大多数
投票或平均预测概率(软投票)来预测
类标签