diff --git a/sklearn/decomposition/_truncated_svd.py b/sklearn/decomposition/_truncated_svd.py index 13511cb7066b7..61aa529294da8 100644 --- a/sklearn/decomposition/_truncated_svd.py +++ b/sklearn/decomposition/_truncated_svd.py @@ -113,7 +113,8 @@ class TruncatedSVD(TransformerMixin, BaseEstimator): sign of the ``components_`` and the output from transform depend on the algorithm and random state. To work around this, fit instances of this class to data once, then keep the instance around to do transformations. - + + ..versionadded:: v0.14 """ def __init__(self, n_components=2, algorithm="randomized", n_iter=5, random_state=None, tol=0.): diff --git a/sklearn/dummy.py b/sklearn/dummy.py index b12b314c4a91f..bb5b8d51dfa81 100644 --- a/sklearn/dummy.py +++ b/sklearn/dummy.py @@ -90,6 +90,9 @@ class DummyClassifier(MultiOutputMixin, ClassifierMixin, BaseEstimator): array([1, 1, 1, 1]) >>> dummy_clf.score(X, y) 0.75 + ..vershionchanged:: v0.19 + Accepts non-finite features + ..versionadded:: v0.13 """ def __init__(self, strategy="stratified", random_state=None, diff --git a/sklearn/feature_extraction/text.py b/sklearn/feature_extraction/text.py index dd293531184c3..3e3af86760093 100644 --- a/sklearn/feature_extraction/text.py +++ b/sklearn/feature_extraction/text.py @@ -624,7 +624,7 @@ class HashingVectorizer(TransformerMixin, _VectorizerMixin, BaseEstimator): If a callable is passed it is used to extract the sequence of features out of the raw, unprocessed input. - .. versionchanged:: 0.21 + .. versionadded:: v0.21 Since v0.21, if ``input`` is ``filename`` or ``file``, the data is first read from the file and then passed to the given callable @@ -979,6 +979,17 @@ class CountVectorizer(_VectorizerMixin, BaseEstimator): The ``stop_words_`` attribute can get large and increase the model size when pickling. This attribute is provided only for introspection and can be safely removed using delattr or set to None before pickling. + + ..versionchanged:: v0.22 + Raise warning of parameter choide means the another parameter unused + ..versionchanged:: v0.21 + Read the data from the file instead of pass file name + ..versionchanged:: v0.20 + Bug fix + ..versionchanged:: v0.17 + Bug fix of inconsistent results when pickling + ..versionchanged:: v0.14 + Speed and memory imporvements """ def __init__(self, input='content', encoding='utf-8', @@ -1346,7 +1357,8 @@ class TfidfTransformer(TransformerMixin, BaseEstimator): ---------- idf_ : array, shape (n_features) The inverse document frequency (IDF) vector; only defined - if ``use_idf`` is True. + if ``use_idf`` is True. + .. versionadded:: v0.20 Examples -------- @@ -1382,6 +1394,8 @@ class TfidfTransformer(TransformerMixin, BaseEstimator): .. [MRS2008] C.D. Manning, P. Raghavan and H. Schütze (2008). Introduction to Information Retrieval. Cambridge University Press, pp. 118-120. + + .. versionadded:: v.019 """ def __init__(self, norm='l2', use_idf=True, smooth_idf=True, diff --git a/sklearn/linear_model/_theil_sen.py b/sklearn/linear_model/_theil_sen.py index 9adf8109a10ef..6488354f66f58 100644 --- a/sklearn/linear_model/_theil_sen.py +++ b/sklearn/linear_model/_theil_sen.py @@ -291,6 +291,8 @@ class TheilSenRegressor(RegressorMixin, LinearModel): - Theil-Sen Estimators in a Multiple Linear Regression Model, 2009 Xin Dang, Hanxiang Peng, Xueqin Wang and Heping Zhang http://home.olemiss.edu/~xdang/papers/MTSE.pdf + + ..versionadded:: v0.16 """ def __init__(self, fit_intercept=True, copy_X=True, diff --git a/sklearn/model_selection/_split.py b/sklearn/model_selection/_split.py index 8aa49884f26e3..a3af3cb9d95ff 100644 --- a/sklearn/model_selection/_split.py +++ b/sklearn/model_selection/_split.py @@ -758,6 +758,7 @@ class TimeSeriesSplit(_BaseKFold): max_train_size : int, optional Maximum size for a single training set. + ..versionadded:: v0.19 Examples -------- @@ -784,6 +785,8 @@ class TimeSeriesSplit(_BaseKFold): + n_samples % (n_splits + 1)`` in the ``i``th split, with a test set of size ``n_samples//(n_splits + 1)``, where ``n_samples`` is the number of samples. + + ..versionadded:: v0.18 """ def __init__(self, n_splits=5, max_train_size=None): super().__init__(n_splits, shuffle=False, random_state=None) diff --git a/sklearn/naive_bayes.py b/sklearn/naive_bayes.py index be9450d7334f0..126884dc60f03 100644 --- a/sklearn/naive_bayes.py +++ b/sklearn/naive_bayes.py @@ -746,6 +746,12 @@ class MultinomialNB(BaseDiscreteNB): C.D. Manning, P. Raghavan and H. Schuetze (2008). Introduction to Information Retrieval. Cambridge University Press, pp. 234-265. https://nlp.stanford.edu/IR-book/html/htmledition/naive-bayes-text-classification-1.html + + ..versionadded:: v0.14 + ..versionchanged:: v0.16 + Correct ``partial_fit`` handling of ``class_prior`` + ..versionchanged:: v0.19 + Fixed a bug where failed when ``alpha=0``. """ def __init__(self, alpha=1.0, fit_prior=True, class_prior=None): @@ -851,6 +857,8 @@ class ComplementNB(BaseDiscreteNB): Tackling the poor assumptions of naive bayes text classifiers. In ICML (Vol. 3, pp. 616-623). https://people.csail.mit.edu/jrennie/papers/icml03-nb.pdf + + ..versionadded:: v0.20 """ def __init__(self, alpha=1.0, fit_prior=True, class_prior=None,