@@ -44,17 +44,14 @@ def test_group_betas(self):
44
44
self .assertTrue ((fake_betas [index ] - beta_clusters [c ][e ]).max () == 0 )
45
45
46
46
# verify different keyword combinations
47
-
48
47
for cluster_type in ClusterType .get_cluster_type_name ():
49
48
for detector_type in DetectorType .get_detector_type_name ():
50
-
51
49
# As some clustering algorithms require parameters, we need to provide them
52
50
# to avoid errors
53
51
if cluster_type == "KMeans" or cluster_type == "SpectralClustering" :
54
52
cluster_params = {"n_clusters" : 2 }
55
53
else :
56
54
cluster_params = {}
57
-
58
55
result = group_betas (
59
56
fake_names ,
60
57
fake_betas ,
@@ -65,15 +62,13 @@ def test_group_betas(self):
65
62
66
63
if isinstance (result , str ):
67
64
self .fail (f"group_betas returned an error: { result } " )
68
-
69
65
beta_clusters , name_clusters = result
70
66
71
67
# verify correct output
72
68
self .assertIsInstance (beta_clusters , list )
73
69
self .assertIsInstance (name_clusters , list )
74
70
self .assertEqual (len (beta_clusters ), len (name_clusters ))
75
71
76
-
77
72
def test_group_betas_no_detector (self ):
78
73
"""tests correct function of the group_betas function
79
74
in clustering_betas.py without an outlier detector"""
@@ -108,9 +103,7 @@ def test_group_betas_no_detector(self):
108
103
self .assertTrue ((fake_betas [index ] - beta_clusters [c ][e ]).max () == 0 )
109
104
110
105
# verify different keyword combinations
111
-
112
106
for cluster_type in ClusterType .get_cluster_type_name ():
113
-
114
107
# As some clustering algorithms require parameters, we need to provide them
115
108
# to avoid errors
116
109
if cluster_type == "KMeans" or cluster_type == "SpectralClustering" :
0 commit comments