PCA(n_components=0.95) is fitted on standardised data. What does the 0.95 select?
Correct answer
D. The smallest number of components whose cumulative explained variance reaches 95%
18 views
D. The smallest number of components whose cumulative explained variance reaches 95%
18 views
Explained variance ratio sums to 1 across all components, so passing a float below 1 to n_components keeps components until the cumulative sum reaches that fraction. The selected count is stored in n_components_ after fitting. Scaling first matters because PCA maximises variance, so an unscaled column measured in rupees would dominate one measured in metres.
Asked in: NTS, PPSC IT, Interviews
Not sure why the answer is D? Ask here and get an explanation.