def preprocessor_classicisomap_modular(data):
	from shogun.Features import RealFeatures
	from shogun.Preprocessor import ClassicIsomap
	
	features = RealFeatures(data)
		
	preprocessor = ClassicIsomap()
	preprocessor.set_target_dim(1)
	preprocessor.apply_to_feature_matrix(features)

	return features
Ejemplo n.º 2
0
def preprocessor_classicisomap_modular(data):
    from shogun.Features import RealFeatures
    from shogun.Preprocessor import ClassicIsomap

    features = RealFeatures(data)

    preprocessor = ClassicIsomap()
    preprocessor.set_target_dim(1)
    preprocessor.apply_to_feature_matrix(features)

    return features
Ejemplo n.º 3
0
from shogun.Preprocessor import LocallyLinearEmbedding
lle = LocallyLinearEmbedding()
lle.set_k(9)
preprocs.append((lle, "Locally Linear Embedding with k=%d" % lle.get_k()))

from shogun.Preprocessor import ClassicMDS
mds = ClassicMDS()
preprocs.append((mds, "Classic MDS"))

from shogun.Preprocessor import LandmarkMDS
lmds = LandmarkMDS()
lmds.set_landmark_number(50)
preprocs.append((lmds,"Landmark MDS with %d landmarks" % lmds.get_landmark_number()))

from shogun.Preprocessor import ClassicIsomap, KISOMAP
cisomap = ClassicIsomap()
cisomap.set_type(KISOMAP)
cisomap.set_k(9)
preprocs.append((cisomap,"Classic K-Isomap with k=%d" % cisomap.get_k()))

from shogun.Preprocessor import LandmarkIsomap
lisomap = LandmarkIsomap()
lisomap.set_landmark_number(50)
lisomap.set_type(KISOMAP)
lisomap.set_k(9)
preprocs.append((lisomap,"L-K-Isomap with k=%d, %d landmarks" % (lisomap.get_k(),lisomap.get_landmark_number())))

import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D

fig = plt.figure()
Ejemplo n.º 4
0
from shogun.Preprocessor import LocallyLinearEmbedding
lle = LocallyLinearEmbedding()
lle.set_k(9)
preprocs.append((lle, "LLE with k=%d" % lle.get_k()))

from shogun.Preprocessor import ClassicMDS
mds = ClassicMDS()
preprocs.append((mds, "Classic MDS"))

from shogun.Preprocessor import LandmarkMDS
lmds = LandmarkMDS()
lmds.set_landmark_number(20)
preprocs.append((lmds,"LMDS with %d landmarks" % lmds.get_landmark_number()))

from shogun.Preprocessor import ClassicIsomap
cisomap = ClassicIsomap()
cisomap.set_k(9)
preprocs.append((cisomap,"K-Isomap with k=%d" % cisomap.get_k()))

from shogun.Preprocessor import LandmarkIsomap
lisomap = LandmarkIsomap()
lisomap.set_landmark_number(500)
lisomap.set_k(9)
preprocs.append((lisomap,"K-LIsomap with k=%d, %d landmarks" % (lisomap.get_k(),lisomap.get_landmark_number())))

from shogun.Preprocessor import HessianLocallyLinearEmbedding
hlle = HessianLocallyLinearEmbedding()
hlle.set_k(6)
preprocs.append((hlle,"Hessian LLE with k=%d" % (hlle.get_k())))

from shogun.Preprocessor import LocalTangentSpaceAlignment
Ejemplo n.º 5
0
from shogun.Preprocessor import LocallyLinearEmbedding
lle = LocallyLinearEmbedding()
lle.set_k(9)
preprocs.append((lle, "LLE with k=%d" % lle.get_k()))

from shogun.Preprocessor import ClassicMDS
mds = ClassicMDS()
preprocs.append((mds, "Classic MDS"))

from shogun.Preprocessor import LandmarkMDS
lmds = LandmarkMDS()
lmds.set_landmark_number(20)
preprocs.append((lmds, "LMDS with %d landmarks" % lmds.get_landmark_number()))

from shogun.Preprocessor import ClassicIsomap
cisomap = ClassicIsomap()
cisomap.set_k(9)
preprocs.append((cisomap, "K-Isomap with k=%d" % cisomap.get_k()))

from shogun.Preprocessor import LandmarkIsomap
lisomap = LandmarkIsomap()
lisomap.set_landmark_number(500)
lisomap.set_k(9)
preprocs.append((lisomap, "K-LIsomap with k=%d, %d landmarks" %
                 (lisomap.get_k(), lisomap.get_landmark_number())))

from shogun.Preprocessor import HessianLocallyLinearEmbedding
hlle = HessianLocallyLinearEmbedding()
hlle.set_k(6)
preprocs.append((hlle, "Hessian LLE with k=%d" % (hlle.get_k())))