Borrar filtros
Borrar filtros

How could I graph the percent of variance by PC component?

3 visualizaciones (últimos 30 días)
Chanille
Chanille el 17 de Feb. de 2023
Respondida: the cyclist el 18 de Feb. de 2023
I am trying to replicate these graphs with my own data but the pca function doesn't give this graphs explicitly. Do I have to extract these numbers from the code and plot them elsewhere? (explained vs. pc) If so, would I just plot explained vs. pc (is that the simplest way to do it? anD THE SIMPLEST WAY TO plot the scores vs. each pC? I am sure there's a quick fix but I wanted to make sure i had different options. Thanks

Respuesta aceptada

the cyclist
the cyclist el 18 de Feb. de 2023
You are correct that the pca function does not have an option to plot directly, and you do need to take the output and then plot it.
You are also correct that to get a scree plot like the one you attached, the easiest way is just plot the explained output from pca.
To get the other graph, that you included as an image, you probably want to use the histogram function on the score output. If you want three sets of axes in one figure, as shown, then I'd suggest the tiledlayout function.

Más respuestas (0)

Categorías

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

Community Treasure Hunt

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

Start Hunting!

Translated by