title: Finding the dimension with highest variance using scikit-learn PCA
body: <p>I need to use pca to identify the dimensions with the highest variance of a certain set of data. I'm using scikit-learn's pca to do it, but I can't identify from the output of the pca method what are the components of my data with the highest variance. Keep in mind that I don't want to eliminate those dimensions, only identify them.</p>
  
  <p>My data is organized as a matrix with 150 rows of data, each one with 4 dimensions. I'm doing as follow:</p>
  
  <pre class="lang-py prettyprint-override"><code>pca = sklearn.decomposition.PCA()
  pca.fit(data_matrix)
  </code></pre>
  
  <p>When I print <strong>pca.explained_variance_ratio_</strong>, it outputs an array of variance ratios ordered from highest to lowest, but it doesn't tell me which dimension from the data they correspond to (I've tried changing the order of columns on my matrix, and the resulting variance ratio array was the same). </p>
  
  <p>Printing <strong>pca.components_</strong> gives me a 4x4 matrix (I left the original number of components as argument to pca) with some values I can't understand the meaning of...according to scikit's documentation, they should be the components with the maximum variance (the eigenvectors perhaps?), but no sign of which dimension those values refer to.</p>
  
  <p>Transforming the data doesn't help either, because the dimensions are changed in a way I can't really know which one they were originally.</p>
  
  <p>Is there any way I can get this information with scikit's pca? Thanks</p>