Commit fea9649a748844cca1201bf3612e6172f0ccfd19
1 parent
09f3471d67
Exists in
master
Add many measures to compute
Showing 1 changed file with 5 additions and 2 deletions Side-by-side Diff
volia/clustering.py
... | ... | @@ -8,7 +8,7 @@ |
8 | 8 | from clustering_modules.kmeans import kmeans |
9 | 9 | |
10 | 10 | from sklearn.preprocessing import LabelEncoder |
11 | -from sklearn.metrics import v_measure_score | |
11 | +from sklearn.metrics import v_measure_score, homogeneity_score, completeness_score | |
12 | 12 | |
13 | 13 | import core.measures |
14 | 14 | import json |
... | ... | @@ -20,7 +20,10 @@ |
20 | 20 | |
21 | 21 | EVALUATION_METHODS = { |
22 | 22 | "entropy": core.measures.entropy_score, |
23 | - "v-measure": v_measure_score | |
23 | + "purity": core.measures.purity_score, | |
24 | + "v-measure": v_measure_score, | |
25 | + "homogeneity": homogeneity_score, | |
26 | + "completeness": completeness_score, | |
24 | 27 | } |
25 | 28 | |
26 | 29 |