예제 #1
0
 def _stats(self, a, b):
     nA, nB = self._cdfa, self._cdfb
     d = nB - nA
     pA, pB = crv_helper._norm_pdf(a), crv_helper._norm_pdf(b)
     mu = (pA - pB) / d  # correction sign
     mu2 = 1 + (a * pA - b * pB) / d - mu * mu
     return mu, mu2, None, None
예제 #2
0
 def _pdf(self, x, *args):
     accum = np.zeros((len(x)))
     for pos, prob in zip(self.discrete_d.xk, self.discrete_d.pk):
         x_transl = (x - pos) / self.smooth_scale
         accum = np.asarray([
             acc + prob * _norm_pdf(x_) for acc, x_ in zip(accum, x_transl)
         ])
     # accum /= len(self.discrete_d.xk)
     return accum
예제 #3
0
 def _pdf(self, x):
     return _norm_pdf((x - self.mean) / self.sigma) / self.sigma / self.norm
예제 #4
0
 def _pdf(self, x, a, b):
     return crv_helper._norm_pdf(x) / self._delta
예제 #5
0
 def _pdf(self, x):
     return _norm_pdf((x - self.mean) / self.sigma) / self.sigma / self.norm
예제 #6
0
def ndtri_grad_hess(x):
    f = ndtri(x)
    phi = _norm_pdf(f)
    grad = np.reciprocal(phi)
    hess = grad ** 2 * f
    return f, grad, hess
예제 #7
0
def ndtri_grad(x):
    return np.reciprocal(_norm_pdf(ndtri(x)))