GridSearchCV & something like return_estimator

While doing exercise M4.05 I found myself looking for return_estimator=True on a GridSearchCV

I mean, I can ask cross_validate(..., return_estimator=True) to return the various models that have been explored during the validation

in the context of exercise M4.05, as I was dealing with a GridSearchCV object to compare the various values for C
and this way I could figure that C=0.1 is the best setting
but I was also trying to retrieve the settings (here namely the equation of the separation line) for the model corresponding to each value of C, and could not seem to do that;

is it possible at all ? or should I have used another approach altogether here ?

You can inspect the coef_ and intercept_ parameters of all different models’ decision functions.
An interesting thing to do is to make a box plot of these coefficients.

For such an example, you can have a look at this scikit-learn example: Common pitfalls in the interpretation of coefficients of linear models — scikit-learn 1.1.dev0 documentation

my point was, I can’t seem to find a way to access the “different models” from the GridSearchCV thingy, so a fortiori their coef_ and intercept_ attributes…

it’s probably totally obvious, but I must be looking in the wrong direction…

My bad. We currently do not provide an option to store the models. We are planning to add this option in the future as well as the inner predictions when requested by the user.