Commit 957896bc9780a73241cd1ceabcb35ccbfa9f6e9c
1 parent
ed89325d5d
Exists in
master
Adding an example of data and script to use clustering.
Showing 4 changed files with 156 additions and 0 deletions Side-by-side Diff
receipts/clustering_example.sh
1 | +# Don't forget to install volia before or to run it in volia root directory. | |
2 | +# You can uncomment "debug" flag parameter to see print dedicated to the debug. | |
3 | + | |
4 | +# Example k-means with (default) euclidian distance | |
5 | +python -m volia.clustering \ | |
6 | + --features "example/feats_example.txt" \ | |
7 | + --lst "example/example.lst" \ | |
8 | + -k 4 \ | |
9 | + --output "tests/kmeans_on_example.pkl" \ | |
10 | + #--debug | |
11 | + | |
12 | +python -m volia.clustering measure \ | |
13 | + --measure "entropy" "v-measure" "homogeneity" "completeness" "purity" \ | |
14 | + --features "example/feats_example.txt" \ | |
15 | + --lst "example/example.lst" \ | |
16 | + --truelabels "example/utt2grp_example" \ | |
17 | + --model "tests/kmeans_on_example.pkl" \ | |
18 | + --modeltype "k-means" | |
19 | + | |
20 | + | |
21 | +# Example k-means with mahalanobis distance | |
22 | +python -m volia.clustering kmeans \ | |
23 | + --features "example/feats_example.txt" \ | |
24 | + --lst "example/example.lst" \ | |
25 | + -k 4 \ | |
26 | + --output "tests/kmeans_mahalanobis_on_example.pkl" \ | |
27 | + --mahalanobis | |
28 | + #-- debug | |
29 | + | |
30 | +python -m volia.clustering measure \ | |
31 | + --measure "entropy" "v-measure" "homogeneity" "completeness" "purity" \ | |
32 | + --features "example/feats_example.txt" \ | |
33 | + --lst "example/example.lst" \ | |
34 | + --truelabels "example/utt2grp_example" \ | |
35 | + --model "kmeans_mahalanobis_on_example.pkl" \ | |
36 | + --modeltype "k-means-mahalanobis" |
receipts/example/example.lst
1 | +00001 | |
2 | +00002 | |
3 | +00003 | |
4 | +00004 | |
5 | +00005 | |
6 | +00006 | |
7 | +00007 | |
8 | +00008 | |
9 | +00009 | |
10 | +00010 | |
11 | +00011 | |
12 | +00012 | |
13 | +00013 | |
14 | +00014 | |
15 | +00015 | |
16 | +00016 | |
17 | +00017 | |
18 | +00018 | |
19 | +00019 | |
20 | +00020 | |
21 | +00021 | |
22 | +00022 | |
23 | +00023 | |
24 | +00024 | |
25 | +00025 | |
26 | +00026 | |
27 | +00027 | |
28 | +00028 | |
29 | +00029 | |
30 | +00030 | |
31 | +00031 | |
32 | +00032 | |
33 | +00033 | |
34 | +00034 | |
35 | +00035 | |
36 | +00036 | |
37 | +00037 | |
38 | +00038 | |
39 | +00039 | |
40 | +00040 |
receipts/example/feats_example.txt
1 | +00001 9.9777948745 5.0097253094 | |
2 | +00002 9.5229160451 5.1065689857 | |
3 | +00003 10.0683032257 5.0929926845 | |
4 | +00004 10.4190537483 5.0436588347 | |
5 | +00005 10.2489220003 4.764469118 | |
6 | +00006 10.0102482307 5.1295142096 | |
7 | +00007 10.0132105155 4.975514489 | |
8 | +00008 9.6582134421 5.3718089569 | |
9 | +00009 10.3687320788 5.0070660353 | |
10 | +00010 10.0206559865 5.0782852429 | |
11 | +00011 5.3790591998 10.5482455864 | |
12 | +00012 4.8410845425 9.393727279 | |
13 | +00013 4.7244926286 9.7959140641 | |
14 | +00014 4.8898252527 9.8588087418 | |
15 | +00015 4.9001782344 9.8886957353 | |
16 | +00016 4.7953159294 10.1760344582 | |
17 | +00017 4.987703639 10.2005482342 | |
18 | +00018 5.4247526431 9.4028065528 | |
19 | +00019 5.1492437327 9.6273676282 | |
20 | +00020 5.1409374793 9.8161364221 | |
21 | +00021 10.0364010754 10.033142897 | |
22 | +00022 9.9678777136 10.3401433342 | |
23 | +00023 9.9490251639 10.048815697 | |
24 | +00024 10.2081153569 9.7356741508 | |
25 | +00025 9.9570713519 10.3380561866 | |
26 | +00026 10.2848058713 10.2612123135 | |
27 | +00027 10.0367532914 9.881463012 | |
28 | +00028 9.9394777833 9.8033954281 | |
29 | +00029 10.3024249623 10.2459711714 | |
30 | +00030 9.8460800216 9.9275337768 | |
31 | +00031 0.0411836404 5.4633030866 | |
32 | +00032 0.0139924297 4.5859670157 | |
33 | +00033 -0.4310357985 5.1511811554 | |
34 | +00034 -0.3548044058 4.9971822733 | |
35 | +00035 -0.2065391374 4.6706733169 | |
36 | +00036 0.3792866979 5.1858242378 | |
37 | +00037 0.0223456313 5.0171648356 | |
38 | +00038 0.4665682914 4.8223001752 | |
39 | +00039 0.2108448666 5.0367557812 | |
40 | +00040 -0.3157195455 5.4294636419 |
receipts/example/utt2grp_example
1 | +00001 1 | |
2 | +00002 1 | |
3 | +00003 1 | |
4 | +00004 1 | |
5 | +00005 1 | |
6 | +00006 1 | |
7 | +00007 1 | |
8 | +00008 1 | |
9 | +00009 1 | |
10 | +00010 1 | |
11 | +00011 2 | |
12 | +00012 2 | |
13 | +00013 2 | |
14 | +00014 2 | |
15 | +00015 2 | |
16 | +00016 2 | |
17 | +00017 2 | |
18 | +00018 2 | |
19 | +00019 2 | |
20 | +00020 2 | |
21 | +00021 3 | |
22 | +00022 3 | |
23 | +00023 3 | |
24 | +00024 3 | |
25 | +00025 3 | |
26 | +00026 3 | |
27 | +00027 3 | |
28 | +00028 3 | |
29 | +00029 3 | |
30 | +00030 3 | |
31 | +00031 4 | |
32 | +00032 4 | |
33 | +00033 4 | |
34 | +00034 4 | |
35 | +00035 4 | |
36 | +00036 4 | |
37 | +00037 4 | |
38 | +00038 4 | |
39 | +00039 4 | |
40 | +00040 4 |