File tree 2 files changed +9
-4
lines changed
Filter options
2 files changed +9
-4
lines changed
Original file line number Diff line number Diff line change @@ -225,6 +225,11 @@ Changelog
225
225
instead of failing with a low-level error message at predict-time.
226
226
:pr: `23874 ` by :user: `Juan Gomez <2357juan> `.
227
227
228
+ - |Fix | Set `n_jobs=None ` by default (instead of `1 `) for
229
+ :class: `neighbors.KNeighborsTransformer ` and
230
+ :class: `neighbors.RadiusNeighborsTransformer `.
231
+ :pr: `24075 ` by :user: `Valentin Laurent <Valentin-Laurent> `.
232
+
228
233
:mod: `sklearn.svm `
229
234
..................
230
235
Original file line number Diff line number Diff line change @@ -291,7 +291,7 @@ class KNeighborsTransformer(
291
291
metric_params : dict, default=None
292
292
Additional keyword arguments for the metric function.
293
293
294
- n_jobs : int, default=1
294
+ n_jobs : int, default=None
295
295
The number of parallel jobs to run for neighbors search.
296
296
If ``-1``, then the number of jobs is set to the number of CPU cores.
297
297
@@ -358,7 +358,7 @@ def __init__(
358
358
metric = "minkowski" ,
359
359
p = 2 ,
360
360
metric_params = None ,
361
- n_jobs = 1 ,
361
+ n_jobs = None ,
362
362
):
363
363
super (KNeighborsTransformer , self ).__init__ (
364
364
n_neighbors = n_neighbors ,
@@ -515,7 +515,7 @@ class RadiusNeighborsTransformer(
515
515
metric_params : dict, default=None
516
516
Additional keyword arguments for the metric function.
517
517
518
- n_jobs : int, default=1
518
+ n_jobs : int, default=None
519
519
The number of parallel jobs to run for neighbors search.
520
520
If ``-1``, then the number of jobs is set to the number of CPU cores.
521
521
@@ -586,7 +586,7 @@ def __init__(
586
586
metric = "minkowski" ,
587
587
p = 2 ,
588
588
metric_params = None ,
589
- n_jobs = 1 ,
589
+ n_jobs = None ,
590
590
):
591
591
super (RadiusNeighborsTransformer , self ).__init__ (
592
592
n_neighbors = None ,
You can’t perform that action at this time.
0 commit comments