TruncatedSVD: Calculate explained variance.

Fixes #3047
Merge pull request #3067 from mdbecker/truncated_svd_calculate_explained_variance

[MRG+2] TruncatedSVD: Calculate explained variance.