Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _repr_latex_(self, name=None, dist=None):
if dist is None:
dist = self
nu = dist.nu
mu = dist.mu
lam = dist.lam
name = r'\text{%s}' % name
return r'${} \sim \text{{StudentT}}(\mathit{{nu}}={},~\mathit{{mu}}={},~\mathit{{lam}}={})$'.format(name,
get_variable_name(nu),
get_variable_name(mu),
get_variable_name(lam))
def _repr_latex_(self, name=None, dist=None):
if dist is None:
dist = self
k = dist.k
tau_e = dist.tau_e
name = r"\text{%s}" % name
return r"${} \sim \text{{AR1}}(\mathit{{k}}={},~\mathit{{tau_e}}={})$".format(
name, get_variable_name(k), get_variable_name(tau_e)
)
def _repr_latex_(self, name=None, dist=None):
if dist is None:
dist = self
p = dist.p
name = r'\text{%s}' % name
return r'${} \sim \text{{Bernoulli}}(\mathit{{p}}={})$'.format(name,
get_variable_name(p))
def _repr_latex_(self, name=None, dist=None):
if dist is None:
dist = self
sigma = dist.sigma
mu = dist.mu
name = r'\text{%s}' % name
return r'${} \sim \text{{Normal}}(\mathit{{mu}}={},~\mathit{{sigma}}={})$'.format(name,
get_variable_name(mu),
get_variable_name(sigma))
def _repr_latex_(self, name=None, dist=None):
if dist is None:
dist = self
n = dist.n
p = dist.p
name = r'\text{%s}' % name
return r'${} \sim \text{{Binomial}}(\mathit{{n}}={},~\mathit{{p}}={})$'.format(name,
get_variable_name(n),
get_variable_name(p))
def _repr_latex_(self, name=None, dist=None):
if dist is None:
dist = self
theta = dist.theta
psi = dist.psi
name = r'\text{%s}' % name
return r'${} \sim \text{{ZeroInflatedPoisson}}(\mathit{{theta}}={},~\mathit{{psi}}={})$'.format(name,
get_variable_name(theta),
get_variable_name(psi))
def _repr_latex_(self, name=None, dist=None):
if dist is None:
dist = self
alpha = dist.alpha
beta = dist.beta
name = r'\text{%s}' % name
return r'${} \sim \text{{Cauchy}}(\mathit{{alpha}}={},~\mathit{{beta}}={})$'.format(name,
get_variable_name(alpha),
get_variable_name(beta))
def _repr_cov_params(self, dist=None):
if dist is None:
dist = self
if self._cov_type == 'chol':
chol = get_variable_name(self.chol_cov)
return r'\mathit{{chol}}={}'.format(chol)
elif self._cov_type == 'cov':
cov = get_variable_name(self.cov)
return r'\mathit{{cov}}={}'.format(cov)
elif self._cov_type == 'tau':
tau = get_variable_name(self.tau)
return r'\mathit{{tau}}={}'.format(tau)
def _repr_cov_params(self, dist=None):
if dist is None:
dist = self
if self._cov_type == 'chol':
chol = get_variable_name(self.chol_cov)
return r'\mathit{{chol}}={}'.format(chol)
elif self._cov_type == 'cov':
cov = get_variable_name(self.cov)
return r'\mathit{{cov}}={}'.format(cov)
elif self._cov_type == 'tau':
tau = get_variable_name(self.tau)
return r'\mathit{{tau}}={}'.format(tau)
def _repr_latex_(self, name=None, dist=None):
if dist is None:
dist = self
mu = dist.mu
sd = dist.sd
name = r"\text{%s}" % name
return r"${} \sim \text{{GaussianRandomWalk}}(\mathit{{mu}}={},~\mathit{{sd}}={})$".format(
name, get_variable_name(mu), get_variable_name(sd)
)