Why do I get different values with pipline and without pipline in sklearn in python

后端 未结 1 960
醉话见心
醉话见心 2021-01-22 11:54

I am using recursive feature elimination with cross-validation (rfecv) with GridSearchCV with RandomForest classifier as follows using

相关标签:
1条回答
  • 2021-01-22 12:06

    In with pipeline case,

    Feature selection (RFECV) is carried out with base model (RandomForestClassifier(random_state = 42, class_weight="balanced")) before applying the grid_searchCV on final estimator.

    In without pipeline case,

    For each combination of hyperparameter, the corresponding estimator is used for feature selection (RFECV). Hence, it would be time consuming.

    0 讨论(0)
提交回复
热议问题