예제 #1
0
    def __init__(self):
        self.y_star = np.array([1.3])
        self.y_dim = 1

        self.prior = distr.uniform
        self.prior_args = [0, 4 * np.pi]

        self.rng = [0, 4 * np.pi]

        self.proposal = distr.normal
        self.proposal_args = [3]
        self.use_log = False

        self.true_posterior_rng = self.rng
        proportional = lambda x: distr.normal.pdf(
            self.y_star, self.true_function(x), 0.2)
        self.true_posterior = distr.proportional(proportional)
        self.true_posterior_args = []

        self.simulator_args = ['theta']
예제 #2
0
    def __init__(self):
        self.y_star = np.array([2.0])
        self.true_args = [2.1150]
        self.y_dim = 1

        self.prior = distr.uniform
        self.prior_args = [-10, 10]

        self.true_posterior_rng = [-3.5, 3.5]
        proportional = lambda x: distr.normal.pdf(
            self.y_star, self.true_function(x), 0.1 + x ** 2)
        self.true_posterior = distr.proportional(proportional)
        self.true_posterior_args = []

        self.rng = [-10, 10]
        self.simulator_args = ['theta']

        self.proposal = distr.normal
        self.proposal_args = [2]
        self.use_log = False
예제 #3
0
    def __init__(self):
        self.y_star = np.array([0.1])
        self.y_dim = 1

        self.prior = distr.uniform
        self.prior_args = [0, 1.5 * np.pi]

        self.rng = [0, 1.5* np.pi]

        self.proposal = distr.normal
        self.proposal_args = [1]
        self.use_log = False

        self.true_posterior_rng = self.rng
        proportional = lambda x: distr.gamma.pdf(
            np.clip(self.true_function(x) - self.y_star, 0, 1e100), 2, 2)
            #np.clip(self.y_star + self.true_function(x), 0, 1e100), 2, 2)
        self.true_posterior = distr.proportional(proportional, 0, 1.5 * np.pi)
        self.true_posterior_args = []

        self.simulator_args = ['theta']
예제 #4
0
    def __init__(self):
        self.y_star = np.array([2.0])
        self.true_args = np.array([2.1150])
        self.y_dim = 1

        self.simulator_args = ['theta']

        self.prior = distr.uniform
        self.prior_args = [-4, 4]

        self.true_posterior_rng = [-3.5, 3.5]
        proportional = lambda x: distr.gamma.pdf(
            np.clip(self.true_function(x) - self.y_star, 0, 1e100), 2, 2)
        self.true_posterior = distr.proportional(proportional, -3.5, 3.5)
        self.true_posterior_args = []

        self.rng = [-4, 4]

        self.proposal = distr.normal
        self.proposal_args = [2]
        self.use_log = False
예제 #5
0
    def __init__(self):
        self.y_star = np.array([7])
        self.y_dim = 1

        self.prior = distr.uniform
        self.prior_args = [0, 2 * np.pi]

        self.rng = [0, 2 * np.pi]

        self.proposal = distr.normal
        self.proposal_args = [1.5]
        self.use_log = False

        proportional = lambda x: distr.normal.pdf(
            self.y_star, 2 * np.sin(x) + 3 , 0.5) + \
                distr.normal.pdf(self.y_star, 6 * np.sin(x) + 3, 0.5)
        self.true_posterior_rng = [0, np.pi]
        self.true_posterior = distr.proportional(proportional, lower_limit=0, upper_limit=2 * np.pi)
        self.true_posterior_args = []

        self.simulator_args = ['theta']