def converter_kernellocallylinearembedding_modular(data,k):
	from shogun.Features import RealFeatures
	from shogun.Converter import KernelLocallyLinearEmbedding
	from shogun.Kernel import LinearKernel
	
	features = RealFeatures(data)
		
	kernel = LinearKernel()

	converter = KernelLocallyLinearEmbedding(kernel)
	converter.set_target_dim(1)
	converter.set_k(k)
	converter.apply(features)

	return features
def converter_kernellocallylinearembedding_modular(data, k):
    from shogun.Features import RealFeatures
    from shogun.Converter import KernelLocallyLinearEmbedding
    from shogun.Kernel import LinearKernel

    features = RealFeatures(data)

    kernel = LinearKernel()

    converter = KernelLocallyLinearEmbedding(kernel)
    converter.set_target_dim(1)
    converter.set_k(k)
    converter.apply(features)

    return features
def converter_kernellocallylinearembedding_modular (data,k):
	try:
		from shogun.Features import RealFeatures
		from shogun.Converter import KernelLocallyLinearEmbedding
		from shogun.Kernel import LinearKernel
		
		features = RealFeatures(data)
			
		kernel = LinearKernel()

		converter = KernelLocallyLinearEmbedding(kernel)
		converter.set_target_dim(1)
		converter.set_k(k)
		converter.apply(features)

		return features
	except ImportError:
		print('No Eigen3 available')
Ejemplo n.º 4
0
def converter_kernellocallylinearembedding_modular(data, k):
    try:
        from shogun.Features import RealFeatures
        from shogun.Converter import KernelLocallyLinearEmbedding
        from shogun.Kernel import LinearKernel

        features = RealFeatures(data)

        kernel = LinearKernel()

        converter = KernelLocallyLinearEmbedding(kernel)
        converter.set_target_dim(1)
        converter.set_k(k)
        converter.apply(features)

        return features
    except ImportError:
        print('No Eigen3 available')