Bayesian PCA (and some other models)?

80 views
Skip to first unread message

Jaakko Luttinen

unread,
Nov 18, 2014, 1:35:19 PM11/18/14
to py...@googlegroups.com
Hi,

I am trying to implement Bayesian PCA in PyMC. I found this post:
http://stackoverflow.com/questions/26532931/bayesian-pca-using-pymc

I modified it slightly and got this:
http://dpaste.com/0GWZMPV

However, even for small datasets (e.g., 10x100), memory usage is huge
and computations take practically forever. Am I doing something wrong or
is PyMC just unsuitable for the problem?

I'd also like to implement the following models:
* mixture of Gaussians
* hidden Markov model with some emission distribution (e.g., Gaussian)
* linear state-space model (i.e., "PCA" with linear Markovian dynamics)

Is it possible to implement these in PyMC for datasets that have
100-10000 samples with 10-1000 dimensions? Are there any ready-made
implementations available?

Thanks for any help!

Best regards,
Jaakko Luttinen

Thomas Wiecki

unread,
Nov 19, 2014, 5:53:23 AM11/19/14
to py...@googlegroups.com
Hi Jaakko,

I don't see much wrong with your code, except that pymc2 makes this a bit cumbersome. PyMC3 actually might allow you to express the matrix algebra more succinctly and the algebraic simplifications might also help.

Thomas


--
You received this message because you are subscribed to the Google Groups "PyMC" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pymc+uns...@googlegroups.com.
To post to this group, send email to py...@googlegroups.com.
Visit this group at http://groups.google.com/group/pymc.
For more options, visit https://groups.google.com/d/optout.



--
Thomas Wiecki, PhD
Quantitative Researcher, Quantopian Inc, Boston
Reply all
Reply to author
Forward
0 new messages