Example #1
0
 def var(self):
     try:
         return self._var
     except AttributeError:
         return square(self.std)
Example #2
0
 def _pdf(self, x):
     return (1 / (np.pi * self.scale * (1 + square(
         (x - self.loc) / self.scale))))
Example #3
0
 def tau(self):
     try:
         return self._tau
     except AttributeError:
         return 1 / square(self.std)
Example #4
0
 def _pdf(self, x):
     return (
         exp(-0.5 * square((x - self.mu) / self.std))
         / sqrt(2 * np.pi) / self.std
     )
Example #5
0
 def forward(self):
     eps = normal(0, 1, (self.ndim, ) + self.std.shape)
     return sqrt(square(self.std * eps).sum(axis=0))
Example #6
0
 def _log_pdf(self, x):
     return ((self.ndim - 1) * log(x) - 0.5 * square(x / self.std) -
             self.ndim * log(self.std) - np.log(sp.gamma(0.5 * self.ndim)))
 def _pdf(self, x):
     gauss = (exp(-0.5 * square(
         (x - self.mu) / self.std)) / sqrt(2 * np.pi) / self.std)
     return (self.coef * gauss).sum(axis=self.axis)
Example #8
0
 def _log_pdf(self, x):
     return (
         -np.log(np.pi)
         - log(self.scale)
         - log(1 + square((x - self.loc) / self.scale))
     )
Example #9
0
 def _pdf(self, x):
     return (exp(-0.5 * square(
         (x - self.mu) / self.std)) / sqrt(2 * np.pi) / self.std)
Example #10
0
 def var(self):
     try:
         return self._var
     except AttributeError:
         return square(self.std)
Example #11
0
 def tau(self):
     try:
         return self._tau
     except AttributeError:
         return 1 / square(self.std)
Example #12
0
 def var(self):
     return square(self.parameter["std"])
Example #13
0
 def _pdf(self, x):
     gauss = (
         exp(-0.5 * square((x - self.mu) / self.std))
         / sqrt(2 * np.pi) / self.std
     )
     return (self.coef * gauss).sum(axis=self.axis)
Example #14
0
 def _log_pdf(self, x):
     return (-np.log(np.pi) - log(self.scale) -
             log(1 + square((x - self.loc) / self.scale)))
 def var(self):
     return square(self.parameter["std"])
Example #16
0
def kl_gaussian(q, p):
    qvar = square(q.std)
    pvar = square(p.std)
    return log(p.std) - log(q.std) + 0.5 * (qvar + square(p.mean - q.mean)) / pvar - 0.5
Example #17
0
 def _pdf(self, x):
     return (
         1 / (np.pi * self.scale * (1 + square((x - self.loc) / self.scale)))
     )