Exemplo n.º 1
0
 def _logpdf(self, x):
     # values of the PDF at the central value
     if x < self.central_value:
         # left-hand side: scale factor
         r = 2*self.p_right/(self.p_left+self.p_right)
         return math.log(r) + normal_logpdf(x, self.central_value, self.left_deviation)
     else:
         # left-hand side: scale factor
         r = 2*self.p_left/(self.p_left+self.p_right)
         return math.log(r) + normal_logpdf(x, self.central_value, self.right_deviation)
Exemplo n.º 2
0
 def logpdf(self, x):
     return normal_logpdf(x, self.central_value, self.standard_deviation)
Exemplo n.º 3
0
 def _logpdf(self, x):
     if np.sign(self.standard_deviation) * (x - self.central_value) < 0:
         return -np.inf
     else:
         return math.log(2) + normal_logpdf(x, self.central_value, abs(self.standard_deviation))