def converter_factoranalysis_modular(data): try: from shogun.Features import RealFeatures from shogun.Converter import FactorAnalysis from shogun.Distance import EuclideanDistance features = RealFeatures(data) converter = FactorAnalysis() converter.set_target_dim(2) embedding = converter.apply(features) return embedding except ImportError: print('No Eigen3 available')
def converter_factoranalysis_modular(data): try: from shogun.Features import RealFeatures from shogun.Converter import FactorAnalysis from shogun.Distance import EuclideanDistance features = RealFeatures(data) converter = FactorAnalysis() converter.set_target_dim(2) embedding = converter.apply(features) X = embedding.get_feature_matrix() covdet = numpy.linalg.det(numpy.dot(X,X.T)) return covdet > 0 except ImportError: print('No Eigen3 available')
def converter_factoranalysis_modular(data): try: from shogun.Features import RealFeatures from shogun.Converter import FactorAnalysis from shogun.Distance import EuclideanDistance features = RealFeatures(data) converter = FactorAnalysis() converter.set_target_dim(2) embedding = converter.apply(features) X = embedding.get_feature_matrix() covdet = numpy.linalg.det(numpy.dot(X, X.T)) return covdet > 0 except ImportError: print('No Eigen3 available')