Translating values to gradient color scale

1 visualización (últimos 30 días)
guyklx
guyklx el 14 de En. de 2020
I have a weighted PCA with 2 variables:
[wcoeff,score,~,~,~] = pca(vars,'VariableWeights','variance');
coefforth = inv(diag(std(vars)))* wcoeff;
figure(1)
biplot(coefforth(:,1:2),'scores',score(:,1:2));
How can I "translate" the values of "Component 1" (just one axis) to a color gradient map that I could use to color code another plot?
For example: the right-most datapoints in "Component 1" as blue and a color gradient to the left-most datapoints of "Component 1" in red.
Also, the PCA spreads the datapoints in a perpendicular angle, is there a way to spread the data in a 180 degree angle? In other words, is there a way to set the direction?

Respuestas (0)

Categorías

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

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by