From 3dfc5b6c36a6ccb3ba9558361e7b6cf15a3977d9 Mon Sep 17 00:00:00 2001 From: Guillaume Lemaitre Date: Wed, 18 Sep 2024 20:42:40 +0200 Subject: [PATCH 1/2] fix typos --- sklearn/linear_model/tests/test_ridge.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sklearn/linear_model/tests/test_ridge.py b/sklearn/linear_model/tests/test_ridge.py index a82e920cb261f..32c6f6aebf568 100644 --- a/sklearn/linear_model/tests/test_ridge.py +++ b/sklearn/linear_model/tests/test_ridge.py @@ -2261,12 +2261,12 @@ def test_ridge_cv_results_predictions(with_sample_weight, fit_intercept, n_targe """Check that the predictions stored in `cv_results_` are on the original scale. The GCV approach works on scaled data: centered by an offset and scaled by the - squared root of the sample weights. Thus, previous to compute scores, the - predictions need to be scaled back to the original scale. Those predictions are the - ones stored in `cv_results_` in `RidgeCV`. + square root of the sample weights. Thus, prior to computing scores, the + predictions need to be scaled back to the original scale. These predictions are + the ones stored in `cv_results_` in `RidgeCV`. In this test, we check that the internal predictions stored in `cv_results_` are - equivalent to a naive LOO-CV grid-search with a `Ridge` estimator. + equivalent to a naive LOO-CV grid search with a `Ridge` estimator. Non-regression test for: https://github.com/scikit-learn/scikit-learn/issues/13998 From 3607a9640b167bd7f2fa6c7c95e2c6b433f16447 Mon Sep 17 00:00:00 2001 From: Guillaume Lemaitre Date: Wed, 18 Sep 2024 20:41:35 +0200 Subject: [PATCH 2/2] fix typos --- doc/whats_new/v1.6.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/whats_new/v1.6.rst b/doc/whats_new/v1.6.rst index 2a7211ca368b5..00235842b4dc0 100644 --- a/doc/whats_new/v1.6.rst +++ b/doc/whats_new/v1.6.rst @@ -257,10 +257,10 @@ Changelog for the calculation of test scores. :pr:`29419` by :user:`Shruti Nath `. -- |Fix| :class:`linear_model.RidgeCV` now properly use predictions the same scale as the - target seen during `fit`. Those predictions are stored in `cv_results_` when when +- |Fix| :class:`linear_model.RidgeCV` now properly uses predictions on the same scale as + the target seen during `fit`. These predictions are stored in `cv_results_` when `scoring != None`. Previously, the predictions were rescaled by the square root of the - sample weights and offset by the mean of the target leading to an incorrect estimate + sample weights and offset by the mean of the target, leading to an incorrect estimate of the score. :pr:`29842` by :user:`Guillaume Lemaitre `, :user:`Jérôme Dockes ` and