On Fri, Apr 06, 2012 at 08:18:45PM +0300, Vlad Niculae wrote: > Hi Shankar > > I am also following the PGM class and I would like to stress out that the way > they implement all the factor operations feels to me to be by no means > efficient, way too much random memory indexing. However the class seems very > insightful, maybe after it ends we will be illuminated as to how to design > some PGM algorithms to fit inside scikit-learn. > > In this case there seems to be a clear tradeoff between generality and > efficiency.
Absolutely. If you know the structure of your model a priori you can write your code to explicitly take advantage of that. General purpose Bayes net code can in principle be useful for exploration (and PyMC does a good job of this in the Bayesian setting), but often a human can see better ways of doing things for specialized cases. This applies to statistical issues as well as computational issues: e.g. if you know that your graph is bipartite like an RBM, you can write efficient block Gibbs samplers. In some hierarchical models, you can analytically integrate out certain intermediate variables and write an efficient "collapsed" sampler for the quantities you actually care about. On the deterministic side of things, successfully applying variational EM can rely heavily upon choosing an appropriately structured approximating distribution, heavily contingent on the structure of the original posterior. David ------------------------------------------------------------------------------ For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 _______________________________________________ Scikit-learn-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
