Archetypal analysis in Python


My Master's project was about uncovering evolutionarily archetypal personality types from large amounts of personality data. Computationally, this involved rendering Big Five personality tests in a 5D space and running an archetypal analysis algorithm to find the extreme corner points that best enclosed the data in a simplex (a sort of 5-dimensional triangle with six corners).

At the time when I was doing the analysis, the best code for doing this was based on a 2012 paper by Morten Mørup and Lars Kai Hansen, and written in Matlab. I'm not a big fan of writing cross-language code so I ended up taking their original Matlab code and translating the whole thing to Python. The resulting package is called py_pcha and can be installed with pip (pip install py_pcha). Check it out on Github. It's pretty fast.