Sklearn and PCA. Why is max n_row == max n_components?
Given m rows of n columns, I think it's natural to think of the data as n-dimensional. However the inherent dimension d of the data may be lower; d &lt;= n. d is the rank of the m x n matrix you could form from the data. The dimensionality of the data can be reduced to d with no loss of information, even. The same actually goes for rows, which is less intuitive but true; d &lt;= m. So, it always makes sense to reduce dimensionality to something &lt;= d since there's no loss; we typically reduce much further. This is why it won't let you reduce to more than the number of rows.