what are the principle components of my model

조회 수: 1 (최근 30일)
Maryam Alkaissy
Maryam Alkaissy 2021년 10월 11일
답변: Prachi Kulkarni 2021년 10월 19일
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

답변 (1개)

Prachi Kulkarni
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.

카테고리

Help CenterFile Exchange에서 Dimensionality Reduction and Feature Extraction에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by