8000 DOC add versionadded versionchanged v0.19 (#16233) · NicolasHug/scikit-learn@5e2d74b · GitHub
[go: up one dir, main page]

Skip to content

Commit 5e2d74b

Browse files
DOC add versionadded versionchanged v0.19 (scikit-learn#16233)
* added v0.19.1 and wip v0.19 * finished adding vchanged strings for v0.19 Towards scikit-learn#15426 @adrinjalali #wimlds #scikitlearnsprint * fixing linter issues * caught line issues with flake8 * caught the last line issue * added lines and cleaned gtiignore * Update sklearn/multiclass.py Co-Authored-By: Thomas J Fan <thomasjpfan@gmail.com> * Update sklearn/multiclass.py Co-Authored-By: Thomas J Fan <thomasjpfan@gmail.com> Co-authored-by: Thomas J Fan <thomasjpfan@gmail.com>
1 parent bd9fd0f commit 5e2d74b

File tree

7 files changed

+38
-0
lines changed

7 files changed

+38
-0
lines changed

sklearn/decomposition/_lda.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@ class LatentDirichletAllocation(TransformerMixin, BaseEstimator):
143143
n_components : int, optional (default=10)
144144
Number of topics.
145145
146+
.. versionchanged:: 0.19
147+
``n_topics `` was renamed to ``n_components``
148+
146149
doc_topic_prior : float, optional (default=None)
147150
Prior of document topic distribution `theta`. If the value is None,
148151
defaults to `1 / n_components`.

sklearn/feature_extraction/_hash.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ class FeatureHasher(TransformerMixin, BaseEstimator):
6969
approximately conserve the inner product in the hashed space even for
7070
small n_features. This approach is similar to sparse random projection.
7171
72+
.. versionchanged:: 0.19
73+
``alternate_sign`` replaces the now deprecated ``non_negative``
74+
parameter.
75+
7276
Examples
7377
--------
7478
>>> from sklearn.feature_extraction import FeatureHasher

sklearn/model_selection/_search.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,6 +1002,11 @@ class GridSearchCV(BaseSearchCV):
10021002
expensive and is not strictly required to select the parameters that
10031003
yield the best generalization performance.
10041004
1005+
.. versionadded:: 0.19
1006+
1007+
.. versionchanged:: 0.21
1008+
Default value was changed from ``True`` to ``False``
1009+
10051010
10061011
Examples
10071012
--------
@@ -1338,6 +1343,11 @@ class RandomizedSearchCV(BaseSearchCV):
13381343
expensive and is not strictly required to select the parameters that
13391344
yield the best generalization performance.
13401345
1346+
.. versionadded:: 0.19
1347+
1348+
.. versionchanged:: 0.21
1349+
Default value was changed from ``True`` to ``False``
1350+
13411351
Attributes
13421352
----------
13431353
cv_results_ : dict of numpy (masked) ndarrays

sklearn/model_selection/_validation.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,11 @@ def cross_validate(estimator, X, y=None, groups=None, scoring=None, cv=None,
134134
expensive and is not strictly required to select the parameters that
135135
yield the best generalization performance.
136136
137+
.. versionadded:: 0.19
138+
139+
.. versionchanged:: 0.21
140+
Default value was changed from ``True`` to ``False``
141+
137142
return_estimator : bool, default=False
138143
Whether to return the estimators fitted on each split.
139144

sklearn/multiclass.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,10 @@ def decision_function(self, X):
390390
Returns
391391
-------
392392
T : array-like of shape (n_samples, n_classes)
393+
394+
.. versionchanged:: 0.19
395+
output shape changed to ``(n_samples,)`` to conform to
396+
scikit-learn conventions for binary classification.
393397
"""
394398
check_is_fitted(self)
395399
if len(self.estimators_) == 1:
@@ -643,6 +647,10 @@ def decision_function(self, X):
643647
Returns
644648
-------
645649
Y : array-like of shape (n_samples, n_classes)
650+
651+
.. versionchanged:: 0.19
652+
output shape changed to ``(n_samples,)`` to conform to
653+
scikit-learn conventions for binary classification.
646654
"""
647655
check_is_fitted(self)
648656

sklearn/multioutput.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,11 @@ def predict_proba(self):
362362
such arrays if n_outputs > 1.
363363
The class probabilities of the input samples. The order of the
364364
classes corresponds to that in the attribute :term:`classes_`.
365+
366+
.. versionchanged:: 0.19
367+
This function now returns a list of arrays where the length of
368+
the list is ``n_outputs``, and each array is (``n_samples``,
369+
``n_classes``) for that particular output.
365370
"""
366371
check_is_fitted(self)
367372
if not all([hasattr(estimator, "predict_proba")

sklearn/neighbors/_nearest_centroid.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ class NearestCentroid(ClassifierMixin, BaseEstimator):
4141
If the "manhattan" metric is provided, this centroid is the median and
4242
for all other metrics, the centroid is now set to be the mean.
4343
44+
.. versionchanged:: 0.19
45+
``metric='precomputed'`` was deprecated and now raises an error
46+
4447
shrink_threshold : float, default=None
4548
Threshold for shrinking centroids to remove features.
4649

0 commit comments

Comments
 (0)
0