@@ -130,14 +130,18 @@ class PCA(_BasePCA):
130130
131131 n_components == min(n_samples, n_features)
132132
133- if n_components == 'mle' and svd_solver == 'full', Minka\' s MLE is used
134- to guess the dimension
135- if ``0 < n_components < 1`` and svd_solver == 'full', select the number
136- of components such that the amount of variance that needs to be
133+ If ``n_components == 'mle'`` and ``svd_solver == 'full'``, Minka\' s
134+ MLE is used to guess the dimension. Use of ``n_components == 'mle'``
135+ will interpret ``svd_solver == 'auto'`` as ``svd_solver == 'full'``.
136+
137+ If ``0 < n_components < 1`` and ``svd_solver == 'full'``, select the
138+ number of components such that the amount of variance that needs to be
137139 explained is greater than the percentage specified by n_components.
138- If svd_solver == 'arpack', the number of components must be strictly
139- less than the minimum of n_features and n_samples.
140- Hence, the None case results in:
140+
141+ If ``svd_solver == 'arpack'``, the number of components must be
142+ strictly less than the minimum of n_features and n_samples.
143+
144+ Hence, the None case results in::
141145
142146 n_components == min(n_samples, n_features) - 1
143147
@@ -386,8 +390,8 @@ def _fit(self, X):
386390 # Handle svd_solver
387391 svd_solver = self .svd_solver
388392 if svd_solver == 'auto' :
389- # Small problem, just call full PCA
390- if max (X .shape ) <= 500 :
393+ # Small problem or n_components == 'mle' , just call full PCA
394+ if max (X .shape ) <= 500 or n_components == 'mle' :
391395 svd_solver = 'full'
392396 elif n_components >= 1 and n_components < .8 * min (X .shape ):
393397 svd_solver = 'randomized'
0 commit comments