In [4]:
%run chordmap.py

In [24]:
pylab.rcParams['figure.figsize'] = (16.0, 14.0)

In [5]:
lin_mds_4, lin_mds_trans_4 = get_mds(chords_i_dists_square, 4)

In [26]:
import chordmap_vis

In [18]:
chordmap_vis.plot_3d(lin_mds_trans_4)


Automatic pdb calling has been turned ON

In [29]:
lin_mds_3_iso, lin_mds_trans_3_iso = get_mds(chords_i_dists_square, 3, metric=False)


breaking at iteration 3 with stress 253465.677111
breaking at iteration 3 with stress 252115.280565
breaking at iteration 3 with stress 252688.262829
breaking at iteration 3 with stress 252278.917875

In [30]:
chordmap_vis.plot_3d(lin_mds_trans_3_iso)



In [31]:
def dump_projection(filename, coords):
    with tables.open_file(filename, 'w') as handle:
        data_atom_type = tables.Float32Atom()
        filt=tables.Filters(complevel=5)
        handle.create_carray("/",'v_coords',
            atom=data_atom_type, shape=coords.shape,
            title="coords",
            filters=filt)[:] = coords

In [32]:
dump_projection("lin_mds_3_iso.h5", lin_mds_trans_3_iso)

In [33]:
lin_mds_trans_3_iso


Out[33]:
array([[ 0.40509848,  0.2004914 , -0.06529322],
       [-0.34752214, -0.19361325, -0.17031964],
       [ 0.35920622, -0.21678383, -0.12695896],
       ..., 
       [-0.23630984, -0.07617637, -0.49398426],
       [-0.30509823, -0.18715336,  0.45278048],
       [ 0.0199306 ,  0.18840002,  0.21555255]])

In [34]:
dump_projection("lin_mds_4.h5", lin_mds_trans_4)

In [ ]: