Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG[ Use clone estimator in BaseDeepClusterer to fix check_fit_updates_state fail #2309

Merged
merged 2 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions aeon/clustering/deep_learning/_ae_bgru.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,11 @@ def __init__(
self.save_last_model = save_last_model
self.best_file_name = best_file_name
self.random_state = random_state
self.estimator = estimator

super().__init__(
n_clusters=n_clusters,
clustering_algorithm=clustering_algorithm,
clustering_params=clustering_params,
estimator=estimator,
batch_size=batch_size,
last_file_name=last_file_name,
Expand Down Expand Up @@ -290,7 +291,7 @@ def _score(self, X, y=None):
return self._estimator.score(latent_space)

@classmethod
def get_test_params(cls, parameter_set="default"):
def _get_test_params(cls, parameter_set="default"):
"""Return testing parameter settings for the estimator.

Parameters
Expand Down
3 changes: 2 additions & 1 deletion aeon/clustering/deep_learning/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from abc import abstractmethod

from aeon.base._base import _clone_estimator
from aeon.clustering._k_means import TimeSeriesKMeans
from aeon.clustering.base import BaseClusterer

Expand Down Expand Up @@ -116,7 +117,7 @@ def _fit_clustering(self, X):
n_clusters=2, distance="euclidean", averaging_method="mean"
)
if self.estimator is None
else self.estimator
else _clone_estimator(self.estimator)
)

# to be removed in 1.0.0
Expand Down
2 changes: 0 additions & 2 deletions aeon/testing/testing_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@
"RSASTClassifier": ["check_fit_deterministic"],
"SAST": ["check_fit_deterministic"],
"RSAST": ["check_fit_deterministic"],
"AEFCNClusterer": ["check_fit_updates_state"],
"AEResNetClusterer": ["check_fit_updates_state"],
"SFA": ["check_persistence_via_pickle", "check_fit_deterministic"],
"CollectionId": ["check_transform_inverse_transform_equivalent"],
"ScaledLogitSeriesTransformer": ["check_transform_inverse_transform_equivalent"],
Expand Down