SHARE
TWEET

Untitled

a guest Jun 24th, 2019 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. pca = PCA(n_components=data.shape[1])
  2. pca.fit(data)                
  3.  
  4. original_features_total_var = numpy.sum(original_features_var)
  5. pca_feature_total_var = numpy.sum( pca.explained_variance_  )
  6.  
  7. assert abs( original_features_total_var -  pca_feature_total_var ) < 0.01
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top