def fit_and_analyze_ddm(self): #from multiprocessing import Pool from hddm.sandbox.model_stopddm import StopDDM model = StopDDM(self.hddm_data.to_records(), is_group_model=False) model.map(runs=2) model.sample(25000, burn=20000) model.print_stats() model.plot_posteriors()
def fit_hddm_stop((data, depends_on)): import hddm from hddm.sandbox.model_stopddm import StopDDM model = StopDDM(data.to_records(), depends_on=depends_on, is_group_model=False) model.create_nodes() model.map(runs=3) model.sample(7000, burn=2000) model.print_stats() print "Logp: %f" % model.mc.logp #hddm.utils.plot_posteriors(model) stats = model.stats() stats['logp'] = model.mc.logp return stats