diff --git a/maint_tools/test_docstrings.py b/maint_tools/test_docstrings.py index 616e62898cd75..0318b19f43232 100644 --- a/maint_tools/test_docstrings.py +++ b/maint_tools/test_docstrings.py @@ -13,7 +13,6 @@ # List of modules ignored when checking for numpydoc validation. DOCSTRING_IGNORE_LIST = [ - "KNNImputer", "LabelSpreading", "LocallyLinearEmbedding", "MultiTaskElasticNetCV", diff --git a/sklearn/impute/_knn.py b/sklearn/impute/_knn.py index c2bd1410e8ecd..b0ef7e52951e6 100644 --- a/sklearn/impute/_knn.py +++ b/sklearn/impute/_knn.py @@ -87,6 +87,13 @@ class KNNImputer(_BaseImputer): .. versionadded:: 1.0 + See Also + -------- + SimpleImputer : Imputation transformer for completing missing values + with simple strategies. + IterativeImputer : Multivariate imputer that estimates each feature + from all the others. + References ---------- * Olga Troyanskaya, Michael Cantor, Gavin Sherlock, Pat Brown, Trevor @@ -179,9 +186,13 @@ def fit(self, X, y=None): Input data, where `n_samples` is the number of samples and `n_features` is the number of features. + y : Ignored + Not used, present here for API consistency by convention. + Returns ------- self : object + The fitted `KNNImputer` class instance. """ # Check data integrity and calling arguments if not is_scalar_nan(self.missing_values):