1313
1414from ..base import BaseEstimator , TransformerMixin
1515from ..utils import check_array , check_random_state
16- from ..utils .extmath import randomized_svd , lobpcg_svd , safe_sparse_dot , svd_flip
16+ from ..utils .extmath import randomized_svd , lobpcg_svd ,\
17+ safe_sparse_dot , svd_flip
1718from ..utils .sparsefuncs import mean_variance_axis
1819
1920__all__ = ["TruncatedSVD" ]
@@ -33,8 +34,8 @@ class TruncatedSVD(BaseEstimator, TransformerMixin):
3334 context, it is known as latent semantic analysis (LSA).
3435
3536 This estimator supports 3 algorithms: a fast randomized SVD solver, and
36- a "naive" algorithm that uses ARPACK or LOBPCG as an eigensolver on (X * X.T) or
37- (X.T * X), whichever is more efficient.
37+ a "naive" algorithm that uses ARPACK or LOBPCG as an eigensolver
38+ on the normal matrix (X * X.T) or (X.T * X), whichever is more efficient.
3839
3940 Read more in the :ref:`User Guide <LSA>`.
4041
@@ -48,11 +49,13 @@ class TruncatedSVD(BaseEstimator, TransformerMixin):
4849
4950 algorithm : string, default = "randomized"
5051 SVD solver to use. Either "arpack" for the ARPACK wrapper in SciPy
51- (scipy.sparse.linalg.svds), or "lobpcg" for LOBPCG (scipy.sparse.linalg.lobpcg),
52- or "randomized" for the randomized algorithm due to Halko (2009).
52+ (scipy.sparse.linalg.svds), or
53+ "lobpcg" for LOBPCG (scipy.sparse.linalg.lobpcg) Knyazev (2001), or
54+ "randomized" for the randomized algorithm due to Halko (2009).
5355
5456 n_iter : int, optional (default 5)
55- Number of iterations for randomized or LOBPCG SVD solver. Not used by ARPACK.
57+ Number of iterations for randomized or LOBPCG SVD solver.
58+ Not used by ARPACK.
5659 The default is larger than the default in `randomized_svd` to handle
5760 sparse matrices that may have large slowly decaying spectrum.
5861
0 commit comments