diff --git a/receipts/clustering_example.sh b/receipts/clustering_example.sh new file mode 100644 index 0000000..b58ded5 --- /dev/null +++ b/receipts/clustering_example.sh @@ -0,0 +1,36 @@ +# Don't forget to install volia before or to run it in volia root directory. +# You can uncomment "debug" flag parameter to see print dedicated to the debug. + +# Example k-means with (default) euclidian distance +python -m volia.clustering \ + --features "example/feats_example.txt" \ + --lst "example/example.lst" \ + -k 4 \ + --output "tests/kmeans_on_example.pkl" \ + #--debug + +python -m volia.clustering measure \ + --measure "entropy" "v-measure" "homogeneity" "completeness" "purity" \ + --features "example/feats_example.txt" \ + --lst "example/example.lst" \ + --truelabels "example/utt2grp_example" \ + --model "tests/kmeans_on_example.pkl" \ + --modeltype "k-means" + + +# Example k-means with mahalanobis distance +python -m volia.clustering kmeans \ + --features "example/feats_example.txt" \ + --lst "example/example.lst" \ + -k 4 \ + --output "tests/kmeans_mahalanobis_on_example.pkl" \ + --mahalanobis + #-- debug + +python -m volia.clustering measure \ + --measure "entropy" "v-measure" "homogeneity" "completeness" "purity" \ + --features "example/feats_example.txt" \ + --lst "example/example.lst" \ + --truelabels "example/utt2grp_example" \ + --model "kmeans_mahalanobis_on_example.pkl" \ + --modeltype "k-means-mahalanobis" \ No newline at end of file diff --git a/receipts/example/example.lst b/receipts/example/example.lst new file mode 100644 index 0000000..8942a6f --- /dev/null +++ b/receipts/example/example.lst @@ -0,0 +1,40 @@ +00001 +00002 +00003 +00004 +00005 +00006 +00007 +00008 +00009 +00010 +00011 +00012 +00013 +00014 +00015 +00016 +00017 +00018 +00019 +00020 +00021 +00022 +00023 +00024 +00025 +00026 +00027 +00028 +00029 +00030 +00031 +00032 +00033 +00034 +00035 +00036 +00037 +00038 +00039 +00040 diff --git a/receipts/example/feats_example.txt b/receipts/example/feats_example.txt new file mode 100644 index 0000000..64fb778 --- /dev/null +++ b/receipts/example/feats_example.txt @@ -0,0 +1,40 @@ +00001 9.9777948745 5.0097253094 +00002 9.5229160451 5.1065689857 +00003 10.0683032257 5.0929926845 +00004 10.4190537483 5.0436588347 +00005 10.2489220003 4.764469118 +00006 10.0102482307 5.1295142096 +00007 10.0132105155 4.975514489 +00008 9.6582134421 5.3718089569 +00009 10.3687320788 5.0070660353 +00010 10.0206559865 5.0782852429 +00011 5.3790591998 10.5482455864 +00012 4.8410845425 9.393727279 +00013 4.7244926286 9.7959140641 +00014 4.8898252527 9.8588087418 +00015 4.9001782344 9.8886957353 +00016 4.7953159294 10.1760344582 +00017 4.987703639 10.2005482342 +00018 5.4247526431 9.4028065528 +00019 5.1492437327 9.6273676282 +00020 5.1409374793 9.8161364221 +00021 10.0364010754 10.033142897 +00022 9.9678777136 10.3401433342 +00023 9.9490251639 10.048815697 +00024 10.2081153569 9.7356741508 +00025 9.9570713519 10.3380561866 +00026 10.2848058713 10.2612123135 +00027 10.0367532914 9.881463012 +00028 9.9394777833 9.8033954281 +00029 10.3024249623 10.2459711714 +00030 9.8460800216 9.9275337768 +00031 0.0411836404 5.4633030866 +00032 0.0139924297 4.5859670157 +00033 -0.4310357985 5.1511811554 +00034 -0.3548044058 4.9971822733 +00035 -0.2065391374 4.6706733169 +00036 0.3792866979 5.1858242378 +00037 0.0223456313 5.0171648356 +00038 0.4665682914 4.8223001752 +00039 0.2108448666 5.0367557812 +00040 -0.3157195455 5.4294636419 \ No newline at end of file diff --git a/receipts/example/utt2grp_example b/receipts/example/utt2grp_example new file mode 100644 index 0000000..346b9a4 --- /dev/null +++ b/receipts/example/utt2grp_example @@ -0,0 +1,40 @@ +00001 1 +00002 1 +00003 1 +00004 1 +00005 1 +00006 1 +00007 1 +00008 1 +00009 1 +00010 1 +00011 2 +00012 2 +00013 2 +00014 2 +00015 2 +00016 2 +00017 2 +00018 2 +00019 2 +00020 2 +00021 3 +00022 3 +00023 3 +00024 3 +00025 3 +00026 3 +00027 3 +00028 3 +00029 3 +00030 3 +00031 4 +00032 4 +00033 4 +00034 4 +00035 4 +00036 4 +00037 4 +00038 4 +00039 4 +00040 4