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

Skip to content
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
1 change: 0 additions & 1 deletion maint_tools/test_docstrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

# List of modules ignored when checking for numpydoc validation.
DOCSTRING_IGNORE_LIST = [
"KNNImputer",
"LabelSpreading",
"LocallyLinearEmbedding",
"MultiTaskElasticNetCV",
Expand Down
11 changes: 11 additions & 0 deletions sklearn/impute/_knn.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand Down