mattjj / pyslds

MIT License
90 stars 35 forks source link

Meanfield with DefaultWeakLimitStickyHDPSLDS not implemented #17

Closed DanteArucard closed 7 years ago

DanteArucard commented 7 years ago

Dear Matthew,

I found that DefaultWeakLimitStickyHDPSLDS does not support meanfield inference, I think you wrote something about that here in this comment. In fact WeakLimitStickyHDPHMMTransitions does not implement the meanfield update.

I was still trying to extract the models after training (as other attempted @eliotmoss , @mg10011 ,and me)

I wanted to try StickyHDPSLDS because with normal HDPSLDS i get high errors (specially with meanfield) and gibbs should be affected by the label switching issue. (Or it is not?) I thought that high errors could be caused by excessive switching frequency

AaronIntro commented 7 years ago

Dear Matthew,

I also found the WeakLimitHDPHSMM does not support meanfield_sgdstep. In my project I found the resampling method could not convergence for a particular day (e.g. the last day of time series). The latent state is switching between two different states ( [0,1,2] three states for e.g.). I think the SVI method may be suitable, however it could not work within the error as follows,

AttributeError: 'WeakLimitHDPHSMMTransitions' object has no attribute 'exp_expected_log_trans_matrix'

slinderman commented 7 years ago

Hi Aaron, The WeakLimit* models only support Gibbs sampling. Only the regular HMMSLDS supports mean field variational inference. Can you try that instead? For what it's worth, SVI requires some tuning of minibatch sizes and learning rates, and it's not a priori clear to me that it will be more effective that Gibbs in this setting (though still worth a shot!). It could be that the Gibbs sampler is reflecting genuine uncertainty about the latent state in the last day.

@mattjj I opened https://github.com/mattjj/pyhsmm/issues/78 (and assigned to myself) as a result of this issue. I don't think WeakLimit models should expose mean field interfaces.

--Scott