Skip to content

ENH use cv_results in the different curve display to add confidence intervals #21211

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

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
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
12 changes: 6 additions & 6 deletions doc/modules/cross_validation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ two ways:
- It allows specifying multiple metrics for evaluation.

- It returns a dict containing fit-times, score-times
(and optionally training scores as well as fitted estimators) in
addition to the test score.
(and optionally training scores, fitted estimators, train-test split indices)
in addition to the test score.

For single metric evaluation, where the scoring parameter is a string,
callable or None, the keys will be - ``['test_score', 'fit_time', 'score_time']``
Expand All @@ -220,10 +220,10 @@ following keys -

``return_train_score`` is set to ``False`` by default to save computation time.
To evaluate the scores on the training set as well you need to set it to
``True``.

You may also retain the estimator fitted on each training set by setting
``return_estimator=True``.
``True``. You may also retain the estimator fitted on each training set by
setting ``return_estimator=True``. On the same line of thought, you may set
`return_indices=True` to retain the training and testing indices used to split
the dataset into train and test sets for each cv split.

The multiple metrics can be specified either as a list, tuple or set of
predefined scorer names::
Expand Down
16 changes: 16 additions & 0 deletions doc/whats_new/v1.1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,29 @@ Changelog
:pr:`123456` by :user:`Joe Bloggs <joeongithub>`.
where 123456 is the *pull request* number, not the issue number.

:mod:`sklearn.calibration`
..........................

- |Feature| :class:`calibration.CalibrationDisplay` has a new method
:meth:`~calibration.CalibrationDisplay.from_cv_results` allowing to plot
calibration curves together with standard deviation uncertainty using
cross-validation results.
:pr:`21211` by :user:`Guillaume Lemaitre <glemaitre>`.

:mod:`sklearn.linear_model`
...........................

- |Fix| :class:`linear_model.LogisticRegression` now raises a better error
message when the solver does not support sparse matrices with int64 indices.
:pr:`21093` by `Tom Dupre la Tour`_.

:mod:`sklearn.model_selection`
..............................

- |Enhancement| :func:`model_selection.cross_validate` accepts a new parameter
`return_indices` to return the train-test indices of each cv split.
:pr:`21211` by :user:`Guillaume Lemaitre <glemaitre>`.

:mod:`sklearn.utils`
....................

Expand Down
Loading