Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[MRG] DOC Version added and changed labels added for v0.18 (#wimlds) #16222

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions sklearn/cluster/_kmeans.py
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,9 @@ class KMeans(TransformerMixin, ClusterMixin, BaseEstimator):
For now "auto" (kept for backward compatibiliy) chooses "elkan" but it
might change in the future for a better heuristic.

.. versionchanged:: 0.18
Added Elkan algorithm

Attributes
----------
cluster_centers_ : ndarray of shape (n_clusters, n_features)
Expand Down
4 changes: 4 additions & 0 deletions sklearn/ensemble/_voting.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ class VotingClassifier(ClassifierMixin, _BaseVoting):
``-1`` means using all processors. See :term:`Glossary <n_jobs>`
for more details.

.. versionadded:: 0.18

flatten_transform : bool, default=True
Affects shape of transform output only when voting='soft'
If voting='soft' and flatten_transform=True, transform method returns
Expand Down Expand Up @@ -232,6 +234,8 @@ def fit(self, X, y, sample_weight=None):
Note that this is supported only if all underlying estimators
support sample weights.

.. versionadded:: 0.18

Returns
-------
self : object
Expand Down
2 changes: 2 additions & 0 deletions sklearn/feature_selection/_rfe.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,8 @@ class RFECV(RFE):
``-1`` means using all processors. See :term:`Glossary <n_jobs>`
for more details.

.. versionadded:: 0.18

Attributes
----------
n_features_ : int
Expand Down
4 changes: 4 additions & 0 deletions sklearn/feature_selection/_univariate_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,8 @@ class SelectPercentile(_BaseFilter):
Default is f_classif (see below "See also"). The default function only
works with classification tasks.

.. versionadded:: 0.18

percentile : int, optional, default=10
Percent of features to keep.

Expand Down Expand Up @@ -467,6 +469,8 @@ class SelectKBest(_BaseFilter):
Default is f_classif (see below "See also"). The default function only
works with classification tasks.

.. versionadded:: 0.18

k : int or "all", optional, default=10
Number of top features to select.
The "all" option bypasses selection, for use in a parameter search.
Expand Down
4 changes: 4 additions & 0 deletions sklearn/linear_model/_ransac.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ class RANSACRegressor(MetaEstimatorMixin, RegressorMixin,
If the loss on a sample is greater than the ``residual_threshold``,
then this sample is classified as an outlier.

.. versionadded:: 0.18

random_state : int, RandomState instance, default=None
The generator used to initialize the centers.
Pass an int for reproducible output across multiple function calls.
Expand Down Expand Up @@ -239,6 +241,8 @@ def fit(self, X, y, sample_weight=None):
raises error if sample_weight is passed and base_estimator
fit method does not support it.

.. versionadded:: 0.18

Raises
------
ValueError
Expand Down
5 changes: 5 additions & 0 deletions sklearn/metrics/_classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,8 @@ def confusion_matrix(y_true, y_pred, *, labels=None, sample_weight=None,
sample_weight : array-like of shape (n_samples,), default=None
Sample weights.

.. versionadded:: 0.18

normalize : {'true', 'pred', 'all'}, default=None
Normalizes confusion matrix over the true (rows), predicted (columns)
conditions or all the population. If None, confusion matrix will not be
Expand Down Expand Up @@ -789,6 +791,8 @@ def matthews_corrcoef(y_true, y_pred, *, sample_weight=None):
sample_weight : array-like of shape (n_samples,), default=None
Sample weights.

.. versionadded:: 0.18

Returns
-------
mcc : float
Expand Down Expand Up @@ -2156,6 +2160,7 @@ def log_loss(y_true, y_pred, *, eps=1e-15, normalize=True, sample_weight=None,
If not provided, labels will be inferred from y_true. If ``labels``
is ``None`` and ``y_pred`` has shape (n_samples,) the labels are
assumed to be binary and are inferred from ``y_true``.

.. versionadded:: 0.18

Returns
Expand Down
2 changes: 2 additions & 0 deletions sklearn/metrics/cluster/_supervised.py
Original file line number Diff line number Diff line change
Expand Up @@ -881,6 +881,8 @@ def normalized_mutual_info_score(labels_true, labels_pred, *,
def fowlkes_mallows_score(labels_true, labels_pred, *, sparse=False):
"""Measure the similarity of two clusterings of a set of points.

.. versionadded:: 0.18

The Fowlkes-Mallows index (FMI) is defined as the geometric mean between of
the precision and recall::

Expand Down
2 changes: 2 additions & 0 deletions sklearn/model_selection/_split.py
Original file line number Diff line number Diff line change
Expand Up @@ -739,6 +739,8 @@ def split(self, X, y, groups=None):
class TimeSeriesSplit(_BaseKFold):
"""Time Series cross-validator

.. versionadded:: 0.18

Provides train/test indices to split time series data samples
that are observed at fixed time intervals, in train/test sets.
In each split, test indices must be higher than before, and thus shuffling
Expand Down
2 changes: 2 additions & 0 deletions sklearn/multioutput.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,8 @@ class MultiOutputRegressor(RegressorMixin, _MultiOutputEstimator):
simple strategy for extending regressors that do not natively support
multi-target regression.

.. versionadded:: 0.18

Parameters
----------
estimator : estimator object
Expand Down
4 changes: 4 additions & 0 deletions sklearn/preprocessing/_function_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,13 @@ class FunctionTransformer(TransformerMixin, BaseEstimator):
kw_args : dict, optional
Dictionary of additional keyword arguments to pass to func.

.. versionadded:: 0.18

inv_kw_args : dict, optional
Dictionary of additional keyword arguments to pass to inverse_func.

.. versionadded:: 0.18

Examples
--------
>>> import numpy as np
Expand Down
4 changes: 4 additions & 0 deletions sklearn/svm/_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,8 @@ def fit(self, X, y, sample_weight=None):
samples. If not provided,
then each sample is given unit weight.

.. versionadded:: 0.18

Returns
-------
self : object
Expand Down Expand Up @@ -398,6 +400,8 @@ def fit(self, X, y, sample_weight=None):
samples. If not provided,
then each sample is given unit weight.

.. versionadded:: 0.18

Returns
-------
self : object
Expand Down