Hi Everyone,
I am building a Principal Components Analysis from 25 records and got the following biplot (so far, so good!):
I'd like to color the dots according to the corresponding labels (from Label_01 to Label_11, included in the dataset) while also preserving the arrows associated with each parameter (X1, X2, ...) and get an output like the one from the Iris PCA analysis and help the plot interpretation:
I believe I should try to modify the original "Principal Components Analysis" tool but I do not know R and I am afraid to get lost and do worse than good.
Is there anyone here who could give me some tips on how to achieve this? (I have included the corresponding workflow with data)
Thanks,
Pierre-Louis
@pierrelouisbescond no need to mess with R, just use the Interactive chart tool to build your own report 🙂
More info on the tool here: https://help.alteryx.com/20213/designer/interactive-chart-tool
Hi @OllieClarke,
Thanks a lot for the suggestion but I forgot to mention that I need to keep the arrows corresponding to the different parameters and I think that only a "true" PCA output can do that.
Hey @pierrelouisbescond I had a look in the R tool that makes the PCA output, and it uses the biplot() function from the Stats package to do this. Unfortunately it looks like you can only have 2 colours in the biplot, so cannot colour by group. There are other R packages/functions which allow you to create multi-coloured PCA plots, but you would need to write your own R code to do this (or python if you prefer that).
Hi @OllieClarke,
Thanks a lot for investigating! It seems that R libraries such as "factoextra" could to do the trick so I'll explore this path. If I am successful, I'll add the corresponding workflow here 😁 🤞
Thanks @pierrelouisbescond best of luck 👍
Hi @OllieClarke
Happy to be back with a working solution and its corresponding workflow: https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Create-a-label-colored-Principal-Compo... .
I should have used this GIF last Wednesday...