LAMDA-NJU / Deep-Forest

An Efficient, Scalable and Optimized Python Framework for Deep Forest (2021.2.1)
https://deep-forest.readthedocs.io
Other
910 stars 158 forks source link

[Question] n_estimators how does it works? #100

Closed simonprovost closed 2 years ago

simonprovost commented 2 years ago

Hi all,

To begin, I want to express my gratitude for this amazing research on an easier-to-take DL model than the ones that are typically discussed. However, I do have a few concerns. The following is stated in the n estimators:

The number of estimator in each cascade layer. It will be multiplied by 2 internally because each estimator contains a RandomForestClassifier and a ExtraTreesClassifier, respectively.

Which first, I believe, stems from the reality that we require as much diversity as possible? [Zhou et al., 2012] However, if we use RF or XGBOOST as the base learner, will there be two base learners and one RF and one ExtraTrees if n estimators is two? If we have four n estimators, will we have four base learners, two RF, and two additional trees?

Thank you for this, I needed some clarification about it. Have a great day.

xuyxu commented 2 years ago

Hi @simonprovost, if n_estimator is set to N, the model will build N RandomForestClassifier and N ExtraTreesClassifier for each cascade layer by default. However, if you are going to use the customized estimators, the number of base learners in each cascade layer simply equals the length of the list passed to the set_estimator method.

simonprovost commented 2 years ago

Amazing @xuyxu thank you very much it was another thought I had too. I'll close as it's done.