Ejemplo n.º 1
0
    def run_pbp(self):
        env = BostonHousingEnv()
        self.setup_env_defaults(env)

        env.model_name = 'pbp'
        env.n_samples = 100
        env.n_chunks = 20

        env.setup_data_dir()
        self.configure_env_pbp(env, n_epochs=5)
        env.run()
Ejemplo n.º 2
0
    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()
Ejemplo n.º 3
0
    def run_sgld(self):
        env = BostonHousingEnv()
        self.setup_env_defaults(env)

        env.model_name = 'sgld'

        env.n_samples = 100
        env.thinning = 29

        sampler_params = dict()
        sampler_params['step_sizes'] = .001

        sampler_params['fade_in_velocities'] = True

        env.setup_data_dir()
        self.configure_env_mcmc(env, SGLDSampler, sampler_params)
        env.run()
Ejemplo n.º 4
0
    def run_bbb(self):
        env = BostonHousingEnv()
        self.setup_env_defaults(env)

        env.model_name = 'bbb'
        n_epochs = 25

        env.setup_data_dir()
        self.configure_env_bbb(env, n_epochs=n_epochs)
        env.run()
Ejemplo n.º 5
0
    def run_dropout(self):
        env = BostonHousingEnv()
        self.setup_env_defaults(env)

        env.model_name = 'dropout'

        env.n_samples = 100

        sampler_params = dict()
        sampler_params['n_epochs'] = 20

        dropout = 0.05
        tau = 0.159707652696

        env.setup_data_dir()
        self.configure_env_dropout(env,
                                   sampler_params=sampler_params,
                                   dropout=dropout,
                                   tau=tau)
        env.run()
Ejemplo n.º 6
0
    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()