Skip to content

Instantly share code, notes, and snippets.

@mazumdarparijat
Last active August 29, 2015 13:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mazumdarparijat/8716105 to your computer and use it in GitHub Desktop.
Save mazumdarparijat/8716105 to your computer and use it in GitHub Desktop.
PCA bug
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