Skip to content

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisholder committed Mar 7, 2025
1 parent 405bdda commit 32e93eb
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions aeon/classification/distance_based/_time_series_neighbors.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
-------
Expand Down Expand Up @@ -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,
)

Expand Down

0 comments on commit 32e93eb

Please sign in to comment.