コード例 #1
0
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
コード例 #2
0
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
コード例 #3
0
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')
コード例 #4
0
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')