-1

I have combined random forest with adaboost as

clf = AdaBoostClassifier(n_estimators=10, base_estimator=RandomForestClassifier(n_estimators=10,max_depth=20))

now i want to combine adaboost with xgboost and i have tried like this:

from sklearn.ensemble import AdaBoostClassifier
from xgboost import XGBClassifier

clf = AdaBoostClassifier(base_estimator=XGBClassifier(eval_metric='mlogloss'))

and it is not working correctly. How to do this?

desertnaut
  • 57,590
  • 26
  • 140
  • 166
Jamal Ahmed
  • 411
  • 1
  • 4
  • 10
  • 1
    This is not a good idea (regardless of whatever error you get here) - see https://stackoverflow.com/questions/57968476/execution-time-of-adaboost-with-svm-base-classifier and https://stackoverflow.com/questions/66977025/using-random-forest-as-base-classifier-with-adaboost – desertnaut Aug 07 '22 at 16:20

1 Answers1

-1

use would just use it like this

import lib1, lib2, lib3, lib4, lib5