8000 DOC more whats new 1.0 fixes (#21036) · scikit-learn/scikit-learn@fff4900 · GitHub
[go: up one dir, main page]

Skip to content

Commit fff4900

Browse files
committed
DOC more whats new 1.0 fixes (#21036)
1 parent c7ba00d commit fff4900

File tree

1 file changed

+86
-93
lines changed

1 file changed

+86
-93
lines changed

doc/whats_new/v1.0.rst

Lines changed: 86 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -506,33 +506,30 @@ Changelog
506506
:pr:`16449` by :user:`Christian Lorentzen <lorentzenchr>`.
507507

508508
- |Feature| Added new solver `lbfgs` (available with `solver="lbfgs"`)
509-
and `positive` argument to class:`linear_model.Ridge`.
510-
When `positive` is set to True, forces the coefficients to be positive
511-
(only supported by `lbfgs`).
512-
:pr:`20231` by :user:`Toshihiro Nakae <tnakae>`.
509+
and `positive` argument to :class:`linear_model.Ridge`. When `positive` is
510+
set to `True`, forces the coefficients to be positive (only supported by
511+
`lbfgs`). :pr:`20231` by :user:`Toshihiro Nakae <tnakae>`.
513512

514513
- |Efficiency| The implementation of :class:`linear_model.LogisticRegression`
515514
has been optimised for dense matrices when using `solver='newton-cg'` and
516515
`multi_class!='multinomial'`.
517516
:pr:`19571` by :user:`Julien Jerphanion <jjerphan>`.
518517

519-
- |Efficiency| The implementation of `fit` for `PolynomialFeatures` transformer
520-
is now faster. This is especially noticeable on large sparse input.
521-
:pr:`19734` by :user:`Fred Robinson <frrad>`.
522-
523518
- |Enhancement| `fit` method preserves dtype for numpy.float32 in
524-
:class:`Lars`, :class:`LassoLars`, :class:`LassoLars`, :class:`LarsCV` and
525-
:class:`LassoLarsCV`. :pr:`20155` by :user:`Takeshi Oura <takoika>`.
519+
:class:`linear_model.Lars`, :class:`linear_model.LassoLars`,
520+
:class:`linear_model.LassoLars`, :class:`linear_model.LarsCV` and
521+
:class:`linear_model.LassoLarsCV`. :pr:`20155` by :user:`Takeshi Oura
522+
<takoika>`.
526523

527524
- |Enhancement| Validate user-supplied gram matrix passed to linear models
528525
via the `precompute` argument. :pr:`19004` by :user:`Adam Midvidy <amidvidy>`.
529526

530-
- |Fix| :meth:`ElasticNet.fit` no longer modifies `sample_weight` in place.
531-
:pr:`19055` by `Thomas Fan`_.
527+
- |Fix| :meth:`linear_model.ElasticNet.fit` no longer modifies `sample_weight`
528+
in place. :pr:`19055` by `Thomas Fan`_.
532529

533-
- |Fix| :class:`Lasso`, :class:`ElasticNet` no longer have a `dual_gap_`
534-
not corresponding to their objective. :pr:`19172` by
535-
:user:`Mathurin Massias <mathurinm>`
530+
- |Fix| :class:`linear_model.Lasso` and :class:`linear_model.ElasticNet` no
531+
longer have a `dual_gap_` not corresponding to their objective. :pr:`19172`
532+
by :user:`Mathurin Massias <mathurinm>`
536533

537534
- |Fix| `sample_weight` are now fully taken into account in linear models
538535
when `normalize=True` for both feature centering and feature
@@ -545,74 +542,64 @@ Changelog
545542
a model perfectly on some datasets when `residual_threshold=0`.
546543
:pr:`19499` by :user:`Gregory Strubel <gregorystrubel>`.
547544

548-
- |Fix| Sample weight invariance for class:`Ridge` was fixed in :pr:`19616` by
549-
:user:`Oliver Grisel <ogrisel>` and
550-
:user:`Christian Lorentzen <lorentzenchr>`.
551-
552-
- |Fix| The :func:`preprocessing.StandardScaler.inverse_transform` method
553-
now raises error when the input data is 1D.
554-
:pr:`19752` by :user:`Zhehao Liu <Max1993Liu>`.
545+
- |Fix| Sample weight invariance for :class:`linear_model.Ridge` was fixed in
546+
:pr:`19616` by :user:`Oliver Grisel <ogrisel>` and :user:`Christian Lorentzen
547+
<lorentzenchr>`.
555548

556549
- |Fix| The dictionary `params` in :func:`linear_model.enet_path` and
557550
:func:`linear_model.lasso_path` should only contain parameter of the
558551
coordinate descent solver. Otherwise, an error will be raised.
559552
:pr:`19391` by :user:`Shao Yang Hong <hongshaoyang>`.
560553

561554
- |API| Raise a warning in :class:`linear_model.RANSACRegressor` that from
562-
version 1.2, `min_samples` need to be set explicitly for model other than
563-
:class:`linear_model.LinearRegression`.
564-
:pr:`19390` by :user:`Shao Yang Hong <hongshaoyang>`.
555+
version 1.2, `min_samples` need to be set explicitly for models other than
556+
:class:`linear_model.LinearRegression`. :pr:`19390` by :user:`Shao Yang Hong
557+
<hongshaoyang>`.
565558

566559
- |API|: The parameter ``normalize`` of :class:`linear_model.LinearRegression`
567-
is deprecated and will be removed in 1.2.
568-
Motivation for this deprecation: ``normalize`` parameter did not take any
569-
effect if ``fit_intercept`` was set to False and therefore was deemed
570-
confusing.
571-
The behavior of the deprecated LinearModel(normalize=True) can be
572-
reproduced with :class:`~sklearn.pipeline.Pipeline` with
573-
:class:`~sklearn.preprocessing.LinearModel` (where LinearModel is
574-
LinearRegression, Ridge, RidgeClassifier, RidgeCV or RidgeClassifierCV) as
575-
follows:
576-
make_pipeline(StandardScaler(with_mean=False), LinearModel()).
577-
The ``normalize`` parameter in :class:`linear_model.LinearRegression` was
578-
deprecated in :pr:`17743` by
560+
is deprecated and will be removed in 1.2. Motivation for this deprecation:
561+
``normalize`` parameter did not take any effect if ``fit_intercept`` was set
562+
to False and therefore was deemed confusing. The behavior of the deprecated
563+
``LinearModel(normalize=True)`` can be reproduced with a
564+
:class:`~sklearn.pipeline.Pipeline` with ``LinearModel`` (where
565+
``LinearModel`` is :class:`~linear_model.LinearRegression`,
566+
:class:`~linear_model.Ridge`, :class:`~linear_model.RidgeClassifier`,
567+
:class:`~linear_model.RidgeCV` or :class:`~linear_model.RidgeClassifierCV`)
568+
as follows: ``make_pipeline(StandardScaler(with_mean=False),
569+
LinearModel())``. The ``normalize`` parameter in
570+
:class:`~linear_model.LinearRegression` was deprecated in :pr:`17743` by
579571
:user:`Maria Telenczuk <maikia>` and :user:`Alexandre Gramfort <agramfort>`.
580-
Same for :class:`linear_model.Ridge`, :class:`linear_model.RidgeClassifier`,
581-
:class:`linear_model.RidgeCV`, and :class:`linear_model.RidgeClassifierCV`,
582-
in: :pr:`17772` by :user:`Maria Telenczuk <maikia>` and
583-
:user:`Alexandre Gramfort <agramfort>`.
584-
Same for :class:`linear_model.BayesianRidge`,
585-
:class:`linear_model.ARDRegression` in:
586-
:pr:`17746` by :user:`Maria Telenczuk <maikia>`.
587-
Same for :class:`linear_model.Lasso`, :class:`linear_model.LassoCV`,
588-
:class:`linear_model.ElasticNet`, :class:`linear_model.ElasticNetCV`,
589-
:class:`linear_model.MultiTaskLasso`, :class:`linear_model.MultiTaskLassoCV`,
590-
:class:`linear_model.MultiTaskElasticNet`,
591-
:class:`linear_model.MultiTaskElasticNetCV`, in:
592-
:pr:`17785` by :user:`Maria Telenczuk <maikia>` and
593-
:user:`Alexandre Gramfort <agramfort>`.
594-
595-
- The ``normalize`` parameter of :class:`linear_model.OrthogonalMatchingPursuit`
596-
:class:`linear_model.OrthogonalMatchingPursuitCV` will default to
597-
False in 1.2 and will be removed in 1.4.
598-
:pr:`17750` by :user:`Maria Telenczuk <maikia>` and
599-
:user:`Alexandre Gramfort <agramfort>`.
600-
Same for :class:`linear_model.Lars`
601-
:class:`linear_model.LarsCV` :class:`linear_model.LassoLars`
602-
:class:`linear_model.LassoLarsCV` :class:`linear_model.LassoLarsIC`,
603-
in :pr:`17769` by :user:`Maria Telenczuk <maikia>` and
604-
:user:`Alexandre Gramfort <agramfort>`.
572+
Same for :class:`~linear_model.Ridge`,
573+
:class:`~linear_model.RidgeClassifier`, :class:`~linear_model.RidgeCV`, and
574+
:class:`~linear_model.RidgeClassifierCV`, in: :pr:`17772` by :user:`Maria
575+
Telenczuk <maikia>` and :user:`Alexandre Gramfort <agramfort>`. Same for
576+
:class:`~linear_model.BayesianRidge`, :class:`~linear_model.ARDRegression`
577+
in: :pr:`17746` by :user:`Maria Telenczuk <maikia>`. Same for
578+
:class:`~linear_model.Lasso`, :class:`~linear_model.LassoCV`,
579+
:class:`~linear_model.ElasticNet`, :class:`~linear_model.ElasticNetCV`,
580+
:class:`~linear_model.MultiTaskLasso`,
581+
:class:`~linear_model.MultiTaskLassoCV`,
582+
:class:`~linear_model.MultiTaskElasticNet`,
583+
:class:`~linear_model.MultiTaskElasticNetCV`, in: :pr:`17785` by :user:`Maria
584+
Telenczuk <maikia>` and :user:`Alexandre Gramfort <agramfort>`.
585+
586+
- |API| The ``normalize`` parameter of
587+
:class:`~linear_model.OrthogonalMatchingPursuit` and
588+
:class:`~linear_model.OrthogonalMatchingPursuitCV` will default to False in
589+
1.2 and will be removed in 1.4. :pr:`17750` by :user:`Maria Telenczuk
590+
<maikia>` and :user:`Alexandre Gramfort <agramfort>`. Same for
591+
:class:`~linear_model.Lars` :class:`~linear_model.LarsCV`
592+
:class:`~linear_model.LassoLars` :class:`~linear_model.LassoLarsCV`
593+
:class:`~linear_model.LassoLarsIC`, in :pr:`17769` by :user:`Maria Telenczuk
594+
<maikia>` and :user:`Alexandre Gramfort <agramfort>`.
605595

606596
- |API| Keyword validation has moved from `__init__` and `set_params` to `fit`
607597
for the following estimators conforming to scikit-learn's conventions:
608-
:class:`linear_model.SGDClassifier`,
609-
:class:`linear_model.SparseSGDClassifier`,
610-
:class:`linear_model.SGDRegressor`,
611-
:class:`linear_model.SparseSGDRegressor`,
612-
:class:`linear_model.SGDOneClassSVM`,
613-
:class:`linear_model.SparseSGDOneClassSVM`,
614-
:class:`linear_model.PassiveAggressiveClassifier`,
615-
:class:`linear_model.PassiveAggressiveRegressor`.
598+
:class:`~linear_model.SGDClassifier`,
599+
:class:`~linear_model.SGDRegressor`,
600+
:class:`~linear_model.SGDOneClassSVM`,
601+
:class:`~linear_model.PassiveAggressiveClassifier`, and
602+
:class:`~linear_model.PassiveAggressiveRegressor`.
616603
:pr:`20683` by `Guillaume Lemaitre`_.
617604

618605
:mod:`sklearn.manifold`
@@ -669,9 +656,9 @@ Changelog
669656
:pr:`18328` by :user:`Albert Villanova del Moral <albertvillanova>` and
670657
:user:`Alonso Silva Allende <alonsosilvaallende>`.
671658

672-
- |Fix| avoid overflow in :func:`metrics.cluster.adjust_rand_score` with large
673-
amount of data.
674-
:pr:`20312` by :user:`Divyanshu Deoli <divyanshudeoli>`.
659+
- |Fix| avoid overflow in :func:`metrics.cluster.adjusted_rand_score` with
660+
large amount of data. :pr:`20312` by :user:`Divyanshu Deoli
661+
<divyanshudeoli>`.
675662

676663
- |API| :class:`metrics.ConfusionMatrixDisplay` exposes two class methods
677664
:func:`~metrics.ConfusionMatrixDisplay.from_estimator` and
@@ -755,7 +742,7 @@ Changelog
755742

756743
- |FIX| :class:`neighbors.NearestNeighbors`, :class:`neighbors.KNeighborsClassifier`,
757744
:class:`neighbors.RadiusNeighborsClassifier`, :class:`neighbors.KNeighborsRegressor`
758-
and :class:`neighbors.RadiusNeighborsRegressor` does not validate `weights` in
745+
and :class:`neighbors.RadiusNeighborsRegressor` do not validate `weights` in
759746
`__init__` and validates `weights` in `fit` instead. :pr:`20072` by
760747
:user:`Juan Carlos Alfaro Jiménez <alfaro96>`.
761748

@@ -774,9 +761,8 @@ Changelog
774761
.......................
775762

776763
- |API| The `predict_proba` and `predict_log_proba` methods of the
777-
:class:`Pipeline` class now support passing prediction kwargs to
778-
the final estimator.
779-
:pr:`19790` by :user:`Christopher Flynn <crflynn>`.
764+
:class:`pipeline.Pipeline` now support passing prediction kwargs to the final
765+
estimator. :pr:`19790` by :user:`Christopher Flynn <crflynn>`.
780766

781767
:mod:`sklearn.preprocessing`
782768
............................
@@ -804,13 +790,22 @@ Changelog
804790
a tuple to `degree`, i.e. `degree=(min_degree, max_degree)`.
805791
:pr:`20250` by :user:`Christian Lorentzen <lorentzenchr>`.
806792

807-
- |Efficiency| `preprocessing.StandardScaler` is faster and more memory
793+
- |Efficiency| :class:`preprocessing.StandardScaler` is faster and more memory
808794
efficient. :pr:`20652` by `Thomas Fan`_.
809795

810796
- |Efficiency| Changed ``algorithm`` argument for :class:`cluster.KMeans` in
811797
:class:`preprocessing.KBinsDiscretizer` from ``auto`` to ``full``.
812798
:pr:`19934` by :user:`Gleb Levitskiy <GLevV>`.
813799

800+
- |Efficiency| The implementation of `fit` for
801+
:class:`preprocessing.PolynomialFeatures` transformer is now faster. This is
802+
especially noticeable on large sparse input. :pr:`19734` by :user:`Fred
803+
Robinson <frrad>`.
804+
805+
- |Fix| The :func:`preprocessing.StandardScaler.inverse_transform` method
806+
now raises error when the input data is 1D. :pr:`19752` by :user:`Zhehao Liu
807+
<Max1993Liu>`.
808+
814809
- |Fix| :func:`preprocessing.scale`, :class:`preprocessing.StandardScaler`
815810
and similar scalers detect near-constant features to avoid scaling them to
816811
very large values. This problem happens in particular when using a scaler on
@@ -823,7 +818,7 @@ Changelog
823818
correctly handles integer dtypes. :pr:`19356` by :user:`makoeppel`.
824819

825820
- |Fix| :meth:`preprocessing.OrdinalEncoder.inverse_transform` is not
826-
supporting sparse matrix and raise the appropriate error message.
821+
supporting sparse matrix and raises the appropriate error message.
827822
:pr:`19879` by :user:`Guillaume Lemaitre <glemaitre>`.
828823

829824
- |Fix| The `fit` method of :class:`preprocessing.OrdinalEncoder` will not
@@ -836,14 +831,14 @@ Changelog
836831
(`np.float64` or ` 1241 np.int64`).
837832
:pr:`20727` by `Guillaume Lemaitre`_.
838833

834+
- |Fix| :class:`preprocessing.FunctionTransformer` does not set `n_features_in_`
835+
based on the input to `inverse_transform`. :pr:`20961` by `Thomas Fan`_.
836+
839837
- |API| The `n_input_features_` attribute of
840838
:class:`preprocessing.PolynomialFeatures` is deprecated in favor of
841839
`n_features_in_` and will be removed in 1.2. :pr:`20240` by
842840
:user:`Jérémie du Boisberranger <jeremiedbb>`.
843841

844-
- |Fix| :class:`preprocessing.FunctionTransformer` does not set `n_features_in_`
845-
based on the input to `inverse_transform`. :pr:`20961` by `Thomas Fan`_.
846-
847842
:mod:`sklearn.svm`
848843
...................
849844

@@ -887,17 +882,18 @@ Changelog
887882
:pr:`19948` by `Joel Nothman`_.
888883

889884
- |Enhancement| :func:`utils.validation.check_is_fitted` now uses
890-
``__sklearn_is_fitted__`` if available, instead of checking for attributes ending with
891-
an underscore. This also makes :class:`Pipeline` and
885+
``__sklearn_is_fitted__`` if available, instead of checking for attributes
886+
ending with an underscore. This also makes :class:`pipeline.Pipeline` and
892887
:class:`preprocessing.FunctionTransformer` pass
893888
``check_is_fitted(estimator)``. :pr:`20657` by `Adrin Jalali`_.
894889

895890
- |Fix| Fixed a bug in :func:`utils.sparsefuncs.mean_variance_axis` where the
896891
precision of the computed variance was very poor when the real variance is
897892
exactly zero. :pr:`19766` by :user:`Jérémie du Boisberranger <jeremiedbb>`.
898893

899-
- |Fix| Propreties that are decorated with :func:`utils.deprecated` correctly
900-
wraps the property's docstring. :pr:`20385` by `Thomas Fan`_.
894+
- |Fix| The docstrings of propreties that are decorated with
895+
:func:`utils.deprecated` are now properly wrapped. :pr:`20385` by `Thomas
896+
Fan`_.
901897

902898
- |Fix| :func:`utils.stats._weighted_percentile` now correctly ignores
903899
zero-weighted observations smaller than the smallest observation with
@@ -920,6 +916,10 @@ Changelog
920916
`np.int64`).
921917
:pr:`20727` by `Guillaume Lemaitre`_.
922918

919+
- |Fix| Support for `np.matrix` is deprecated in
920+
:func:`~sklearn.utils.check_array` in 1.0 and will raise a `TypeError` in
921+
1.2. :pr:`20165` by `Thomas Fan`_.
922+
923923
- |API| :func:`utils._testing.assert_warns` and
924924
:func:`utils._testing.assert_warns_message` are deprecated in 1.0 and will
925925
be removed in 1.2. Used `pytest.warns` context manager instead. Note that
@@ -930,13 +930,6 @@ Changelog
930930
now deprecated. Use `scipy.sparse.csgraph.shortest_path` instead. :pr:`20531`
931931
by `Tom Dupre la Tour`_.
932932

933-
:mod:`sklearn.validation`
934-
.........................
935-
936-
- |Fix| Support for `np.matrix` is deprecated in
937-
:func:`~sklearn.utils.check_array` in 1.0 and will raise a `TypeError` in
938-
1.2. :pr:`20165` by `Thomas Fan`_.
939-
940933
Code and Documentation Contributors
941934
-----------------------------------
942935

0 commit comments

Comments
 (0)
0