Closed jayahm closed 3 years ago
The DS considers each element in the list passed as input (pool_classifiers) as a single model. So if you do like:
pool_classifiers = [ model_svc, model_bayes, model_tree, model_knn, model_rf]
In this case, the RandomForest is viewed as a single model as it is one element in the list. So the DS views as a pool of 5 models.
If you want to have a pool composed of all individual trees in the forest + the other models (SVM, KNN etc) you can do like that:
pool_classifiers = [ model_svc, model_bayes, model_tree, model_knn] + model_rf.estimators_
That will add each individual model from the RandomForest ensemble to the list pool_classifiers, creating a list of 104 models.
To summarize, the number of classifiers for the DS model is the size of the list of classifiers passed as input. So if you have any doubts you can just get the length of the list len(pool_classifiers)
Ah, I see. Thank you very much. Now, I understand.
Hi,
If I include Random Forest with 100 estimators in the pool together with other heterogeneous classifiers, how much is the number of base classifiers in the total?
For example, I included SVC, NB, DT, KNN and RF:
So, the total number of base classifiers is 5 or 104?