Q3- getting mean and deviation for each model variation

Hi, I have been struggling with the code to find the mean and deviation for all possible model variations. I could only achieve it for the best models using best_params, but for this exercise I would still need the results for the other options.

I would appreciate any help

Once you grid-search is fitted, you indeed have fitted attributes belonging to the best model: best_params_, best_score_, best_estimator_.

In addition, you have all information regarding the combination tried in the fitted attribute cv_results_.
This is a Python dictionary and you can create a dataframe from it as shown (I did not put the full code but it should be a good approximation):

searchcv = GridSearchCV(...)
searchcv.fit(X, y)
cv_results = pd.DataFrame(searchcv.cv_results_)
cv_results