Exemple #1
0
def plot_tda(data):
    data = data.reshape((-1, 3))
    plot_3d(data, fname='3d.png')

    foo = em.ExploreMapper(data, slc.SingleLinkageClustering, ff.EccentricityP)
Exemple #2
0
import sys, os
import params
import pathlib

sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '../mapper')))
#sys.path.append('../mapper')


from mapper import em
from mapper import ff
from mapper import slc
from mapper.em_help import *
from em_3d_help import *




mkdir_p(params.PLOT_PATH)


data = read_3d_obj(fname="/Users/xiaosuhu/Documents/Python/mapper-tda/tests/lion_data.npy", fname_obj="/Users/xiaosuhu/Documents/Python/mapper-tda/tests/lion-reference.obj")


plot_3d(data, fname='3dTEST.png')


foo = em.ExploreMapper(data, slc.SingleLinkageClustering, ff.EccentricityP)

Exemple #3
0
import numpy as np
import sys, os
import params

sys.path.insert(0,
                os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
sys.path.insert(
    0, os.path.abspath(os.path.join(os.path.dirname(__file__), '../mapper')))

from mapper import em
from mapper import ff
from mapper import slc
from mapper.em_help import *
from em_3d_help import *

mkdir_p(params.PLOT_PATH)

fname1 = "/Users/xiaosuhu/Documents/Python/mapper-tda/tests/spirals.npy"
data = np.load(fname1)
#data_reorg=np.column_stack((data[:,2], data[:,1], data[:,0]))
'''
fname2="/Users/xiaosuhu/Documents/Python/mapper-tda/tests/lion_data.npy"
datalion=np.load(fname2)
'''
plot_3d(data, fname='franktestsparial.png')
test = em.ExploreMapper(data, slc.NNC, ff.AxisProj)