<commit_before>.. include:: _contributors.rst

.. currentmodule:: sklearn

.. _changes_0_24:

Version 0.24.0
==============

**In Development**


.. include:: changelog_legend.inc

Put the changes in their relevant module.

Changed models
--------------

The following estimators and functions, when fit with the same data and
parameters, may produce different models from the previous version. This often
occurs due to changes in the modelling logic (bug fixes or enhancements), or in
random sampling procedures.

- |Fix| ``inertia_`` attribute of :class:`cluster.KMeans` and
  :class:`cluster.MiniBatchKMeans`.

Details are listed in the changelog below.

(While we are trying to better inform users by providing this information, we
cannot assure that this list is complete.)


Changelog
---------

..
    Entries should be grouped by module (in alphabetic order) and prefixed with
    one of the labels: |MajorFeature|, |Feature|, |Efficiency|, |Enhancement|,
    |Fix| or |API| (see whats_new.rst for descriptions).
    Entries should be ordered by those labels (e.g. |Fix| after |Efficiency|).
    Changes not specific to a module should be listed under *Multiple Modules*
    or *Miscellaneous*.
    Entries should end with:
    :pr:`123456` by :user:`<NAME> <joeongithub>`.
    where 123456 is the *pull request* number, not the issue number.

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

- |Efficiency| :class:`calibration.CalibratedClassifierCV.fit` now supports
  parallelization via `joblib.Parallel` using argument `n_jobs`.
  :pr:`17107` by :user:`<NAME> <jjerphan>`.

:mod:`sklearn.calibrator`
.........................

- |Enhancement| Allow :class:`calibrator.CalibratedClassifierCV` use with
  prefit :class:`pipeline.Pipeline` where data is not `X` is not array-like,
  sparse matrix or dataframe at the start. :pr:`17546` by
  :user:`<NAME> <lucyleeow>`.

:mod:`sklearn.cluster`
......................

- |Fix| Fixed a bug in :class:`cluster.MeanShift` with `bin_seeding=True`. When
  the estimated bandwidth is 0, the behavior is equivalent to
  `bin_seeding=False`.
  :pr:`17742` by :user:`<NAME> <jeremiedbb>`.

- |Fix| Fixed a bug in :class:`cluster.KMeans` and
  :class:`cluster.MiniBatchKMeans` where the reported inertia was incorrectly
  weighted by the sample weights. :pr:`17848` by
  :user:`<NAME> <jeremiedbb>`.

- |API| :class:`cluster.MiniBatchKMeans` attributes, `counts_` and
  `init_size_`, are deprecated and will be removed in 0.26. :pr:`17864` by
  :user:`<NAME> <jeremiedbb>`.

- |Fix| :class:`cluster.AgglomerativeClustering` has a new parameter
  `compute_distances`. When set to `True`, distances between clusters are
  computed and stored in the `distances_` attribute even when the parameter
  `distance_threshold` is not used. This new parameter is useful to produce
  dendrogram visualizations, but introduces a computational and memory
  overhead. :pr:`17984` by :user:`<NAME> <mriedmann>`,
  :user:`<NAME> <EmilieDel>`, and
  :user:`<NAME> <FrancescoCasalegno>`.

- |Fix| Fixed a bug in :class:`cluster.AffinityPropagation`, that
  gives incorrect clusters when the array dtype is float32.
  :pr:`17995` by :user:`<NAME>  <Wikilicious>` and
  :user:`<NAME> <amy12xx>`.

- |Fix| Fixed a bug in :class:`cluster.KMeans` where rounding errors could
  prevent convergence to be declared when `tol=0`. :pr:`17959` by
  :user:`<NAME> <jeremiedbb>`.

:mod:`sklearn.covariance`
.........................

- |API| Deprecates `cv_alphas_` in favor of `cv_results['alphas']` and
  `grid_scores_` in favor of split scores in `cv_results_` in
  :class:`covariance.GraphicalLassoCV`. `cv_alphas_` and `grid_scores_` will be
  removed in version 0.26. :pr:`16392` by `Thomas Fan`_.

:mod:`sklearn.datasets`
.......................<commit_msg>MAINT mark AgglomerativeClustering's new compute_distances as |Enhancement|<commit_after>.. include:: _contributors.rst

.. currentmodule:: sklearn

.. _changes_0_24:

Version 0.24.0
==============

**In Development**


.. include:: changelog_legend.inc

Put the changes in their relevant module.

Changed models
--------------

The following estimators and functions, when fit with the same data and
parameters, may produce different models from the previous version. This often
occurs due to changes in the modelling logic (bug fixes or enhancements), or in
random sampling procedures.

- |Fix| ``inertia_`` attribute of :class:`cluster.KMeans` and
  :class:`cluster.MiniBatchKMeans`.

Details are listed in the changelog below.

(While we are trying to better inform users by providing this information, we
cannot assure that this list is complete.)


Changelog
---------

..
    Entries should be grouped by module (in alphabetic order) and prefixed with
    one of the labels: |MajorFeature|, |Feature|, |Efficiency|, |Enhancement|,
    |Fix| or |API| (see whats_new.rst for descriptions).
    Entries should be ordered by those labels (e.g. |Fix| after |Efficiency|).
    Changes not specific to a module should be listed under *Multiple Modules*
    or *Miscellaneous*.
    Entries should end with:
    :pr:`123456` by :user:`<NAME> <<EMAIL>>`.
    where 123456 is the *pull request* number, not the issue number.

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

- |Efficiency| :class:`calibration.CalibratedClassifierCV.fit` now supports
  parallelization via `joblib.Parallel` using argument `n_jobs`.
  :pr:`17107` by :user:`<NAME> <jjerphan>`.

:mod:`sklearn.calibrator`
.........................

- |Enhancement| Allow :class:`calibrator.CalibratedClassifierCV` use with
  prefit :class:`pipeline.Pipeline` where data is not `X` is not array-like,
  sparse matrix or dataframe at the start. :pr:`17546` by
  :user:`<NAME> <lucyleeow>`.

:mod:`sklearn.cluster`
......................

- |Enhancement| :class:`cluster.AgglomerativeClustering` has a new parameter
  `compute_distances`. When set to `True`, distances between clusters are
  computed and stored in the `distances_` attribute even when the parameter
  `distance_threshold` is not used. This new parameter is useful to produce
  dendrogram visualizations, but introduces a computational and memory
  overhead. :pr:`17984` by :user:`<NAME> <mriedmann>`,
  :user:`<NAME> <EmilieDel>`, and
  :user:`<NAME> <FrancescoCasalegno>`.

- |Fix| Fixed a bug in :class:`cluster.MeanShift` with `bin_seeding=True`. When
  the estimated bandwidth is 0, the behavior is equivalent to
  `bin_seeding=False`.
  :pr:`17742` by :user:`<NAME> <jeremiedbb>`.

- |Fix| Fixed a bug in :class:`cluster.KMeans` and
  :class:`cluster.MiniBatchKMeans` where the reported inertia was incorrectly
  weighted by the sample weights. :pr:`17848` by
  :user:`<NAME> <jeremiedbb>`.

- |API| :class:`cluster.MiniBatchKMeans` attributes, `counts_` and
  `init_size_`, are deprecated and will be removed in 0.26. :pr:`17864` by
  :user:`<NAME> <jeremiedbb>`.

- |Fix| Fixed a bug in :class:`cluster.AffinityPropagation`, that
  gives incorrect clusters when the array dtype is float32.
  :pr:`17995` by :user:`<NAME>  <Wikilicious>` and
  :user:`<NAME> <amy12xx>`.

- |Fix| Fixed a bug in :class:`cluster.KMeans` where rounding errors could
  prevent convergence to be declared when `tol=0`. :pr:`17959` by
  :user:`<NAME> <jeremiedbb>`.

:mod:`sklearn.covariance`
.........................

- |API| Deprecates `cv_alphas_` in favor of `cv_results['alphas']` and
  `grid_scores_` in favor of split scores in `cv_results_` in
  :class:`covariance.GraphicalLassoCV`. `cv_alphas_` and `grid_scores_` will be
  removed in version 0.26. :pr:`16392` by `<NAME>`_.

:mod:`sklearn.datasets`
.......................
{'fraction_non_alphanumeric': 0.15391668849882106, 'fraction_numerical': 0.01991092481006026, 'mean_word_length': 3.881713554987212, 'pattern_counts': {'":': 0, '<': 53, '<?xml version=': 0, '>': 53, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6682771', 'n_tokens_mistral': 2566, 'n_tokens_neox': 2378, 'n_words': 821}