4 ms·
In my experience, Stan performance is decent with many models, particularly if all relevant operations are vectorized and the data sets are "reasonable." Howeve
by chmullig 11y ago
In my experience, Stan performance is decent with many models, particularly if all relevant operations are vectorized and the data sets are "reasonable." However it's easy to accidentally walk off a cliff, and write a model that takes days to fit. Additionally the real time output is a little lackluster, so it's hard to know how you're doing until it finishes (I hear they're working on that for ShinyStan).
I haven't done any HMMs or CRFs with Stan, but don't see why you couldn't do them. Passing in the data likely requires some tricks with arrays and indexing, but it's totally doable. Probably unlikely that you'd beat standard, custom algorithms, but if your HMM was part of a larger model, it might make sense.
- jrnold 11y agoAdmittedly Stan doesn't work for all problems, but where I've seen a lot of issues in "bad" performance by Stan is when people try to fit models that are unidentified or weakly identified. Unlike some other algorithms which will give back the wrong answer quickly with the user none the wiser, Stan's HMC will try to do what the model says - sample over the whole unidentified space, and it takes a while to sample R^n. What I've seen in Stan's mailing list is that in practice a lot of people have been fitting poorly identified models without realizing it.