def run_sghmc(self): env = BostonHousingEnv() self.setup_env_defaults(env) env.model_name = 'sghmc' env.chains_num = 1 env.n_samples = 100 env.thinning = 1 sampler_params = dict() sampler_params['step_sizes'] = .0005 sampler_params['hmc_steps'] = 10 sampler_params['friction'] = 1. sampler_params['fade_in_velocities'] = True env.setup_data_dir() self.configure_env_mcmc(env, SGHMCSampler, sampler_params) env.run()
def run_baseline_hmc(self): env = BostonHousingEnv() self.setup_env_defaults(env) env.model_name = 'hmc' env.test_case_name = 'baseline' env.chains_num = 1 env.n_samples = 100 env.thinning = 4 sampler_params = dict() sampler_params['step_sizes'] = .0005 sampler_params['hmc_steps'] = 10 sampler_params['mh_correction'] = True sampler_params['batch_size'] = None sampler_params['seek_step_sizes'] = False sampler_params['fade_in_velocities'] = True env.setup_data_dir() self.configure_env_mcmc(env, HMCSampler, sampler_params) env.run()