diff --git a/volia/measures.py b/volia/measures.py index 6d5d721..71f0908 100644 --- a/volia/measures.py +++ b/volia/measures.py @@ -152,6 +152,15 @@ def entropy_score(y_truth, y_hat): def purity_score(y_truth, y_hat): + ''' + Return three values in a dictionary: + - purity_class_score: the purity score of the class (asp) + - purity_cluster_score: the purity score of the cluster (acp) + - K: the overall evaluation criterion (sqrt(asp * acp)) + + This function is based on the following article: + Unknown-multiple speaker clustering using HMM, J. Ajmera, H. Bourlard, I. Lapidot, I. McCowan + ''' def divide_line(a, divider): '''