Exemple #1
0
 def test_joint_posterior(self):
     for model, th, z in self.random_setup():
         LB, UB = nd_bounds(lambda th: model.log_p_joint(th, z), th)
         AD = model.D_log_p_joint(th, z)
         self.check_ordered(LB, AD, UB)
Exemple #2
0
 def test_marg_likelihood(self):
     for model, th, z in self.random_setup():
         LB, UB = nd_bounds(lambda th: model.log_p_marg(th), th)
         AD = model.D_log_p_marg(th)
         self.check_ordered(LB, AD, UB)
Exemple #3
0
 def test_pseudo_likelihood(self):
     for model, th, z in self.random_setup():
         LB, UB = nd_bounds(
             lambda th: np.sum(model.log_pseudo_lik(th, z.bright)), th)
         AD = np.sum(model._D_log_pseudo_lik(th, z.bright), axis=0)
         self.check_ordered(LB, AD, UB)
Exemple #4
0
 def test_LB_gap(self):
     for model, th, z in self.random_setup():
         LB, UB = nd_bounds(lambda th: np.sum(model._LBgap(th, z.bright)),
                            th)
         AD = np.sum(model._D_LBgap(th, z.bright), axis=0)
         self.check_ordered(LB, AD, UB)
Exemple #5
0
 def test_bound_product(self):
     for model, th, z in self.random_setup():
         LB, UB = nd_bounds(lambda th: model._logBProduct(th), th)
         AD = model._D_logBProduct(th)
         self.check_ordered(LB, AD, UB)
 def test_joint_posterior(self):
     for model, th, z in self.random_setup():
         LB, UB = nd_bounds(lambda th: model.log_p_joint(th, z), th)
         AD =  model.D_log_p_joint(th, z)
         self.check_ordered(LB, AD, UB)
Exemple #7
0
 def test_prior(self):
     for model, th, z in self.random_setup():
         LB, UB = nd_bounds(model._logPrior, th)
         AD = model._D_logPrior(th)
         self.check_ordered(LB, AD, UB)
 def test_pseudo_likelihood(self):
     for model, th, z in self.random_setup():
         LB, UB = nd_bounds(lambda th: np.sum(model.log_pseudo_lik(th, z.bright)), th)
         AD = np.sum(model._D_log_pseudo_lik(th, z.bright), axis=0)
         self.check_ordered(LB, AD, UB)
 def test_marg_likelihood(self):
     for model, th, z in self.random_setup():
         LB, UB = nd_bounds(lambda th: model.log_p_marg(th), th)
         AD = model.D_log_p_marg(th)
         self.check_ordered(LB, AD, UB)
 def test_bound_product(self):
     for model, th, z in self.random_setup():
         LB, UB = nd_bounds(lambda th: model._logBProduct(th), th)
         AD = model._D_logBProduct(th)
         self.check_ordered(LB, AD, UB)
 def test_LB_gap(self):
     for model, th, z in self.random_setup():
         LB, UB = nd_bounds(lambda th:
                np.sum(model._LBgap(th, z.bright)), th)
         AD = np.sum(model._D_LBgap(th, z.bright), axis=0)
         self.check_ordered(LB, AD, UB)
 def test_prior(self):
     for model, th, z in self.random_setup():
         LB, UB = nd_bounds(model._logPrior, th)
         AD = model._D_logPrior(th)
         self.check_ordered(LB, AD, UB)