8c65ef658930afecb7001ce671f15772a0a4b23b,tests/gpflow/optimizers/test_mcmc.py,,test_mcmc_helper_target_function_no_transforms,#Any#,120

Before Change


     Verifies the objective for a set of priors where no transforms are set.
    
    data = build_data()
    model = build_model(data)
    expected_log_prior = 0.0
    prior_width = 200.0

    hmc_helper = gpflow.optimizers.SamplingHelper(
        model.log_posterior_density, model.trainable_parameters
    )

    for param in model.trainable_parameters:
        param.transform = None
        low_value = -100
        high_value = low_value + prior_width
        param.prior = Uniform(low=np.float64(low_value), high=np.float64(high_value))
        param.prior_on = prior_on

        prior_density = 1 / prior_width
        expected_log_prior += np.log(prior_density)

After Change


     Verifies the objective for a set of priors where no transforms are set.
    
    expected_log_prior = 0.0
    prior_width = 200.0

    data = build_data()
    model = build_model_with_uniform_prior(data, prior_on, prior_width)

    hmc_helper = gpflow.optimizers.SamplingHelper(
        model.log_posterior_density, model.trainable_parameters
    )
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 15

Instances


Project Name: GPflow/GPflow
Commit Name: 8c65ef658930afecb7001ce671f15772a0a4b23b
Time: 2020-08-17
Author: art.art.v@gmail.com
File Name: tests/gpflow/optimizers/test_mcmc.py
Class Name:
Method Name: test_mcmc_helper_target_function_no_transforms


Project Name: GPflow/GPflow
Commit Name: 8c65ef658930afecb7001ce671f15772a0a4b23b
Time: 2020-08-17
Author: art.art.v@gmail.com
File Name: tests/gpflow/optimizers/test_mcmc.py
Class Name:
Method Name: test_mcmc_helper_target_function_unconstrained


Project Name: GPflow/GPflow
Commit Name: f3c511060ce62072a34a50319237d28b82d10448
Time: 2020-08-27
Author: dutordoirv@gmail.com
File Name: tests/gpflow/optimizers/test_mcmc.py
Class Name:
Method Name: test_mcmc_helper_target_function_no_transforms


Project Name: GPflow/GPflow
Commit Name: f3c511060ce62072a34a50319237d28b82d10448
Time: 2020-08-27
Author: dutordoirv@gmail.com
File Name: tests/gpflow/optimizers/test_mcmc.py
Class Name:
Method Name: test_mcmc_helper_target_function_unconstrained


Project Name: GPflow/GPflow
Commit Name: 8c65ef658930afecb7001ce671f15772a0a4b23b
Time: 2020-08-17
Author: art.art.v@gmail.com
File Name: tests/gpflow/optimizers/test_mcmc.py
Class Name:
Method Name: test_mcmc_helper_target_function_no_transforms