From a7da351c81ef1e0fd5172bc0aed9924007e6a9a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Mon, 4 Nov 2024 18:04:31 +0100 Subject: [PATCH] cln leftovers --- sklearn/cluster/_agglomerative.py | 6 ------ sklearn/tests/test_docstring_parameters.py | 7 ------- 2 files changed, 13 deletions(-) diff --git a/sklearn/cluster/_agglomerative.py b/sklearn/cluster/_agglomerative.py index 4dd8b57364301..1bf1161b18cd9 100644 --- a/sklearn/cluster/_agglomerative.py +++ b/sklearn/cluster/_agglomerative.py @@ -32,7 +32,6 @@ from ..utils._fast_dict import IntFloatDict from ..utils._param_validation import ( HasMethods, - Hidden, Interval, StrOptions, validate_params, @@ -1143,10 +1142,6 @@ class FeatureAgglomeration( .. versionadded:: 1.2 - .. deprecated:: 1.4 - `metric=None` is deprecated in 1.4 and will be removed in 1.6. - Let `metric` be the default value (i.e. `"euclidean"`) instead. - memory : str or object with the joblib.Memory interface, default=None Used to cache the output of the computation of the tree. By default, no caching is done. If a string is given, it is the @@ -1273,7 +1268,6 @@ class FeatureAgglomeration( "metric": [ StrOptions(set(_VALID_METRICS) | {"precomputed"}), callable, - Hidden(None), ], "memory": [str, HasMethods("cache"), None], "connectivity": ["array-like", "sparse matrix", callable, None], diff --git a/sklearn/tests/test_docstring_parameters.py b/sklearn/tests/test_docstring_parameters.py index 6d44a3546f1ea..ff83f2e28fd58 100644 --- a/sklearn/tests/test_docstring_parameters.py +++ b/sklearn/tests/test_docstring_parameters.py @@ -177,9 +177,6 @@ def _construct_sparse_coder(Estimator): @pytest.mark.filterwarnings("ignore::sklearn.exceptions.ConvergenceWarning") -# TODO(1.6): remove "@pytest.mark.filterwarnings" as SAMME.R will be removed -# and substituted with the SAMME algorithm as a default -@pytest.mark.filterwarnings("ignore:The SAMME.R algorithm") @pytest.mark.parametrize("name, Estimator", all_estimators()) def test_fit_docstring_attributes(name, Estimator): pytest.importorskip("numpydoc") @@ -225,10 +222,6 @@ def test_fit_docstring_attributes(name, Estimator): # default raises an error, perplexity must be less than n_samples est.set_params(perplexity=2) - # TODO(1.6): remove (avoid FutureWarning) - if Estimator.__name__ in ("NMF", "MiniBatchNMF"): - est.set_params(n_components="auto") - # Low max iter to speed up tests: we are only interested in checking the existence # of fitted attributes. This should be invariant to whether it has converged or not. if "max_iter" in est.get_params():