summaryrefslogtreecommitdiff
path: root/python/test
diff options
context:
space:
mode:
Diffstat (limited to 'python/test')
-rw-r--r--python/test/simple_test.py22
-rw-r--r--python/test/simple_test_approx.py16
-rw-r--r--python/test/test.py34
-rw-r--r--python/test/test_approx.py34
4 files changed, 106 insertions, 0 deletions
diff --git a/python/test/simple_test.py b/python/test/simple_test.py
new file mode 100644
index 0000000..e2919c6
--- /dev/null
+++ b/python/test/simple_test.py
@@ -0,0 +1,22 @@
+import multired as mr
+import sys
+
+
+if len(sys.argv) < 2:
+ print "Usage: %s <layer_list>" % sys.argv[0]
+ sys.exit(1)
+
+print "Loading layers...",
+m = mr.multiplex_red(sys.argv[1], verbose=True)
+print "[DONE]"
+
+print "Getting partitons...",
+part = m.compute_partitions()
+print "[DONE]"
+
+print "Partitions:..."
+m.dump_partitions()
+
+m.draw_dendrogram()
+
+
diff --git a/python/test/simple_test_approx.py b/python/test/simple_test_approx.py
new file mode 100644
index 0000000..fe2ab30
--- /dev/null
+++ b/python/test/simple_test_approx.py
@@ -0,0 +1,16 @@
+import multired as mr
+import sys
+
+
+if len(sys.argv) < 2:
+ print "Usage: %s <layer_list>" % sys.argv[0]
+ sys.exit(1)
+
+m = mr.multiplex_red(sys.argv[1], verbose=True, fit_degree=20)
+part = m.compute_partitions_approx()
+
+print "Partitions:..."
+m.dump_partitions_approx()
+
+m.draw_dendrogram_approx()
+
diff --git a/python/test/test.py b/python/test/test.py
new file mode 100644
index 0000000..5ccb490
--- /dev/null
+++ b/python/test/test.py
@@ -0,0 +1,34 @@
+import multired as mr
+import sys
+
+
+if len(sys.argv) < 2:
+ print "Usage: %s <layer_list>" % sys.argv[0]
+ sys.exit(1)
+
+print "Loading layers...",
+m = mr.multiplex_red(sys.argv[1])
+print "[DONE]"
+
+print "Computing layer entropies...",
+m.compute_layer_entropies()
+print "[DONE]"
+
+print "Computing JSD matrix...",
+m.compute_JSD_matrix()
+print "[DONE]"
+
+print "Performing reduction...",
+m.reduce()
+print "[DONE]"
+
+print "Getting partitons...",
+part = m.compute_partitions()
+print "[DONE]"
+
+print "Partitions:...",
+m.dump_partitions()
+print "[DONE]"
+
+
+
diff --git a/python/test/test_approx.py b/python/test/test_approx.py
new file mode 100644
index 0000000..353436c
--- /dev/null
+++ b/python/test/test_approx.py
@@ -0,0 +1,34 @@
+import multired as mr
+import sys
+
+
+if len(sys.argv) < 2:
+ print "Usage: %s <layer_list>" % sys.argv[0]
+ sys.exit(1)
+
+print "Loading layers...",
+m = mr.multiplex_red(sys.argv[1])
+print "[DONE]"
+
+print "Computing layer entropies (approx)...",
+m.compute_layer_entropies_approx()
+print "[DONE]"
+
+print "Computing JSD matrix (approx)...",
+m.compute_JSD_matrix_approx()
+print "[DONE]"
+
+print "Performing reduction (approx)...",
+m.reduce_approx()
+print "[DONE]"
+
+
+print "Getting partitons...",
+part = m.compute_partitions_approx()
+print "[DONE]"
+
+print "Partitions:..."
+m.dump_partitions_approx()
+print "[DONE]"
+
+