From acde2d1d08e21f1a21ca78fb84d7c09d85fb37a6 Mon Sep 17 00:00:00 2001 From: ram vikram singh Date: Thu, 1 Dec 2022 04:04:33 +0530 Subject: [PATCH 1/8] Doc changed n_init to n_jobs in mean_shift.py --- sklearn/cluster/_mean_shift.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sklearn/cluster/_mean_shift.py b/sklearn/cluster/_mean_shift.py index b8bf585b0067d..17274a6dd066f 100644 --- a/sklearn/cluster/_mean_shift.py +++ b/sklearn/cluster/_mean_shift.py @@ -177,7 +177,7 @@ def mean_shift( n_jobs : int, default=None The number of jobs to use for the computation. This works by computing - each of the n_init runs in parallel. + each of the n_jobs runs in parallel. ``None`` means 1 unless in a :obj:`joblib.parallel_backend` context. ``-1`` means using all processors. See :term:`Glossary ` @@ -313,7 +313,7 @@ class MeanShift(ClusterMixin, BaseEstimator): n_jobs : int, default=None The number of jobs to use for the computation. This works by computing - each of the n_init runs in parallel. + each of the n_jobs runs in parallel. ``None`` means 1 unless in a :obj:`joblib.parallel_backend` context. ``-1`` means using all processors. See :term:`Glossary ` From 1f2e4f697d1ed87b3ca8a3541d8231383fa99879 Mon Sep 17 00:00:00 2001 From: ram vikram singh Date: Thu, 1 Dec 2022 16:39:14 +0530 Subject: [PATCH 2/8] Update _mean_shift.py --- sklearn/cluster/_mean_shift.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sklearn/cluster/_mean_shift.py b/sklearn/cluster/_mean_shift.py index 17274a6dd066f..6a592edd2418d 100644 --- a/sklearn/cluster/_mean_shift.py +++ b/sklearn/cluster/_mean_shift.py @@ -177,7 +177,10 @@ def mean_shift( n_jobs : int, default=None The number of jobs to use for the computation. This works by computing - each of the n_jobs runs in parallel. + each of the n_jobs runs in parallel. The number of jobs to use for the + computation. The following tasks benefit from the parallelization: the + search of nearest neighbors for bandwidth estimation and label assignments, + and the hill climbing optimization for all seeds. ``None`` means 1 unless in a :obj:`joblib.parallel_backend` context. ``-1`` means using all processors. See :term:`Glossary ` @@ -313,7 +316,10 @@ class MeanShift(ClusterMixin, BaseEstimator): n_jobs : int, default=None The number of jobs to use for the computation. This works by computing - each of the n_jobs runs in parallel. + each of the n_jobs runs in parallel. The number of jobs to use for the + computation. The following tasks benefit from the parallelization: the + search of nearest neighbors for bandwidth estimation and label assignments, + and the hill climbing optimization for all seeds. ``None`` means 1 unless in a :obj:`joblib.parallel_backend` context. ``-1`` means using all processors. See :term:`Glossary ` From 65a24e4363bac60423240bb1cc35b9b88fbc98cc Mon Sep 17 00:00:00 2001 From: ram vikram singh Date: Thu, 1 Dec 2022 16:58:20 +0530 Subject: [PATCH 3/8] Update _mean_shift.py --- sklearn/cluster/_mean_shift.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sklearn/cluster/_mean_shift.py b/sklearn/cluster/_mean_shift.py index 6a592edd2418d..c20434c601398 100644 --- a/sklearn/cluster/_mean_shift.py +++ b/sklearn/cluster/_mean_shift.py @@ -176,9 +176,8 @@ def mean_shift( operation terminates (for that seed point), if has not converged yet. n_jobs : int, default=None - The number of jobs to use for the computation. This works by computing - each of the n_jobs runs in parallel. The number of jobs to use for the - computation. The following tasks benefit from the parallelization: the + The number of jobs to use for the computation. The number of jobs to use for + the computation. The following tasks benefit from the parallelization: the search of nearest neighbors for bandwidth estimation and label assignments, and the hill climbing optimization for all seeds. @@ -315,9 +314,8 @@ class MeanShift(ClusterMixin, BaseEstimator): If false, then orphans are given cluster label -1. n_jobs : int, default=None - The number of jobs to use for the computation. This works by computing - each of the n_jobs runs in parallel. The number of jobs to use for the - computation. The following tasks benefit from the parallelization: the + The number of jobs to use for the computation. The number of jobs to use for + the computation. The following tasks benefit from the parallelization: the search of nearest neighbors for bandwidth estimation and label assignments, and the hill climbing optimization for all seeds. From 756afee9b7c0da4b2a2ea82cbed9dba240f7ff13 Mon Sep 17 00:00:00 2001 From: ram vikram singh Date: Fri, 2 Dec 2022 01:32:27 +0530 Subject: [PATCH 4/8] Update _mean_shift.py --- sklearn/cluster/_mean_shift.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sklearn/cluster/_mean_shift.py b/sklearn/cluster/_mean_shift.py index c20434c601398..68df5f1652409 100644 --- a/sklearn/cluster/_mean_shift.py +++ b/sklearn/cluster/_mean_shift.py @@ -176,10 +176,10 @@ def mean_shift( operation terminates (for that seed point), if has not converged yet. n_jobs : int, default=None - The number of jobs to use for the computation. The number of jobs to use for - the computation. The following tasks benefit from the parallelization: the - search of nearest neighbors for bandwidth estimation and label assignments, - and the hill climbing optimization for all seeds. + The number of jobs to use for the computation. The following tasks benefit + from the parallelization: the search of nearest neighbors for bandwidth + estimation and label assignments, and the hill climbing optimization + for all seeds. ``None`` means 1 unless in a :obj:`joblib.parallel_backend` context. ``-1`` means using all processors. See :term:`Glossary ` @@ -314,10 +314,10 @@ class MeanShift(ClusterMixin, BaseEstimator): If false, then orphans are given cluster label -1. n_jobs : int, default=None - The number of jobs to use for the computation. The number of jobs to use for - the computation. The following tasks benefit from the parallelization: the - search of nearest neighbors for bandwidth estimation and label assignments, - and the hill climbing optimization for all seeds. + The number of jobs to use for the computation. following tasks benefit + from the parallelization: the search of nearest neighbors for bandwidth + estimation and label assignments, and the hill climbing optimization + for all seeds. ``None`` means 1 unless in a :obj:`joblib.parallel_backend` context. ``-1`` means using all processors. See :term:`Glossary ` From 3ec824389d9f65e6d4a6f489016bcc9ff8566b2d Mon Sep 17 00:00:00 2001 From: ram vikram singh Date: Fri, 2 Dec 2022 22:31:48 +0530 Subject: [PATCH 5/8] Update _mean_shift.py --- sklearn/cluster/_mean_shift.py | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/sklearn/cluster/_mean_shift.py b/sklearn/cluster/_mean_shift.py index 68df5f1652409..d38926af8c493 100644 --- a/sklearn/cluster/_mean_shift.py +++ b/sklearn/cluster/_mean_shift.py @@ -177,9 +177,13 @@ def mean_shift( n_jobs : int, default=None The number of jobs to use for the computation. The following tasks benefit - from the parallelization: the search of nearest neighbors for bandwidth - estimation and label assignments, and the hill climbing optimization - for all seeds. + from the parallelization: + + - The search of nearest neighbors for bandwidth estimation and label assignments. + See the details in the docstring of the ``NearestNeighbors`` class. + - Hill-climbing optimization for all seeds. + + See :term:`Glossary ` for more details. ``None`` means 1 unless in a :obj:`joblib.parallel_backend` context. ``-1`` means using all processors. See :term:`Glossary ` @@ -314,10 +318,14 @@ class MeanShift(ClusterMixin, BaseEstimator): If false, then orphans are given cluster label -1. n_jobs : int, default=None - The number of jobs to use for the computation. following tasks benefit - from the parallelization: the search of nearest neighbors for bandwidth - estimation and label assignments, and the hill climbing optimization - for all seeds. + The number of jobs to use for the computation. The following tasks benefit + from the parallelization: + + - The search of nearest neighbors for bandwidth estimation and label assignments. + See the details in the docstring of the ``NearestNeighbors`` class. + - Hill-climbing optimization for all seeds. + + See :term:`Glossary ` for more details. ``None`` means 1 unless in a :obj:`joblib.parallel_backend` context. ``-1`` means using all processors. See :term:`Glossary ` From 54f5739d9a961cd4759e29df4b0a70143f3d9f8b Mon Sep 17 00:00:00 2001 From: ramvikrams Date: Fri, 2 Dec 2022 22:56:06 +0530 Subject: [PATCH 6/8] trimmed the trailing whitespaces --- sklearn/cluster/_mean_shift.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sklearn/cluster/_mean_shift.py b/sklearn/cluster/_mean_shift.py index d38926af8c493..33f8dd948f4c2 100644 --- a/sklearn/cluster/_mean_shift.py +++ b/sklearn/cluster/_mean_shift.py @@ -178,11 +178,11 @@ def mean_shift( n_jobs : int, default=None The number of jobs to use for the computation. The following tasks benefit from the parallelization: - + - The search of nearest neighbors for bandwidth estimation and label assignments. See the details in the docstring of the ``NearestNeighbors`` class. - Hill-climbing optimization for all seeds. - + See :term:`Glossary ` for more details. ``None`` means 1 unless in a :obj:`joblib.parallel_backend` context. @@ -320,11 +320,11 @@ class MeanShift(ClusterMixin, BaseEstimator): n_jobs : int, default=None The number of jobs to use for the computation. The following tasks benefit from the parallelization: - + - The search of nearest neighbors for bandwidth estimation and label assignments. See the details in the docstring of the ``NearestNeighbors`` class. - Hill-climbing optimization for all seeds. - + See :term:`Glossary ` for more details. ``None`` means 1 unless in a :obj:`joblib.parallel_backend` context. From cff2c992f08b80f892ef05ea38dfc70dff5380b6 Mon Sep 17 00:00:00 2001 From: ram vikram singh Date: Mon, 5 Dec 2022 16:55:15 +0530 Subject: [PATCH 7/8] Update _mean_shift.py --- sklearn/cluster/_mean_shift.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sklearn/cluster/_mean_shift.py b/sklearn/cluster/_mean_shift.py index 33f8dd948f4c2..5dd6b296cf9cb 100644 --- a/sklearn/cluster/_mean_shift.py +++ b/sklearn/cluster/_mean_shift.py @@ -180,7 +180,7 @@ def mean_shift( from the parallelization: - The search of nearest neighbors for bandwidth estimation and label assignments. - See the details in the docstring of the ``NearestNeighbors`` class. + See the details in the docstring of the ``NearestNeighbors`` class. - Hill-climbing optimization for all seeds. See :term:`Glossary ` for more details. @@ -322,7 +322,7 @@ class MeanShift(ClusterMixin, BaseEstimator): from the parallelization: - The search of nearest neighbors for bandwidth estimation and label assignments. - See the details in the docstring of the ``NearestNeighbors`` class. + See the details in the docstring of the ``NearestNeighbors`` class. - Hill-climbing optimization for all seeds. See :term:`Glossary ` for more details. From a66120a4dc716371646e3c5bd54e3ea614dfd418 Mon Sep 17 00:00:00 2001 From: Meekail Zain Date: Tue, 6 Dec 2022 12:36:55 -0500 Subject: [PATCH 8/8] Shortened problematic lines --- sklearn/cluster/_mean_shift.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sklearn/cluster/_mean_shift.py b/sklearn/cluster/_mean_shift.py index 5dd6b296cf9cb..f886fe392f4bf 100644 --- a/sklearn/cluster/_mean_shift.py +++ b/sklearn/cluster/_mean_shift.py @@ -179,8 +179,9 @@ def mean_shift( The number of jobs to use for the computation. The following tasks benefit from the parallelization: - - The search of nearest neighbors for bandwidth estimation and label assignments. - See the details in the docstring of the ``NearestNeighbors`` class. + - The search of nearest neighbors for bandwidth estimation and label + assignments. See the details in the docstring of the + ``NearestNeighbors`` class. - Hill-climbing optimization for all seeds. See :term:`Glossary ` for more details. @@ -321,8 +322,9 @@ class MeanShift(ClusterMixin, BaseEstimator): The number of jobs to use for the computation. The following tasks benefit from the parallelization: - - The search of nearest neighbors for bandwidth estimation and label assignments. - See the details in the docstring of the ``NearestNeighbors`` class. + - The search of nearest neighbors for bandwidth estimation and label + assignments. See the details in the docstring of the + ``NearestNeighbors`` class. - Hill-climbing optimization for all seeds. See :term:`Glossary ` for more details.