@@ -506,33 +506,30 @@ Changelog
506
506
:pr: `16449 ` by :user: `Christian Lorentzen <lorentzenchr> `.
507
507
508
508
- |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> `.
513
512
514
513
- |Efficiency | The implementation of :class: `linear_model.LogisticRegression `
515
514
has been optimised for dense matrices when using `solver='newton-cg' ` and
516
515
`multi_class!='multinomial' `.
517
516
:pr: `19571 ` by :user: `Julien Jerphanion <jjerphan> `.
518
517
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
-
523
518
- |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> `.
526
523
527
524
- |Enhancement | Validate user-supplied gram matrix passed to linear models
528
525
via the `precompute ` argument. :pr: `19004 ` by :user: `Adam Midvidy <amidvidy> `.
529
526
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 `_.
532
529
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> `
536
533
537
534
- |Fix | `sample_weight ` are now fully taken into account in linear models
538
535
when `normalize=True ` for both feature centering and feature
@@ -545,74 +542,64 @@ Changelog
545
542
a model perfectly on some datasets when `residual_threshold=0 `.
546
543
:pr: `19499 ` by :user: `Gregory Strubel <gregorystrubel> `.
547
544
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> `.
555
548
556
549
- |Fix | The dictionary `params ` in :func: `linear_model.enet_path ` and
557
550
:func: `linear_model.lasso_path ` should only contain parameter of the
558
551
coordinate descent solver. Otherwise, an error will be raised.
559
552
:pr: `19391 ` by :user: `Shao Yang Hong <hongshaoyang> `.
560
553
561
554
- |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> `.
565
558
566
559
- |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
579
571
: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> `.
605
595
606
596
- |API | Keyword validation has moved from `__init__ ` and `set_params ` to `fit `
607
597
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 `.
616
603
:pr: `20683 ` by `Guillaume Lemaitre `_.
617
604
618
605
:mod: `sklearn.manifold `
@@ -669,9 +656,9 @@ Changelog
669
656
:pr: `18328 ` by :user: `Albert Villanova del Moral <albertvillanova> ` and
670
657
:user: `Alonso Silva Allende <alonsosilvaallende> `.
671
658
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> `.
675
662
676
663
- |API | :class: `metrics.ConfusionMatrixDisplay ` exposes two class methods
677
664
:func: `~metrics.ConfusionMatrixDisplay.from_estimator ` and
@@ -755,7 +742,7 @@ Changelog
755
742
756
743
- |FIX | :class: `neighbors.NearestNeighbors `, :class: `neighbors.KNeighborsClassifier `,
757
744
: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
759
746
`__init__ ` and validates `weights ` in `fit ` instead. :pr: `20072 ` by
760
747
:user: `Juan Carlos Alfaro Jiménez <alfaro96> `.
761
748
@@ -774,9 +761,8 @@ Changelog
774
761
.......................
775
762
776
763
- |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> `.
780
766
781
767
:mod: `sklearn.preprocessing `
782
768
............................
@@ -804,13 +790,22 @@ Changelog
804
790
a tuple to `degree `, i.e. `degree=(min_degree, max_degree) `.
805
791
:pr: `20250 ` by :user: `Christian Lorentzen <lorentzenchr> `.
806
792
807
- - |Efficiency | `preprocessing.StandardScaler ` is faster and more memory
793
+ - |Efficiency | :class: `preprocessing.StandardScaler ` is faster and more memory
808
794
efficient. :pr: `20652 ` by `Thomas Fan `_.
809
795
810
796
- |Efficiency | Changed ``algorithm `` argument for :class: `cluster.KMeans ` in
811
797
:class: `preprocessing.KBinsDiscretizer ` from ``auto `` to ``full ``.
812
798
:pr: `19934 ` by :user: `Gleb Levitskiy <GLevV> `.
813
799
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
+
814
809
- |Fix | :func: `preprocessing.scale `, :class: `preprocessing.StandardScaler `
815
810
and similar scalers detect near-constant features to avoid scaling them to
816
811
very large values. This problem happens in particular when using a scaler on
@@ -823,7 +818,7 @@ Changelog
823
818
correctly handles integer dtypes. :pr: `19356 ` by :user: `makoeppel `.
824
819
825
820
- |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.
827
822
:pr: `19879 ` by :user: `Guillaume Lemaitre <glemaitre> `.
828
823
829
824
- |Fix | The `fit ` method of :class: `preprocessing.OrdinalEncoder ` will not
@@ -836,14 +831,14 @@ Changelog
836
831
(`np.float64 ` or `
1241
np.int64 `).
837
832
:pr: `20727 ` by `Guillaume Lemaitre `_.
838
833
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
+
839
837
- |API | The `n_input_features_ ` attribute of
840
838
:class: `preprocessing.PolynomialFeatures ` is deprecated in favor of
841
839
`n_features_in_ ` and will be removed in 1.2. :pr: `20240 ` by
842
840
:user: `Jérémie du Boisberranger <jeremiedbb> `.
843
841
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
-
847
842
:mod: `sklearn.svm `
848
843
...................
849
844
@@ -887,17 +882,18 @@ Changelog
887
882
:pr: `19948 ` by `Joel Nothman `_.
888
883
889
884
- |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
892
887
:class: `preprocessing.FunctionTransformer ` pass
893
888
``check_is_fitted(estimator) ``. :pr: `20657 ` by `Adrin Jalali `_.
894
889
895
890
- |Fix | Fixed a bug in :func: `utils.sparsefuncs.mean_variance_axis ` where the
896
891
precision of the computed variance was very poor when the real variance is
897
892
exactly zero. :pr: `19766 ` by :user: `Jérémie du Boisberranger <jeremiedbb> `.
898
893
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 `_.
901
897
902
898
- |Fix | :func: `utils.stats._weighted_percentile ` now correctly ignores
903
899
zero-weighted observations smaller than the smallest observation with
@@ -920,6 +916,10 @@ Changelog
920
916
`np.int64 `).
921
917
:pr: `20727 ` by `Guillaume Lemaitre `_.
922
918
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
+
923
923
- |API | :func: `utils._testing.assert_warns ` and
924
924
:func: `utils._testing.assert_warns_message ` are deprecated in 1.0 and will
925
925
be removed in 1.2. Used `pytest.warns ` context manager instead. Note that
@@ -930,13 +930,6 @@ Changelog
930
930
now deprecated. Use `scipy.sparse.csgraph.shortest_path ` instead. :pr: `20531 `
931
931
by `Tom Dupre la Tour `_.
932
932
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
-
940
933
Code and Documentation Contributors
941
934
-----------------------------------
942
935
0 commit comments