Principal Component Analysis (PCA) in matlab

15 views (last 30 days)
NN
NN on 2 Dec 2020
Edited: KALYAN ACHARJYA on 2 Dec 2020
Hi,
I am trying to do neural network forecasting of data and i would like to apply PCA to the input data (both testing and training ).
Can i use the syntax coeff = pca(X) for converting input data to get the principal components and use the output of this command as training and test data for neural network.
Is there any other procedures to follow and especially to improve accuracy
Or should i use this command ?

Answers (1)

KALYAN ACHARJYA
KALYAN ACHARJYA on 2 Dec 2020
Edited: KALYAN ACHARJYA on 2 Dec 2020
To perform principal component analysis directly on the data matrix, use pca.
Matlab Doc Suggested:
pcacov does not standardize V to have unit variances. To perform principal component analysis on standardized variables, use the correlation matrix R = V./(SD*SD'), where SD = sqrt(diag(V)), in place of V. To perform principal component analysis directly on the data matrix, use pca.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!