From 32e93eb0a65d4d591c7e70f7ee6a9411bcf8ca5e Mon Sep 17 00:00:00 2001 From: chrisholder Date: Fri, 7 Mar 2025 16:12:33 +0100 Subject: [PATCH] fixed --- .../distance_based/_time_series_neighbors.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/aeon/classification/distance_based/_time_series_neighbors.py b/aeon/classification/distance_based/_time_series_neighbors.py index cf3f0faab2..6792ea0423 100644 --- a/aeon/classification/distance_based/_time_series_neighbors.py +++ b/aeon/classification/distance_based/_time_series_neighbors.py @@ -163,11 +163,11 @@ def _predict(self, X): """ self._check_is_fitted() - indexes = self.kneighbors(X, return_distance=False, n_jobs=self.n_jobs)[:, 0] + indexes = self.kneighbors(X, return_distance=False)[:, 0] return self.classes_[self.y_[indexes]] @threaded - def kneighbors(self, X=None, n_neighbors=None, return_distance=True, n_jobs=1): + def kneighbors(self, X=None, n_neighbors=None, return_distance=True): """Find the K-neighbors of a point. Returns indices of and distances to the neighbors of each point. @@ -184,10 +184,6 @@ def kneighbors(self, X=None, n_neighbors=None, return_distance=True, n_jobs=1): passed to the constructor. return_distance : bool, default=True Whether or not to return the distances. - n_jobs : int, default=1 - The number of jobs to run in parallel. If -1, then the number of jobs is set - to the number of CPU cores. If 1, then the function is executed in a single - thread. If greater than 1, then the function is executed in parallel. Returns ------- @@ -220,7 +216,7 @@ def kneighbors(self, X=None, n_neighbors=None, return_distance=True, n_jobs=1): X, self.X_ if not query_is_train else None, method=self.distance, - n_jobs=n_jobs, + n_jobs=self.n_jobs, **self._distance_params, )