1. Home
  2. Data Science
  3. Scikit-learn
  4. For a fitted PCA with as many components as features, what…

Added 30 Nov -0001

For a fitted PCA with as many components as features, what must be true of explained_variance_ratio_?

  1. It sums to 1.0 only when whitening is enabled on the transform call
  2. It sums to the number of features, since each ratio is left unnormalised
  3. It always sums to under 1, because centring discards some variance
  4. It sums to 1.0, because the retained components span the whole space Correct answer

Correct answer

D. It sums to 1.0, because the retained components span the whole space

22 views

MCQSEXAM

Explanation

explained_variance_ratio_ reports the share of total variance carried by each component, so retaining every component makes the ratios sum to 1. Keeping a subset sums to less than 1, and setting n_components=0.95 keeps the smallest number of components that reach 95 percent. PCA centres the data first, so the ratios describe variance about the mean rather than raw sum of squares.

Reference

Asked in: NTS, PPSC IT, Interviews

Preparing for an exam?

Doubts & discussion

Not sure why the answer is D? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Scikit-learn MCQs

Practise all Scikit-learn MCQs

Similar MCQs