Last active
August 29, 2015 13:55
-
-
Save mazumdarparijat/8716105 to your computer and use it in GitHub Desktop.
PCA bug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from modshogun import * | |
from numpy import array | |
obsmatrix = array([[1.,2.,3.,4.],[5.,6.,7.,8.],[10.,11.,12.,13.]]) | |
train_features = RealFeatures(obsmatrix) | |
preprocessor = PCA() | |
preprocessor.init(train_features) | |
preprocessor.set_target_dim(2) | |
print preprocessor.get_target_dim() | |
mat = preprocessor.apply_to_feature_matrix(train_features) | |
print mat |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment