GridSearchCV final model

前端 未结 1 674
不思量自难忘°
不思量自难忘° 2020-12-21 14:36

If I use GridSearchCV in scikit-learn library to find the best model, what will be the final model it returns? That said, for each set of hyper-parameters, we t

相关标签:
1条回答
  • 2020-12-21 14:52

    The GridSearchCV will return an object with quite a lot information. It does return the model that performs the best on the left-out data:

    best_estimator_ : estimator or dict

    Estimator that was chosen by the search, i.e. estimator which gave highest score (or smallest loss if specified) on the left out data. Not available if refit=False.

    Note that this is not the model that's trained on the entire data. That means, once you are confident that this is the model you want, you will need to retrain the model on the entire data by yourself.

    Ref: http://scikit-learn.org/stable/modules/generated/sklearn.model_selection.GridSearchCV.html

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