what are the principle components of my model
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi,
I am using Classification learner to get a pridiction model of my data.
My data is in the format of Excel sheet.
Applying 95% variance explained for my PCA, the model is highlighting that there are 5 PCs that explain my model (as shown in the picture). How can I know which components are the PCs of my model?
I am new to coding - and basically using Classification learner for a project.
I have reviewed the manual and I exported the model to generate the code. However, I am stuck at this end.
I came accross this function: [coeff,score,latent] = pca(ingredients) -"ingredients" is just an example matlab file-. Shall I insert my data file name? I tried this and it didn't work
댓글 수: 0
답변 (1개)
Prachi Kulkarni
2021년 10월 19일
Hi,
The PCA option in the Classification Learner app, uses the pca function.
Let your data matrix be called data. You can insert your data matrix in the pca function as follows.
coeff = pca(data);
The columns of coeff are the principal components of your data.
For more information about the pca function, please refer to the following documentation.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!