Skip to content

DOC fix typos introduced in #29842 #29886

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions doc/whats_new/v1.6.rst
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,10 @@ Changelog
for the calculation of test scores.
:pr:`29419` by :user:`Shruti Nath <snath-xoc>`.

- |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 <glemaitre>`,
:user:`Jérôme Dockes <jeromedockes>` and
Expand Down
8 changes: 4 additions & 4 deletions sklearn/linear_model/tests/test_ridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading