diff --git a/sklearn/decomposition/_pca.py b/sklearn/decomposition/_pca.py index 80ac7e856dfd0..ac4a1d1d9816b 100644 --- a/sklearn/decomposition/_pca.py +++ b/sklearn/decomposition/_pca.py @@ -32,7 +32,8 @@ def _assess_dimension(spectrum, rank, n_samples): """Compute the log-likelihood of a rank ``rank`` dataset. The dataset is assumed to be embedded in gaussian noise of shape(n, - dimf) having spectrum ``spectrum``. + dimf) having spectrum ``spectrum``. This implements the method of + T. P. Minka. Parameters ---------- @@ -50,10 +51,11 @@ def _assess_dimension(spectrum, rank, n_samples): ll : float The log-likelihood. - Notes - ----- + References + ---------- This implements the method of `Thomas P. Minka: - Automatic Choice of Dimensionality for PCA. NIPS 2000: 598-604` + Automatic Choice of Dimensionality for PCA. NIPS 2000: 598-604 + `_ """ n_features = spectrum.shape[0] @@ -271,26 +273,30 @@ class PCA(_BasePCA): References ---------- - For n_components == 'mle', this class uses the method of *Minka, T. P. - "Automatic choice of dimensionality for PCA". In NIPS, pp. 598-604* + For n_components == 'mle', this class uses the method from: + `Minka, T. P.. "Automatic choice of dimensionality for PCA". + In NIPS, pp. 598-604 `_ Implements the probabilistic PCA model from: - Tipping, M. E., and Bishop, C. M. (1999). "Probabilistic principal + `Tipping, M. E., and Bishop, C. M. (1999). "Probabilistic principal component analysis". Journal of the Royal Statistical Society: Series B (Statistical Methodology), 61(3), 611-622. + `_ via the score and score_samples methods. - See http://www.miketipping.com/papers/met-mppca.pdf For svd_solver == 'arpack', refer to `scipy.sparse.linalg.svds`. For svd_solver == 'randomized', see: - *Halko, N., Martinsson, P. G., and Tropp, J. A. (2011). + `Halko, N., Martinsson, P. G., and Tropp, J. A. (2011). "Finding structure with randomness: Probabilistic algorithms for constructing approximate matrix decompositions". - SIAM review, 53(2), 217-288.* and also - *Martinsson, P. G., Rokhlin, V., and Tygert, M. (2011). + SIAM review, 53(2), 217-288. + `_ + and also + `Martinsson, P. G., Rokhlin, V., and Tygert, M. (2011). "A randomized algorithm for the decomposition of matrices". - Applied and Computational Harmonic Analysis, 30(1), 47-68.* + Applied and Computational Harmonic Analysis, 30(1), 47-68 + `_. Examples --------