diff --git a/aeon/clustering/deep_learning/tests/__init__.py b/aeon/clustering/deep_learning/tests/__init__.py deleted file mode 100644 index 8087b8988f..0000000000 --- a/aeon/clustering/deep_learning/tests/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Deep learning clustering tests.""" diff --git a/aeon/clustering/deep_learning/tests/test_deep_clusterer_base.py b/aeon/clustering/deep_learning/tests/test_deep_clusterer_base.py deleted file mode 100644 index 9e65866532..0000000000 --- a/aeon/clustering/deep_learning/tests/test_deep_clusterer_base.py +++ /dev/null @@ -1,43 +0,0 @@ -"""Unit tests for clusterer deep learning base class functionality.""" - -import tempfile - -import numpy as np -import pytest - -from aeon.clustering.dummy import DummyClusterer -from aeon.testing.data_generation import make_example_2d_numpy_collection -from aeon.testing.mock_estimators import MockDeepClusterer -from aeon.utils.validation._dependencies import _check_soft_dependencies - -__maintainer__ = ["hadifawaz1999"] - - -@pytest.mark.skipif( - not _check_soft_dependencies("tensorflow", severity="none"), - reason="skip test if required soft dependency not available", -) -@pytest.mark.parametrize("estimator", [None, DummyClusterer(n_clusters=2)]) -def test_base_deep_clusterer(estimator): - """Test base deep clusterer.""" - with tempfile.TemporaryDirectory() as tmp: - last_file_name = "temp" - # create a dummy deep classifier - dummy_deep_clr = MockDeepClusterer( - estimator=estimator, last_file_name=last_file_name - ) - # generate random data - X, y = make_example_2d_numpy_collection() - # test fit function on random data - dummy_deep_clr.fit(X=X) - # test save last model to file than delete it - dummy_deep_clr.save_last_model_to_file(file_path=tmp) - - # test summary of model - assert dummy_deep_clr.summary() is not None - ypred = dummy_deep_clr.predict(X) - assert ypred is not None - assert len(ypred) == len(y) - ypred_proba = dummy_deep_clr.predict_proba(X) - assert ypred_proba is not None - assert len(ypred_proba[0]) == len(np.unique(y)) diff --git a/aeon/clustering/deep_learning/tests/test_deep_clusterer_features.py b/aeon/clustering/deep_learning/tests/test_deep_clusterer_features.py deleted file mode 100644 index c2ad50b280..0000000000 --- a/aeon/clustering/deep_learning/tests/test_deep_clusterer_features.py +++ /dev/null @@ -1,25 +0,0 @@ -"""Tests whether various clusterer params work well.""" - -import numpy as np -import pytest - -from aeon.clustering.deep_learning import AEFCNClusterer, AEResNetClusterer -from aeon.utils.validation._dependencies import _check_soft_dependencies - - -@pytest.mark.skipif( - not _check_soft_dependencies(["tensorflow"], severity="none"), - reason="Tensorflow soft dependency not found.", -) -def test_multi_rec_fcn(): - """Tests whether multi-rec loss works fine or not.""" - X = np.random.random((100, 5, 2)) - clst = AEFCNClusterer(**AEFCNClusterer._get_test_params()[0], loss="multi_rec") - clst.fit(X) - assert isinstance(clst.history["loss"][-1], float) - - clst = AEResNetClusterer( - **AEResNetClusterer._get_test_params()[0], loss="multi_rec" - ) - clst.fit(X) - assert isinstance(clst.history["loss"][-1], float)