From 503bfd9274290724fe9f4f0668a8fea7134a071b Mon Sep 17 00:00:00 2001 From: Mathias Date: Mon, 28 Sep 2020 11:52:18 +0200 Subject: [PATCH] Add comments to the purity_score function --- volia/measures.py | 9 +++++++++ 1 file changed, 9 insertions(+) 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): ''' -- 1.8.2.3