Truncated SVD vs PCA on sparse data.
mediumAnswer
- PCA subtracts the mean → densifies sparse matrices (bad for TF-IDF, one-hot).
- Truncated SVD (scikit-learn's TruncatedSVD, also known as LSA in text) does SVD without centering → preserves sparsity, scales to millions of features.
- Standard for topic modeling (LSA), sparse recommender matrices.
- Coordinates and variance interpretations same as PCA, just without the mean shift.
Check yourself — multiple choice
- Same as PCA
- PCA centers → densifies sparse data; TruncatedSVD skips centering → preserves sparsity; standard for TF-IDF (LSA), sparse recsys
- Random
- Not real
TruncatedSVD: PCA without centering; preserves sparsity of TF-IDF.
#dimensionality-reduction#pca
Practise Unsupervised Learning
214 interview questions in this topic.