Skip to content

Commit d8614a3

Browse files
ogriseljnothman
authored andcommitted
DOC better docstring for TruncatedSVD (scikit-learn#7651)
1 parent e4a1d82 commit d8614a3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

sklearn/decomposition/truncated_svd.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ class TruncatedSVD(BaseEstimator, TransformerMixin):
2626
"""Dimensionality reduction using truncated SVD (aka LSA).
2727
2828
This transformer performs linear dimensionality reduction by means of
29-
truncated singular value decomposition (SVD). It is very similar to PCA,
30-
but operates on sample vectors directly, instead of on a covariance matrix.
31-
This means it can work with scipy.sparse matrices efficiently.
29+
truncated singular value decomposition (SVD). Contrary to PCA, this
30+
estimator does not center the data before computing the singular value
31+
decomposition. This means it can work with scipy.sparse matrices
32+
efficiently.
3233
3334
In particular, truncated SVD works on term count/tf-idf matrices as
3435
returned by the vectorizers in sklearn.feature_extraction.text. In that

0 commit comments

Comments
 (0)