# Can PCA explained variance be computed from the components (or from SVD matrices)?

I'm looking to use Spark to calculate PCAs. However I need to get the explained variance for each component and the PCAModel class doesn't appear to provide that.

Is there a way to calculated the explained variance from the component vectors? If so, how would I do this?

If not, can I do this using the SVD? If so, how do I go from the SVD components (U, s, V) to explained variance (and PCA components)?

• It does now! Use explainedVariance Jun 20, 2017 at 15:47