From 8004d48e51531a332b4e839ce7dc94ff9e3b71ce Mon Sep 17 00:00:00 2001 From: Mathias Quillot Date: Wed, 24 Jul 2019 23:47:21 +0200 Subject: [PATCH] Tests for testing specific python scripts --- tests/out.out | 1 + tests/test_measures.sh | 16 ++++++++++------ tests/test_plot.sh | 7 +++++++ 3 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 tests/out.out create mode 100755 tests/test_plot.sh diff --git a/tests/out.out b/tests/out.out new file mode 100644 index 0000000..48f45b2 --- /dev/null +++ b/tests/out.out @@ -0,0 +1 @@ +{"train": {"entropy": 1.3025047473338538, "vscore": 0.5194735901935822, "homogeneity": 0.6366754890541141, "completeness": 0.46540789220203976}, "val": {"entropy": 1.2294383486264313, "vscore": 0.5448713554323219, "homogeneity": 0.6570568455376826, "completeness": 0.46540789220203976}, "disequilibrium": 0.028002350845353036} \ No newline at end of file diff --git a/tests/test_measures.sh b/tests/test_measures.sh index fb9e8f0..1ea8413 100755 --- a/tests/test_measures.sh +++ b/tests/test_measures.sh @@ -1,8 +1,12 @@ -k_fold=2 -k=88 +#features_file="../data/pvectors_1rst/pvectors_teacher_${k_fold}.txt" +features_file="../data/ivectors.txt" +exp_dir="../exp/kmeans_euclidian/ivectors" +k_fold=1 +k=2 + +python3 "../bin/measure_clustering.py" "${exp_dir}/${k_fold}/${k}/clustered_${k}.txt" \ + "${features_file}" \ + "../data/pvectors_1rst/lst/train_1.lst" \ + "../data/pvectors_1rst/lst/val_1.lst" -python3 "../bin/measure_clustering.py" "../exp/kmeans_teacher_1/pvector-1/${k_fold}/${k}/clustered_${k}.txt" \ - "../data/pvectors_1rst/pvectors_teacher_${k_fold}.txt" \ - ../data/pvectors_1rst/lst/train_1.lst \ - ../data/pvectors_1rst/lst/val_1.lst diff --git a/tests/test_plot.sh b/tests/test_plot.sh new file mode 100755 index 0000000..ca5b6b3 --- /dev/null +++ b/tests/test_plot.sh @@ -0,0 +1,7 @@ + +kfold=2 +k=45 + +python3 ../bin/plot-count-matrix.py ../exp/kmeans_teacher_1/pvector-1/${kfold}/${k}/clustered_${k}.txt \ + ../data/masseffect.lst \ + ../data/pvectors_1rst/lst/train_${kfold}.lst -- 1.8.2.3