Skip to content

Commit

Permalink
Added test_all_distance_measures
Browse files Browse the repository at this point in the history
  • Loading branch information
itsdivya1309 committed May 19, 2024
1 parent 20dc7a2 commit 21e33bb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions aeon/classification/distance_based/tests/test_elastic_ensemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,13 @@ def test_proportion_train_in_param_finding():
ee.get_metric_params()
with pytest.raises(NotImplementedError, match="EE does not currently support:"):
ElasticEnsemble._get_100_param_options("FOO")


def test_all_distance_measures():
"""Test the 'all' option of the distance_measures parameter."""
X = np.random.random(size=(10, 1, 10))
y = np.array([0, 0, 0, 0, 0, 1, 1, 1, 1, 1])
ee = ElasticEnsemble(distance_measures="all", proportion_train_in_param_finding=0.2)
ee.fit(X, y)
distances = list(ee.get_metric_params())
assert len(distances) == 9

0 comments on commit 21e33bb

Please sign in to comment.