def converter_diffusionmaps_modular(data,t):
	from shogun.Features import RealFeatures
	from shogun.Converter import DiffusionMaps
	from shogun.Kernel import GaussianKernel
	
	features = RealFeatures(data)
		
	converter = DiffusionMaps()
	converter.set_target_dim(1)
	converter.set_kernel(GaussianKernel(10,10.0))
	converter.set_t(t)
	converter.apply(features)

	return features
def converter_diffusionmaps_modular(data, t):
    from shogun.Features import RealFeatures
    from shogun.Converter import DiffusionMaps
    from shogun.Kernel import GaussianKernel

    features = RealFeatures(data)

    converter = DiffusionMaps()
    converter.set_target_dim(1)
    converter.set_kernel(GaussianKernel(10, 10.0))
    converter.set_t(t)
    converter.apply(features)

    return features
def converter_diffusionmaps_modular(data, t):
    try:
        from shogun.Features import RealFeatures
        from shogun.Converter import DiffusionMaps
        from shogun.Kernel import GaussianKernel

        features = RealFeatures(data)

        converter = DiffusionMaps()
        converter.set_target_dim(1)
        converter.set_kernel(GaussianKernel(10, 10.0))
        converter.set_t(t)
        converter.apply(features)

        return features
    except ImportError:
        print('No Eigen3 available')
def converter_diffusionmaps_modular (data,t):
	try: 
		from shogun.Features import RealFeatures
		from shogun.Converter import DiffusionMaps
		from shogun.Kernel import GaussianKernel
		
		features = RealFeatures(data)
			
		converter = DiffusionMaps()
		converter.set_target_dim(1)
		converter.set_kernel(GaussianKernel(10,10.0))
		converter.set_t(t)
		converter.apply(features)

		return features
	except ImportError:
		print('No Eigen3 available')
Exemple #5
0
lmds = MultidimensionalScaling()
lmds.set_landmark(True)
lmds.set_landmark_number(20)
converters.append(
    (lmds, "Landmark MDS with %d landmarks" % lmds.get_landmark_number()))

from shogun.Converter import Isomap
cisomap = Isomap()
cisomap.set_k(9)
converters.append((cisomap, "Isomap with k=%d" % cisomap.get_k()))

from shogun.Converter import DiffusionMaps
from shogun.Kernel import GaussianKernel
dm = DiffusionMaps()
dm.set_t(2)
dm.set_width(1000.0)
converters.append(
    (dm, "Diffusion Maps with t=%d, sigma=%f" % (dm.get_t(), dm.get_width())))

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

from shogun.Converter import LocalTangentSpaceAlignment
ltsa = LocalTangentSpaceAlignment()
ltsa.set_k(6)
converters.append((ltsa, "LTSA with k=%d" % (ltsa.get_k())))

from shogun.Converter import LaplacianEigenmaps
Exemple #6
0
lmds = MultidimensionalScaling()
lmds.set_landmark(True)
lmds.set_landmark_number(20)
converters.append(
    (lmds, "Landmark MDS with %d landmarks" % lmds.get_landmark_number()))

from shogun.Converter import Isomap
cisomap = Isomap()
cisomap.set_k(9)
converters.append((cisomap, "Isomap with k=%d" % cisomap.get_k()))

from shogun.Converter import DiffusionMaps
from shogun.Kernel import GaussianKernel
dm = DiffusionMaps()
dm.set_t(20)
kernel = GaussianKernel(100, 1.0)
dm.set_kernel(kernel)
converters.append(
    (dm,
     "Diffusion Maps with t=%d, sigma=%f" % (dm.get_t(), kernel.get_width())))

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

from shogun.Converter import LocalTangentSpaceAlignment
ltsa = LocalTangentSpaceAlignment()
ltsa.set_k(6)
converters.append((ltsa, "LTSA with k=%d" % (ltsa.get_k())))
Exemple #7
0
converters.append((mds, "Classic MDS"))

lmds = MultidimensionalScaling()
lmds.set_landmark(True)
lmds.set_landmark_number(20)
converters.append((lmds,"Landmark MDS with %d landmarks" % lmds.get_landmark_number()))

from shogun.Converter import Isomap
cisomap = Isomap()
cisomap.set_k(9)
converters.append((cisomap,"Isomap with k=%d" % cisomap.get_k()))

from shogun.Converter import DiffusionMaps
from shogun.Kernel import GaussianKernel
dm = DiffusionMaps()
dm.set_t(20)
kernel = GaussianKernel(100,1.0)
dm.set_kernel(kernel)
converters.append((dm,"Diffusion Maps with t=%d, sigma=%f" % (dm.get_t(),kernel.get_width())))

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

from shogun.Converter import LocalTangentSpaceAlignment
ltsa = LocalTangentSpaceAlignment()
ltsa.set_k(6)
converters.append((ltsa,"LTSA with k=%d" % (ltsa.get_k())))

from shogun.Converter import LaplacianEigenmaps
converters.append((mds, "Classic MDS"))

lmds = MultidimensionalScaling()
lmds.set_landmark(True)
lmds.set_landmark_number(20)
converters.append((lmds,"Landmark MDS with %d landmarks" % lmds.get_landmark_number()))

from shogun.Converter import Isomap
cisomap = Isomap()
cisomap.set_k(9)
converters.append((cisomap,"Isomap with k=%d" % cisomap.get_k()))

from shogun.Converter import DiffusionMaps
from shogun.Kernel import GaussianKernel
dm = DiffusionMaps()
dm.set_t(2)
dm.set_width(1000.0)
converters.append((dm,"Diffusion Maps with t=%d, sigma=%.1f" % (dm.get_t(),dm.get_width())))

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

from shogun.Converter import LocalTangentSpaceAlignment
ltsa = LocalTangentSpaceAlignment()
ltsa.set_k(6)
converters.append((ltsa,"LTSA with k=%d" % (ltsa.get_k())))

from shogun.Converter import LaplacianEigenmaps
le = LaplacianEigenmaps()
Exemple #9
0
converters.append((mds, "Classic MDS"))

lmds = MultidimensionalScaling()
lmds.set_landmark(True)
lmds.set_landmark_number(20)
converters.append((lmds,"Landmark MDS with %d landmarks" % lmds.get_landmark_number()))

from shogun.Converter import Isomap
cisomap = Isomap()
cisomap.set_k(9)
converters.append((cisomap,"Isomap with k=%d" % cisomap.get_k()))

from shogun.Converter import DiffusionMaps
from shogun.Kernel import GaussianKernel
dm = DiffusionMaps()
dm.set_t(1)
kernel = GaussianKernel(100,10.0)
dm.set_kernel(kernel)
converters.append((dm,"Diffusion Maps with t=%d, sigma=%f" % (dm.get_t(),kernel.get_width())))

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

from shogun.Converter import LocalTangentSpaceAlignment
ltsa = LocalTangentSpaceAlignment()
ltsa.set_k(6)
converters.append((ltsa,"LTSA with k=%d" % (ltsa.get_k())))

from shogun.Converter import LaplacianEigenmaps