def preprocessor_dimensionreductionpreprocessor_modular(data, k):
    from modshogun import RealFeatures
    from modshogun import DimensionReductionPreprocessor
    from modshogun import LocallyLinearEmbedding

    features = RealFeatures(data)

    converter = LocallyLinearEmbedding()
    converter.set_k(k)

    preprocessor = DimensionReductionPreprocessor(converter)
    preprocessor.init(features)
    preprocessor.apply_to_feature_matrix(features)

    return features
def preprocessor_dimensionreductionpreprocessor_modular (data, k):
	from modshogun import RealFeatures
	from modshogun import DimensionReductionPreprocessor
	try:
		from modshogun import LocallyLinearEmbedding
	except ImportError:
		print("LocallyLinearEmbedding not available")
		exit(0)

	features = RealFeatures(data)

	converter = LocallyLinearEmbedding()
	converter.set_k(k)

	preprocessor = DimensionReductionPreprocessor(converter)
	preprocessor.init(features)
	preprocessor.apply_to_feature_matrix(features)

	return features
예제 #3
0
def preprocessor_dimensionreductionpreprocessor_modular (data, k):
	from modshogun import RealFeatures
	from modshogun import DimensionReductionPreprocessor
	from modshogun import LocallyLinearEmbedding

	features = RealFeatures(data)

	converter = LocallyLinearEmbedding()
	converter.set_k(k)

	preprocessor = DimensionReductionPreprocessor(converter)
	preprocessor.init(features)
	preprocessor.apply_to_feature_matrix(features)

	return features
def preprocessor_dimensionreductionpreprocessor_modular(data, k):
    from modshogun import RealFeatures
    from modshogun import DimensionReductionPreprocessor
    try:
        from modshogun import LocallyLinearEmbedding
    except ImportError:
        print("LocallyLinearEmbedding not available")
        exit(0)

    features = RealFeatures(data)

    converter = LocallyLinearEmbedding()
    converter.set_k(k)

    preprocessor = DimensionReductionPreprocessor(converter)
    preprocessor.init(features)
    preprocessor.apply_to_feature_matrix(features)

    return features