![](/img/trans.png)
[英]How to combine the classification results of deep learning models and traditional machine learning models in python
[英]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
有沒有辦法做到這一點? (有沒有比套袋更簡單的方法?)
使用VotingClassifier 。
投票分類器實現背后的想法是將概念上不同的機器學習分類器組合在一起,並使用多數投票或平均預測概率(軟投票)來預測類標簽。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.