8000 DOC move fixes from 1.1 to 1.0.2 (#22070) · scikit-learn/scikit-learn@c7b02f5 · GitHub
[go: up one dir, main page]

Skip to content

Commit c7b02f5

Browse files
committed
DOC move fixes from 1.1 to 1.0.2 (#22070)
1 parent 350bbf8 commit c7b02f5

File tree

2 files changed

+158
-72
lines changed

2 files changed

+158
-72
lines changed

doc/whats_new/v1.0.rst

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,14 @@ Changelog
2424

2525
- |Fix| Fixed an infinite loop in :func:`cluster.SpectralClustering` by
2626
moving an iteration counter from try to except.
27-
:pr:`21271` by :user:`Tyler Martin <martintb>`
27+
:pr:`21271` by :user:`Tyler Martin <martintb>`.
28+
29+
:mod:`sklearn.datasets`
30+
.......................
31+
32+
- |Fix| :func:`datasets.fetch_openml` is now thread safe. Data is first
33+
downloaded to a temporary subfolder and then renamed.
34+
:pr:`21833` by :user:`Siavash Rezazadeh <siavrez>`.
2835

2936
:mod:`sklearn.decomposition`
3037
............................
@@ -35,13 +42,45 @@ Changelog
3542
and :class:`decomposition.MiniBatchSparsePCA` to be convex and match the referenced
3643
article. :pr:`19210` by :user:`Jérémie du Boisberranger <jeremiedbb>`.
3744

45+
:mod:`sklearn.ensemble`
46+
.......................
47+
48+
- |Fix| :class:`ensemble.RandomForestClassifier`,
49+
:class:`ensemble.RandomForestRegressor`,
50+
:class:`ensemble.ExtraTreesClassifier`, :class:`ensemble.ExtraTreesRegressor`,
51+
and :class:`ensemble.RandomTreesEmbedding` now raise a ``ValueError`` when
52+
``bootstrap=False`` and ``max_samples`` is not ``None``.
53+
:pr:`21295` :user:`Haoyin Xu <PSSF23>`.
54+
55+
- |Fix| Solve a bug in :class:`ensemble.GradientBoostingClassifier` where the
56+
exponential loss was computing the positive gradient instead of the
57+
negative one.
58+
:pr:`22050` by :user:`Guillaume Lemaitre <glemaitre>`.
59+
3860
:mod:`sklearn.feature_selection`
3961
................................
4062

4163
- |Fix| Fixed :class:`feature_selection.SelectFromModel` by improving support
4264
for base estimators that do not set `feature_names_in_`. :pr:`21991` by
4365
`Thomas Fan`_.
4466

67+
:mod:`sklearn.impute`
68+
.....................
69+
70+
- |Fix| Fix a bug in :class:`linear_model.RidgeClassifierCV` where the method
71+
`predict` was performing an `argmax` on the scores obtained from
72+
`decision_function` instead of returning the multilabel indicator matrix.
73+
:pr:`19869` by :user:`Guillaume Lemaitre <glemaitre>`.
74+
75+
:mod:`sklearn.linear_model`
76+
...........................
77+
78+
- |Fix| :class:`linear_model.LassoLarsIC` now correctly computes AIC
79+
and BIC. An error is now raised when `n_features > n_samples` and
80+
when the noise variance is not provided.
81+
:pr:`21481` by :user:`Guillaume Lemaitre <glemaitre>` and
82+
:user:`Andrés Babino <ababino>`.
83+
4584
:mod:`sklearn.manifold`
4685
.......................
4786

@@ -77,12 +116,25 @@ Changelog
77116
- |Fix| Fixes compatibility bug with NumPy 1.22 in :class:`preprocessing.OneHotEncoder`.
78117
:pr:`21517` by `Thomas Fan`_.
79118

119+
:mod:`sklearn.svm`
120+
..................
121+
122+
- |Fix| :class:`smv.NuSVC`, :class:`svm.NuSVR`, :class:`svm.SVC`,
123+
:class:`svm.SVR`, :class:`svm.OneClassSVM` now validate input
124+
parameters in `fit` instead of `__init__`.
125+
:pr:`21436` by :user:`Haidar Almubarak <Haidar13 >`.
126+
80127
:mod:`sklearn.tree`
81128
...................
82129

83130
- |Fix| Prevents :func:`tree.plot_tree` from drawing out of the boundary of
84131
the figure. :pr:`21917` by `Thomas Fan`_.
85132

133+
- |Fix| Support loading pickles of decision tree models when the pickle has
134+
been generated on a platform with a different bitness. A typical example is
135+
to train and pickle the model on 64 bit machine and load the model on a 32
136+
bit machine for prediction. :pr:`21552` by :user:`Loïc Estève <lesteve>`.
137+
86138
:mod:`sklearn.utils`
87139
....................
88140

doc/whats_new/v1.1.rst

Lines changed: 105 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,17 @@ Changelog
7676
- |Fix| :func:`datasets.fetch_openml` is now thread safe. Data is first downloaded
7777
to a temporary subfolder and then renamed.
7878
:pr:`21833` by :user:`Siavash Rezazadeh <siavrez>`.
79+
- |Enhancement| :func:`datasets.load_diabetes` now accepts the parameter
80+
``scaled``, to allow loading unscaled data. The scaled version of this
81+
dataset is now computed from the unscaled data, and can produce slightly
82+
different different results that in previous version (within a 1e-4 absolute
83+
tolerance).
84+
:pr:`16605` by :user:`Mandy Gu <happilyeverafter95>`.
85+
86+
- |Enhancement| :func:`datasets.fetch_openml` now has two optional arguments
87+
`n_retries` and `delay`. By default, :func:`datasets.fetch_openml` will retry
88+
3 times in case of a network failure with a delay between each try.
89+
:pr:`21901` by :user:`Rileran <rileran>`.
7990

8091
:mod:`sklearn.decomposition`
8192
............................
@@ -85,18 +96,6 @@ Changelog
8596
get accurate results when the number of features is large.
8697
:pr:`21109` by :user:`Smile <x-shadow-man>`.
8798

88-
- |Fix| :class:`decomposition.FastICA` now validates input parameters in `fit` instead of `__init__`.
89-
:pr:`21432` by :user:`Hannah Bohle <hhnnhh>` and :user:`Maren Westermann <marenwestermann>`.
90-
91-
- |Fix| :class:`decomposition.FactorAnalysis` now validates input parameters
92-
in `fit` instead of `__init__`.
93-
:pr:`21713` by :user:`Haya <HayaAlmutairi>` and
94-
:user:`Krum Arnaudov <krumeto>`.
95-
96-
- |Fix| :class:`decomposition.KernelPCA` now validates input parameters in
97-
`fit` instead of `__init__`.
98-
:pr:`21567` by :user:`Maggie Chege <MaggieChege>`.
99-
10099
- |API| Adds :term:`get_feature_names_out` to all transformers in the
101100
:mod:`~sklearn.decomposition` module:
102101
:class:`~sklearn.decomposition.DictionaryLearning`,
@@ -118,16 +117,23 @@ Changelog
118117
(which behaves like `'arbitrary-variance'`) to `'unit-variance'` in version 1.3.
119118
:pr:`19490` by :user:`Facundo Ferrin <fferrin>` and :user:`Julien Jerphanion <jjerphan>`
120119

120+
- |Fix| :class:`decomposition.FastICA` now validates input parameters in `fit`
121+
instead of `__init__`.
122+
:pr:`21432` by :user:`Hannah Bohle <hhnnhh>` and
123+
:user:`Maren Westermann <marenwestermann>`.
124+
125+
- |Fix| :class:`decomposition.FactorAnalysis` now validates input parameters
126+
in `fit` instead of `__init__`.
127+
:pr:`21713` by :user:`Haya <HayaAlmutairi>` and
128+
:user:`Krum Arnaudov <krumeto>`.
129+
130+
- |Fix| :class:`decomposition.KernelPCA` now validates input parameters in
131+
`fit` instead of `__init__`.
132+
:pr:`21567` by :user:`Maggie Chege <MaggieChege>`.
133+
121134
:mod:`sklearn.ensemble`
122135
.......................
123136

124-
- |Fix| :class:`ensemble.RandomForestClassifier`,
125-
:class:`ensemble.RandomForestRegressor`,
126-
:class:`ensemble.ExtraTreesClassifier`, :class:`ensemble.ExtraTreesRegressor`,
127-
and :class:`ensemble.RandomTreesEmbedding` now raise a ``ValueError`` when
128-
``bootstrap=False`` and ``max_samples`` is not ``None``.
129-
:pr:`21295` :user:`Haoyin Xu <PSSF23>`.
130-
131137
- |API| Changed the default of :func:`max_features` to 1.0 for
132138
:class:`ensemble.RandomForestRegressor` and to `"sqrt"` for
133139
:class:`ensemble.RandomForestClassifier`. Note that these give the same fit
@@ -137,10 +143,18 @@ Changelog
137143
:class:`ensemble.ExtraTreesClassifier`.
138144
:pr:`20803` by :user:`Brian Sun <bsun94>`.
139145

140-
- |Fix| Solve a bug in :class:`ensemble.GradientBoostingClassifier` where the
141-
exponential loss was computing the positive gradient instead of the
142-
negative one.
143-
:pr:`22050` by :user:`Guillaume Lemaitre <glemaitre>`.
146+
:mod:`sklearn.feature_extraction`
147+
.................................
148+
149+
- |API| :func:`decomposition.FastICA` now supports unit variance for whitening.
150+
The default value of its `whiten` argument will change from `True`
151+
(which behaves like `'arbitrary-variance'`) to `'unit-variance'` in version 1.3.
152+
:pr:`19490` by :user:`Facundo Ferrin <fferrin>` and
153+
:user:`Julien Jerphanion <jjerphan>`.
154+
155+
- |Fix| :class:`feature_extraction.FeatureHasher` now validates input parameters
156+
in `transform` instead of `__init__`. :pr:`21573` by
157+
:user:`Hannah Bohle <hhnnhh>` and :user:`Maren Westermann <marenwestermann>`.
144158

145159
:mod:`sklearn.feature_extraction.text`
146160
......................................
@@ -150,6 +164,17 @@ Changelog
150164
by our API.
151165
:pr:`21832` by :user:`Guillaume Lemaitre <glemaitre>`.
152166

167+
:mod:`sklearn.feature_selection`
168+
................................
169+
170+
- |Enhancement| Add a parameter `force_finite` to
171+
:func:`feature_selection.f_regression` and
172+
:func:`feature_selection.r_regression`. This parameter allows to force the
173+
output to be finite in the case where a feature or a the target is constant
174+
or that the feature and target are perfectly correlated (only for the
175+
F-statistic).
176+
:pr:`17819` by :user:`Juan Carlos Alfaro Jiménez <alfaro96>`.
177+
153178
:mod:`sklearn.impute`
154179
.....................
155180

@@ -168,6 +193,11 @@ Changelog
168193
`decision_function` instead of returning the multilabel indicator matrix.
169194
:pr:`19869` by :user:`Guillaume Lemaitre <glemaitre>`.
170195

196+
- |Enhancement| :class:`SimpleImputer` now warns with feature names
197+
when features which are skipped due to the lack of any observed
198+
values in the training set.
199+
:pr:`21617` by :user:`Christian Ritter <chritter>`.
200+
171201
- |Enhancement| :class:`linear_model.RidgeClassifier` is now supporting
172202
multilabel classification.
173203
:pr:`19689` by :user:`Guillaume Lemaitre <glemaitre>`.
@@ -186,12 +216,6 @@ Changelog
186216
for the highs based solvers.
187217
:pr:`21086` by :user:`Venkatachalam Natchiappan <venkyyuvy>`.
188218

189-
- |Fix| :class:`linear_model.LassoLarsIC` now correctly computes AIC
190-
and BIC. An error is now raised when `n_features > n_samples` and
191-
when the noise variance is not provided.
192-
:pr:`21481` by :user:`Guillaume Lemaitre <glemaitre>` and
193-
:user:`Andrés Babino <ababino>`.
194-
195219
:mod:`sklearn.metrics`
196220
......................
197221

@@ -203,7 +227,7 @@ Changelog
203227

204228
- |API| Parameters ``sample_weight`` and ``multioutput`` of :func:`metrics.
205229
mean_absolute_percentage_error` are now keyword-only, in accordance with `SLEP009
206-
<https://scikit-learn-enhancement-proposals.readthedocs.io/en/latest/slep009/proposal.html>`.
230+
<https://scikit-learn-enhancement-proposals.readthedocs.io/en/latest/slep009/proposal.html>`_.
207231
A deprecation cycle was introduced.
208232
:pr:`21576` by :user:`Paul-Emile Dugnat <pedugnat>`.
209233

@@ -222,9 +246,10 @@ Changelog
222246
splits failed. Similarly raise an error during grid-search when the fits for
223247
all the models and all the splits failed. :pr:`21026` by :user:`Loïc Estève <lesteve>`.
224248

225-
- |Fix| :class:`model_selection.GridSearchCV`, :class:`model_selection.HalvingGridSearchCV`
226-
now validate input parameters in `fit` instead of `__init__`.
227-
:pr:`21880` by :user:`Mrinal Tyagi <MrinalTyagi>`.
249+
- |Fix| :class:`model_selection.GridSearchCV`,
250+
:class:`model_selection.HalvingGridSearchCV`
251+
now validate input parameters in `fit` instead of `__init__`.
252+
:pr:`21880` by :user:`Mrinal Tyagi <MrinalTyagi>`.
228253

229254
:mod:`sklearn.mixture`
230255
......................
@@ -234,13 +259,34 @@ Changelog
234259
its square root.
235260
:pr:`22058` by :user:`Guillaume Lemaitre <glemaitre>`.
236261

262+
:mod:`sklearn.neighbors`
263+
........................
264+
265+
- |Enhancement| `utils.validation.check_array` and `utils.validation.type_of_target`
266+
now accept an `input_name` parameter to make the error message more
267+
informative when passed invalid input data (e.g. with NaN or infinite
268+
values).
269+
:pr:`21219` by :user:`Olivier Grisel <ogrisel>`.
270+
271+
- |Enhancement| :func:`utils.validation.check_array` returns a float
272+
ndarray with `np.nan` when passed a `Float32` or `Float64` pandas extension
273+
array with `pd.NA`. :pr:`21278` by `Thomas Fan`_.
274+
275+
- |Fix| :class:`neighbors.KernelDensity` now validates input parameters in `fit`
276+
instead of `__init__`. :pr:`21430` by :user:`Desislava Vasileva <DessyVV>` and
277+
:user:`Lucy Jimenez <LucyJimenez>`.
278+
237279
:mod:`sklearn.pipeline`
238280
.......................
239281

240282
- |Enhancement| Added support for "passthrough" in :class:`FeatureUnion`.
241283
Setting a transformer to "passthrough" will pass the features unchanged.
242284
:pr:`20860` by :user:`Shubhraneel Pal <shubhraneel>`.
243285

286+
- |Fix| :class:`pipeline.Pipeline` now does not validate hyper-parameters in
287+
`__init__` but in `.fit()`.
288+
:pr:`21888` by :user:`iofall <iofall>` and :user:`Arisa Y. <arisayosh>`.
289+
244290
:mod:`sklearn.preprocessing`
245291
............................
246292

@@ -253,13 +299,35 @@ Changelog
253299
instead of `__init__`.
254300
:pr:`21434` by :user:`Krum Arnaudov <krumeto>`.
255301

302+
- |Enhancement| Added the `get_feature_names_out` method and a new parameter
303+
`feature_names_out` to :class:`preprocessing.FunctionTransformer`. You can set
304+
`feature_names_out` to 'one-to-one' to use the input features names as the
305+
output feature names, or you can set it to a callable that returns the output
306+
feature names. This is especially useful when the transformer changes the
307+
number of features. If `feature_names_out` is None (which is the default),
308+
then `get_output_feature_names` is not defined.
309+
:pr:`21569` by :user:`Aurélien Geron <ageron>`.
310+
311+
- |Fix| :class:`preprocessing.LabelBinarizer` now validates input parameters in
312+
`fit` instead of `__init__`.
313+
:pr:`21434` by :user:`Krum Arnaudov <krumeto>`.
314+
315+
:mod:`sklearn.random_projection`
316+
................................
317+
318+
- |API| Adds :term:`get_feature_names_out` to all transformers in the
319+
:mod:`~sklearn.random_projection` module:
320+
:class:`~sklearn.random_projection.GaussianRandomProjection` and
321+
:class:`~sklearn.random_projection.SparseRandomProjection`. :pr:`21330` by
322+
:user:`Loïc Estève <lesteve>`.
323+
256324
:mod:`sklearn.svm`
257325
..................
258326

259-
- |Fix| :class:`smv.NuSVC`, :class:`svm.NuSVR`, :class:`svm.SVC`,
260-
:class:`svm.SVR`, :class:`svm.OneClassSVM` now validate input
261-
parameters in `fit` instead of `__init__`.
262-
:pr:`21436` by :user:`Haidar Almubarak <Haidar13 >`.
327+
- |Enhancement| :class:`svm.OneClassSVM`, :class:`svm.NuSVC`,
328+
:class:`svm.NuSVR`, :class:`svm.SVC` and :class:`svm.SVR` now expose
329+
`n_iter_`, the number of iterations of the libsvm optimization routine.
330+
:pr:`21408` by :user:`Juan Martín Loyola <jmloyola>`.
263331

264332
:mod:`sklearn.utils`
265333
....................
@@ -290,40 +358,6 @@ Changelog
290358
left corner of the HTML representation to show how the elements are
291359
clickable. :pr:`21298` by `Thomas Fan`_.
292360

293-
:mod:`sklearn.neighbors`
294-
........................
295-
296-
- |Fix| :class:`neighbors.KernelDensity` now validates input parameters in `fit`
297-
instead of `__init__`. :pr:`21430` by :user:`Desislava Vasileva <DessyVV>` and
298-
:user:`Lucy Jimenez <LucyJimenez>`.
299-
300-
- |Enhancement| `utils.validation.check_array` and `utils.validation.type_of_target`
301-
now accept an `input_name` parameter to make the error message more
302-
informative when passed invalid input data (e.g. with NaN or infinite
303-
values).
304-
:pr:`21219` by :user:`Olivier Grisel <ogrisel>`.
305-
306-
- |Enhancement| :func:`utils.validation.check_array` returns a float
307-
ndarray with `np.nan` when passed a `Float32` or `Float64` pandas extension
308-
array with `pd.NA`. :pr:`21278` by `Thomas Fan`_.
309-
310-
:mod:`sklearn.random_projection`
311-
................................
312-
313-
- |API| Adds :term:`get_feature_names_out` to all transformers in the
314-
:mod:`~sklearn.random_projection` module:
315-
:class:`~sklearn.random_projection.GaussianRandomProjection` and
316-
:class:`~sklearn.random_projection.SparseRandomProjection`. :pr:`21330` by
317-
:user:`Loïc Estève <lesteve>`.
318-
319-
:mod:`sklearn.tree`
320-
...................
321-
322-
- |Fix| Support loading pickles of decision tree models when the pickle has
323-
been generated on a platform with a different bitness. A typical example is
324-
to train and pickle the model on 64 bit machine and load the model on a 32
325-
bit machine for prediction. :pr:`21552` by :user:`Loïc Estève <lesteve>`.
326-
327361
Code and Documentation Contributors
328362
-----------------------------------
329363

0 commit comments

Comments
 (0)
0