Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for issue #7563 #7573

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 30 additions & 30 deletions pymc/distributions/continuous.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def get_tau_sigma(

class Uniform(BoundedContinuous):
r"""
Continuous uniform log-likelihood.
Continuous uniform distribution.

The pdf of this distribution is

Expand Down Expand Up @@ -360,7 +360,7 @@ def rng_fn(cls, rng, size):


class Flat(Continuous):
"""Uninformative log-likelihood that returns 0 regardless of the passed value."""
"""Uninformative distribution that returns 0 regardless of the passed value."""

rv_op = flat

Expand Down Expand Up @@ -417,7 +417,7 @@ def logcdf(value):

class Normal(Continuous):
r"""
Univariate normal log-likelihood.
Univariate normal distribution.

The pdf of this distribution is

Expand Down Expand Up @@ -558,7 +558,7 @@ def rng_fn(

class TruncatedNormal(BoundedContinuous):
r"""
Univariate truncated normal log-likelihood.
Univariate truncated normal distribution.

The pdf of this distribution is

Expand Down Expand Up @@ -745,7 +745,7 @@ def truncated_normal_default_transform(op, rv):

class HalfNormal(PositiveContinuous):
r"""
Half-normal log-likelihood.
Half-normal distribution.

The pdf of this distribution is

Expand Down Expand Up @@ -875,7 +875,7 @@ def rng_fn(cls, rng, mu, lam, alpha, size) -> np.ndarray:

class Wald(PositiveContinuous):
r"""
Wald log-likelihood.
Wald distribution.

The pdf of this distribution is

Expand Down Expand Up @@ -1055,7 +1055,7 @@ def rng_fn(cls, rng, alpha, beta, size) -> np.ndarray:

class Beta(UnitContinuous):
r"""
Beta log-likelihood.
Beta distribution.

The pdf of this distribution is

Expand Down Expand Up @@ -1241,7 +1241,7 @@ def rv_op(cls, a, b, *, size=None, rng=None):

class Kumaraswamy(UnitContinuous):
r"""
Kumaraswamy log-likelihood.
Kumaraswamy distribution.

The pdf of this distribution is

Expand Down Expand Up @@ -1331,7 +1331,7 @@ def logcdf(value, a, b):

class Exponential(PositiveContinuous):
r"""
Exponential log-likelihood.
Exponential distribution.

The pdf of this distribution is

Expand Down Expand Up @@ -1426,7 +1426,7 @@ def icdf(value, mu):

class Laplace(Continuous):
r"""
Laplace log-likelihood.
Laplace distribution.

The pdf of this distribution is

Expand Down Expand Up @@ -1548,7 +1548,7 @@ def rv_op(cls, b, kappa, mu, *, size=None, rng=None):

class AsymmetricLaplace(Continuous):
r"""
Asymmetric-Laplace log-likelihood.
Asymmetric-Laplace distribution.

The pdf of this distribution is

Expand Down Expand Up @@ -1639,7 +1639,7 @@ def logp(value, b, kappa, mu):

class LogNormal(PositiveContinuous):
r"""
Log-normal log-likelihood.
Log-normal distribution.

Distribution of any random variable whose logarithm is normally
distributed. A variable might be modeled as log-normal if it can
Expand Down Expand Up @@ -1758,7 +1758,7 @@ def icdf(value, mu, sigma):

class StudentT(Continuous):
r"""
Student's T log-likelihood.
Student's T distribution.

Describes a normal variable whose precision is gamma distributed.
If only nu parameter is passed, this specifies a standard (central)
Expand Down Expand Up @@ -1904,7 +1904,7 @@ def rng_fn(cls, rng, a, b, mu, sigma, size=None) -> np.ndarray:

class SkewStudentT(Continuous):
r"""
Skewed Student's T distribution log-likelihood.
Skewed Student's T distribution distribution.

This follows Jones and Faddy (2003)

Expand Down Expand Up @@ -2019,7 +2019,7 @@ def icdf(value, a, b, mu, sigma):

class Pareto(BoundedContinuous):
r"""
Pareto log-likelihood.
Pareto distribution.

Often used to characterize wealth distribution, or other examples of the
80/20 rule.
Expand Down Expand Up @@ -2128,7 +2128,7 @@ def pareto_default_transform(op, rv):

class Cauchy(Continuous):
r"""
Cauchy log-likelihood.
Cauchy distribution.

Also known as the Lorentz or the Breit-Wigner distribution.

Expand Down Expand Up @@ -2216,7 +2216,7 @@ def icdf(value, alpha, beta):

class HalfCauchy(PositiveContinuous):
r"""
Half-Cauchy log-likelihood.
Half-Cauchy distribution.

The pdf of this distribution is

Expand Down Expand Up @@ -2300,7 +2300,7 @@ def icdf(value, loc, beta):

class Gamma(PositiveContinuous):
r"""
Gamma log-likelihood.
Gamma distribution.

Represents the sum of alpha exponentially distributed random variables,
each of which has rate beta.
Expand Down Expand Up @@ -2429,7 +2429,7 @@ def icdf(value, alpha, scale):

class InverseGamma(PositiveContinuous):
r"""
Inverse gamma log-likelihood, the reciprocal of the gamma distribution.
Inverse gamma distribution, the reciprocal of the gamma distribution.

The pdf of this distribution is

Expand Down Expand Up @@ -2545,7 +2545,7 @@ def logcdf(value, alpha, beta):

class ChiSquared:
r"""
:math:`\chi^2` log-likelihood.
:math:`\chi^2` distribution.

This is the distribution from the sum of the squares of :math:`\nu` independent standard normal random variables or a special
case of the gamma distribution with :math:`\alpha = \nu/2` and :math:`\beta = 1/2`.
Expand Down Expand Up @@ -2617,7 +2617,7 @@ def rng_fn(cls, rng, alpha, beta, size) -> np.ndarray:

class Weibull(PositiveContinuous):
r"""
Weibull log-likelihood.
Weibull distribution.

The pdf of this distribution is

Expand Down Expand Up @@ -2738,7 +2738,7 @@ def rv_op(cls, nu, sigma, *, size=None, rng=None) -> np.ndarray:

class HalfStudentT(PositiveContinuous):
r"""
Half Student's T log-likelihood.
Half Student's T distribution.

The pdf of this distribution is

Expand Down Expand Up @@ -2859,7 +2859,7 @@ def rv_op(cls, mu, sigma, nu, *, size=None, rng=None):

class ExGaussian(Continuous):
r"""
Exponentially modified Gaussian log-likelihood.
Exponentially modified Gaussian distribution.

Results from the convolution of a normal distribution with an exponential
distribution.
Expand Down Expand Up @@ -2982,7 +2982,7 @@ def logcdf(value, mu, sigma, nu):

class VonMises(CircularContinuous):
r"""
Univariate VonMises log-likelihood.
Univariate VonMises distribution.

The pdf of this distribution is

Expand Down Expand Up @@ -3068,7 +3068,7 @@ def rng_fn(cls, rng, mu, sigma, alpha, size=None) -> np.ndarray:

class SkewNormal(Continuous):
r"""
Univariate skew-normal log-likelihood.
Univariate skew-normal distribution.

The pdf of this distribution is

Expand Down Expand Up @@ -3163,7 +3163,7 @@ def logp(value, mu, sigma, alpha):

class Triangular(BoundedContinuous):
r"""
Continuous Triangular log-likelihood.
Continuous Triangular distribution.

The pdf of this distribution is

Expand Down Expand Up @@ -3292,7 +3292,7 @@ def triangular_default_transform(op, rv):

class Gumbel(Continuous):
r"""
Univariate right-skewed Gumbel log-likelihood.
Univariate right-skewed Gumbel distribution.

This distribution is typically used for modeling maximum (or extreme) values.
Those looking to find the extreme minimum provided by the left-skewed Gumbel should
Expand Down Expand Up @@ -3519,7 +3519,7 @@ def logp(value, b, sigma):

class Logistic(Continuous):
r"""
Logistic log-likelihood.
Logistic distribution.

The pdf of this distribution is

Expand Down Expand Up @@ -3627,7 +3627,7 @@ def rv_op(cls, mu, sigma, *, size=None, rng=None):

class LogitNormal(UnitContinuous):
r"""
Logit-Normal log-likelihood.
Logit-Normal distribution.

The pdf of this distribution is

Expand Down Expand Up @@ -3872,7 +3872,7 @@ def rng_fn(cls, rng, mu, sigma, size=None) -> np.ndarray:

class Moyal(Continuous):
r"""
Moyal log-likelihood.
Moyal distribution.

The pdf of this distribution is

Expand Down
16 changes: 8 additions & 8 deletions pymc/distributions/discrete.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@

class Binomial(Discrete):
R"""
Binomial log-likelihood.
Binomial distribution.

The discrete probability distribution of the number of successes
in a sequence of n independent yes/no experiments, each of which
Expand Down Expand Up @@ -176,7 +176,7 @@ def logcdf(value, n, p):

class BetaBinomial(Discrete):
R"""
Beta-binomial log-likelihood.
Beta-binomial distribution.

Equivalent to binomial random variable with success probability
drawn from a beta distribution.
Expand Down Expand Up @@ -293,7 +293,7 @@ def logcdf(value, n, alpha, beta):


class Bernoulli(Discrete):
R"""Bernoulli log-likelihood.
R"""Bernoulli distribution.

The Bernoulli distribution describes the probability of successes
(x=1) and failures (x=0).
Expand Down Expand Up @@ -413,7 +413,7 @@ def rv_op(cls, q, beta, *, size=None, rng=None):


class DiscreteWeibull(Discrete):
R"""Discrete Weibull log-likelihood.
R"""Discrete Weibull distribution.

The discrete Weibull distribution is a flexible model of count data that
can handle both over- and under-dispersion.
Expand Down Expand Up @@ -506,7 +506,7 @@ def logcdf(value, q, beta):

class Poisson(Discrete):
R"""
Poisson log-likelihood.
Poisson distribution.

Often used to model the number of events occurring in a fixed period
of time when the times at which events occur are independent.
Expand Down Expand Up @@ -602,7 +602,7 @@ def logcdf(value, mu):

class NegativeBinomial(Discrete):
R"""
Negative binomial log-likelihood.
Negative binomial distribution.

The negative binomial distribution describes a Poisson random variable
whose rate parameter is gamma distributed.
Expand Down Expand Up @@ -750,7 +750,7 @@ def logcdf(value, n, p):

class Geometric(Discrete):
R"""
Geometric log-likelihood.
Geometric distribution.

The probability that the first success in a sequence of Bernoulli
trials occurs on the x'th trial.
Expand Down Expand Up @@ -1084,7 +1084,7 @@ def icdf(value, lower, upper):

class Categorical(Discrete):
R"""
Categorical log-likelihood.
Categorical distribution.

The most general discrete distribution. The pmf of this distribution is

Expand Down
2 changes: 1 addition & 1 deletion pymc/distributions/distribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ def rv_op(cls, c, *, size=None, rng=None):

class DiracDelta(Discrete):
r"""
DiracDelta log-likelihood.
DiracDelta distribution.

Parameters
----------
Expand Down
Loading