Solved – R or python implementation of sparse PCA for p>n

pcapythonrsparse

According to this paper, there are 2 algorithms to perform sparse PCA. One is better if $p>n$. I need to run SPCA on a $2000\times12000$ matrix so I am looking for an implementation of this algorithm. There is an sparse PCA implementation in sklearn and one in the R package elasticnet but I think they are the $n>p$ version.

Where can I find an implementation of this algorithm?

Best Answer

A possible solution is to use the standard sparse PCA algorithm and increase the ridge penalty coefficient.

There are probably better solutions but this is what I did.

Related Question