From 00b1a753243fd3d72a47d2b8c5b2146cc7986c04 Mon Sep 17 00:00:00 2001 From: MarcusFra Date: Fri, 11 Aug 2023 17:00:24 +0200 Subject: [PATCH 1/2] DOC Add missing links to examples/impute (scikit-learn#26927) --- doc/modules/impute.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/modules/impute.rst b/doc/modules/impute.rst index a1985bc460b77..0bb62fa03bc63 100644 --- a/doc/modules/impute.rst +++ b/doc/modules/impute.rst @@ -87,6 +87,8 @@ string values or pandas categoricals when using the ``'most_frequent'`` or ['a' 'y'] ['b' 'y']] +For another example on usage, see :ref:`sphx_glr_auto_examples_impute_plot_missing_values.py`. + .. _iterative_imputer: @@ -220,6 +222,8 @@ neighbors of samples with missing values:: [5.5, 6. , 5. ], [8. , 8. , 7. ]]) +For another example on usage, see :ref:`sphx_glr_auto_examples_impute_plot_missing_values.py`. + .. topic:: References .. [OL2001] Olga Troyanskaya, Michael Cantor, Gavin Sherlock, Pat Brown, From b38f32204a187f17ed798041f64b70e2b7849395 Mon Sep 17 00:00:00 2001 From: MarcusFra Date: Mon, 21 Aug 2023 19:05:40 +0200 Subject: [PATCH 2/2] DOC Add missing links to examples/impute (scikit-learn#26927) - update docstings --- sklearn/impute/_base.py | 3 +++ sklearn/impute/_iterative.py | 4 ++++ sklearn/impute/_knn.py | 3 +++ 3 files changed, 10 insertions(+) diff --git a/sklearn/impute/_base.py b/sklearn/impute/_base.py index a65210bce6960..e182a6ca73e61 100644 --- a/sklearn/impute/_base.py +++ b/sklearn/impute/_base.py @@ -256,6 +256,9 @@ class SimpleImputer(_BaseImputer): [[ 7. 2. 3. ] [ 4. 3.5 6. ] [10. 3.5 9. ]] + + For a more detailed example see + :ref:`sphx_glr_auto_examples_impute_plot_missing_values.py`. """ _parameter_constraints: dict = { diff --git a/sklearn/impute/_iterative.py b/sklearn/impute/_iterative.py index a0087a5a10d55..e08f1bd773a34 100644 --- a/sklearn/impute/_iterative.py +++ b/sklearn/impute/_iterative.py @@ -273,6 +273,10 @@ class IterativeImputer(_BaseImputer): array([[ 6.9584..., 2. , 3. ], [ 4. , 2.6000..., 6. ], [10. , 4.9999..., 9. ]]) + + For a more detailed example see + :ref:`sphx_glr_auto_examples_impute_plot_missing_values.py` or + :ref:`sphx_glr_auto_examples_impute_plot_iterative_imputer_variants_comparison.py`. """ _parameter_constraints: dict = { diff --git a/sklearn/impute/_knn.py b/sklearn/impute/_knn.py index e36b49f262b2d..7da7785369c0d 100644 --- a/sklearn/impute/_knn.py +++ b/sklearn/impute/_knn.py @@ -121,6 +121,9 @@ class KNNImputer(_BaseImputer): [3. , 4. , 3. ], [5.5, 6. , 5. ], [8. , 8. , 7. ]]) + + For a more detailed example see + :ref:`sphx_glr_auto_examples_impute_plot_missing_values.py`. """ _parameter_constraints: dict = {