Python/Machine 学习:我能不能把几个预测模型合二为一
Python/Machine Learning: Can I combine several prediction models into one
我正在研究预测模型,最初使用的是随机森林算法。我想将不同的预测算法组合成一个来提高我的准确性。
我试过了,但出现错误:
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
有办法吗? (有没有比装袋更简单的方法?)
The idea behind the voting classifier implementation is to combine
conceptually different machine learning classifiers and use a majority
vote or the average predicted probabilities (soft vote) to predict the
class labels.
我正在研究预测模型,最初使用的是随机森林算法。我想将不同的预测算法组合成一个来提高我的准确性。
我试过了,但出现错误:
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
有办法吗? (有没有比装袋更简单的方法?)
The idea behind the voting classifier implementation is to combine conceptually different machine learning classifiers and use a majority vote or the average predicted probabilities (soft vote) to predict the class labels.