what are the principle components of my model

1 visualización (últimos 30 días)
Maryam Alkaissy
Maryam Alkaissy el 11 de Oct. de 2021
Respondida: Prachi Kulkarni el 19 de Oct. de 2021
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

Respuestas (1)

Prachi Kulkarni
Prachi Kulkarni el 19 de Oct. de 2021
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.

Categorías

Más información sobre Dimensionality Reduction and Feature Extraction en Help Center y File Exchange.

Productos


Versión

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by