Skip to content

MAINT Clean up deprecations for 1.6: clean up leftovers #30216

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
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
6 changes: 0 additions & 6 deletions sklearn/cluster/_agglomerative.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
from ..utils._fast_dict import IntFloatDict
from ..utils._param_validation import (
HasMethods,
Hidden,
Interval,
StrOptions,
validate_params,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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],
Expand Down
7 changes: 0 additions & 7 deletions sklearn/tests/test_docstring_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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():
Expand Down