Repository navigation
Replies: 2 comments
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


Uh oh!
There was an error while loading. Please reload this page.
PCA Elbow Question
as the exercise quote:
I ran PCA on a synthetic dataset created with
sklearn.datasets.make_classificationusing:n_samples = 5000n_features = 50n_informative = 5Then I plotted the cumulative explained variance ratio from PCA.
What I observed
What I want to ask
Why does the explained variance curve look so linear in this case?
Is it because:
n_informative = 5only means 5 features are useful for predicting the label, not that the data is actually 5-dimensional in the PCA sense?Are there ways to generate or transform the dataset so that PCA shows a clearer elbow near 5 components like different
make_classificationsettings ?If not, what method could I use to be able to find the number of informative features is 5 from the generated datasets?
Current cumulative variance output
Code I ran using sklearn
All reactions