Forgive me if this a too much of a beginner question but I am PCA algorithm on a dataset with having a hard time understanding the implemenation of PCA on a dataset with 18 features. These are the questions I have regarding this:
PCA normally reduce the dimensionality from n to k. In my case, the number of features i.e. n = 18. How can I determine to what level I reduce my dimensions i.e. k value ?
I used the below code to do PCA (got this from one of the tutorials)
from sklearn.decomposition import PCA pca = PCA(n_components=3) print norm_features.shape pca.fit(norm_features) print pca.components_
- It returns a total of three vectors. Should I consider that as my reduced dimension ?
Every example that I see on the internet uses their own dataset and one example is completely different from another and I am unable to generalize on this concept. Any pointers to some resources ?