How to find respective features from Principal Components
Hello Everyone!
I have a feature matrix of 4378*54. After doing PCA, I get a reduced feature matrix of 4378*29. I have used a threshold variance of 95%.
In summary, 29 principal components explain 95% of variance in my feature matrix.
How can I find the respective features in my feature matrix from the 29 principal components? Ofcourse, these 29 principal components correspond to 29 features in my feature matrix which have 54 features. How can I find those features?
I am using PCA function which gives me coeff, scores, latent and explained.
Secondly, do I have to use same PCA for both training and testing dataset? I have read in an article that I have to store the selected coeff (95% variance) from training dataset and multiply this with my testing dataset which will yield a reduced feature matrix. I have tried it and it works. But how it works, I dont understand.
Your comments will be highly appreciated.Hello Everyone!
I have a feature matrix of 4378*54. After doing PCA, I get a reduced feature matrix of 4378*29. I have used a threshold variance of 95%.
In summary, 29 principal components explain 95% of variance in my feature matrix.
How can I find the respective features in my feature matrix from the 29 principal components? Ofcourse, these 29 principal components correspond to 29 features in my feature matrix which have 54 features. How can I find those features?
I am using PCA function which gives me coeff, scores, latent and explained.
Secondly, do I have to use same PCA for both training and testing dataset? I have read in an article that I have to store the selected coeff (95% variance) from training dataset and multiply this with my testing dataset which will yield a reduced feature matrix. I have tried it and it works. But how it works, I dont understand.
Your comments will be highly appreciated. Hello Everyone!
I have a feature matrix of 4378*54. After doing PCA, I get a reduced feature matrix of 4378*29. I have used a threshold variance of 95%.
In summary, 29 principal components explain 95% of variance in my feature matrix.
How can I find the respective features in my feature matrix from the 29 principal components? Ofcourse, these 29 principal components correspond to 29 features in my feature matrix which have 54 features. How can I find those features?
I am using PCA function which gives me coeff, scores, latent and explained.
Secondly, do I have to use same PCA for both training and testing dataset? I have read in an article that I have to store the selected coeff (95% variance) from training dataset and multiply this with my testing dataset which will yield a reduced feature matrix. I have tried it and it works. But how it works, I dont understand.
Your comments will be highly appreciated. pca, features, machine learning MATLAB Answers — New Questions