sklearn cross_val_score and cross_validation notes

0 views
Skip to first unread message

Ritchie Poon

unread,
Mar 19, 2021, 1:41:26 PM3/19/21
to Machine Intelligence and Data Science Group
Compare major properties:

i  Fit model: Yes  / Yes
ii. Return fitted model:   No   / Default No, yes if change default, 
but only model for individual fold
iii Return scores: Yes / Yes test + train score

In general,  you first use Cross Validation to assess (score) different model performance (with different hyperparameters), then re-train (fit) a model (based on the set 
of best performing hyperparameters).

You can also use Grid Search (GridSearchCV) which will  walk through different parameter grids and evaluate using CV to select the optimal set of parameters.

So cross validation is an evaluation tool for a given  model +hyperparameters to avoid overfitting on a limited set of data




Reply all
Reply to author
Forward
0 new messages