Discover how GridSearchCV calculates the mean and standard deviation of validation folds to find the best α, and how refit=True fully leverages your training data.
Reserve 20% of the dataset as a sealed test set to prevent target leakage.
List candidate values of α to evaluate: [0.01, 0.1, 1.0, 10.0].
For each α, perform 5 CV splits. Track the R-squared score for each fold to compute a mean and std dev.
The parameter mapping yielding the highest mean_test_score is selected as the winner.
Scikit-learn discards the fractional CV models and retrains a brand new model on 100% of the Training Data using the winning α, then scores it against the Test Data.
| param_alpha | mean_test_score | std_test_score |
|---|