Skip to content

Commit

Permalink
fix undefined name
Browse files Browse the repository at this point in the history
  • Loading branch information
alastair committed Dec 20, 2023
1 parent 6e7374a commit 5b055fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions clustering/clustering.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def _average_mutual_information_reference_features_clusters(self, partition):
Returns:
Numpy.float: Average Mutual Information.
"""
reference_features, clusters = self._prepare_clustering_result_and_reference_features_for_evaluation(classes)
reference_features, clusters = self._prepare_clustering_result_and_reference_features_for_evaluation(partition)
return np.average(mutual_info_classif(reference_features, clusters, discrete_features=True))

def _silouhette_coeff_reference_features_clusters(self, partition):
Expand All @@ -116,7 +116,7 @@ def _silouhette_coeff_reference_features_clusters(self, partition):
Returns:
Numpy.float: mean Silhouette Coefficient.
"""
reference_features, clusters = self._prepare_clustering_result_and_reference_features_for_evaluation(classes)
reference_features, clusters = self._prepare_clustering_result_and_reference_features_for_evaluation(partition)
return metrics.silhouette_score(reference_features, clusters, metric='euclidean')

def _calinski_idx_reference_features_clusters(self, partition):
Expand Down
2 changes: 1 addition & 1 deletion sounds/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1768,7 +1768,7 @@ def get_pack_tags_bw(self):
return [{
'name': tag,
'count': count,
'browse_url': browse_pack_tag_url(tag)
'browse_url': self.browse_pack_tag_url(tag)
} for tag, count in pack_tags_counts]
except SearchEngineException as e:
return []
Expand Down

0 comments on commit 5b055fd

Please sign in to comment.