title: How to use scikit-learn PCA for features reduction and know which features are discarded
body: <p>I am trying to run a PCA on a matrix of dimensions m x n where m is the number of features and n the number of samples.</p>
  
  <p>Suppose I want to preserve the <code>nf</code> features with the maximum variance. With <code>scikit-learn</code> I am able to do it in this way:</p>
  
  <pre><code>from sklearn.decomposition import PCA
  
  nf = 100
  pca = PCA(n_components=nf)
  # X is the matrix transposed (n samples on the rows, m features on the columns)
  pca.fit(X)
  
  X_new = pca.transform(X)
  </code></pre>
  
  <p>Now, I get a new matrix <code>X_new</code> that has a shape of n x nf. Is it possible to know which features have been discarded or the retained ones?</p>
  
  <p>Thanks</p>