Esempio n. 1
0
 def test_approx_simple(self):
     m = mr.multiplex_red(self.sample_filelist)
     part = m.compute_partitions_approx()
     assert part == [(0.12253003685170516, [[0], [1], [2], [3]]),
                     (0.14136825670745423, [[1], [2], [0, 3]]),
                     (0.19553392690309745, [[1], [2, 0, 3]]),
                     (0.0, [[1, 2, 0, 3]])]
     m.dump_partitions_approx()
Esempio n. 2
0
 def test_approx(self):
     m = mr.multiplex_red(self.sample_filelist)
     m.compute_layer_entropies_approx()
     m.compute_JSD_matrix_approx()
     m.reduce_approx()
     m.compute_partitions_approx()
     m.dump_partitions_approx()
     m.draw_dendrogram_approx()
Esempio n. 3
0
 def test_simple(self):
     m = mr.multiplex_red(self.sample_filelist)
     part = m.compute_partitions()
     assert part == [(0.15661326155470412, [[0], [1], [2], [3]]),
                     (0.17899837524783313, [[1], [2], [0, 3]]),
                     (0.2394715269325508, [[1], [2, 0, 3]]),
                     (0.0, [[1, 2, 0, 3]])]
     m.dump_partitions()
Esempio n. 4
0
#  General Public License for more details.
# 
#  You should have received a copy of the GNU General Public License
#  long with this program.  If not, see  <http://www.gnu.org/licenses/>.
# 

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]"

Esempio n. 5
0
#
#
#  This program is free software: you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation, either version 3 of the License, or
#  (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful, but
#  WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
#  General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  long with this program.  If not, see  <http://www.gnu.org/licenses/>.
#

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()
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation, either version 3 of the License, or
#  (at your option) any later version.  
# 
#  This program is distributed in the hope that it will be useful, but
#  WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
#  General Public License for more details.
# 
#  You should have received a copy of the GNU General Public License
#  long with this program.  If not, see  <http://www.gnu.org/licenses/>.
# 


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()

Esempio n. 7
0
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
#  General Public License for more details.
# 
#  You should have received a copy of the GNU General Public License
#  long with this program.  If not, see  <http://www.gnu.org/licenses/>.
# 


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()