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!