Skip to content

Commit d24ee39

Browse files
authored
Update mixture.py
Updated the docstrings for better clarity. Replaced "log-likelihood" with "distribution" to accurately describe the functionality, as the class provides more than just log-likelihood, including mean, variance and covariance.
1 parent ce38886 commit d24ee39

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

pymc/distributions/mixture.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757

5858

5959
class MarginalMixtureRV(SymbolicRandomVariable):
60-
"""A placeholder used to specify a log-likelihood for a mixture sub-graph."""
60+
"""A placeholder used to specify a distribution for a mixture sub-graph."""
6161

6262
_print_name = ("MarginalMixture", "\\operatorname{MarginalMixture}")
6363

@@ -163,7 +163,7 @@ def update(self, node: Apply):
163163

164164
class Mixture(Distribution):
165165
R"""
166-
Mixture log-likelihood.
166+
Mixture distribution.
167167
168168
Often used to model subpopulation heterogeneity
169169
@@ -493,7 +493,7 @@ def mixture_args_fn(rng, weights, *components):
493493

494494
class NormalMixture:
495495
R"""
496-
Normal mixture log-likelihood.
496+
Normal mixture distribution.
497497
498498
.. math::
499499
@@ -573,7 +573,7 @@ def _zero_inflated_mixture(*, name, nonzero_p, nonzero_dist, **kwargs):
573573

574574
class ZeroInflatedPoisson:
575575
R"""
576-
Zero-inflated Poisson log-likelihood.
576+
Zero-inflated Poisson distribution.
577577
578578
Often used to model the number of events occurring in a fixed period
579579
of time when the times at which events occur are independent.
@@ -637,7 +637,7 @@ def dist(cls, psi, mu, **kwargs):
637637

638638
class ZeroInflatedBinomial:
639639
R"""
640-
Zero-inflated Binomial log-likelihood.
640+
Zero-inflated Binomial distribution.
641641
642642
The pmf of this distribution is
643643
@@ -701,7 +701,7 @@ def dist(cls, psi, n, p, **kwargs):
701701

702702
class ZeroInflatedNegativeBinomial:
703703
R"""
704-
Zero-Inflated Negative binomial log-likelihood.
704+
Zero-Inflated Negative binomial distribution.
705705
706706
The Zero-inflated version of the Negative Binomial (NB).
707707
The NB distribution describes a Poisson random variable
@@ -831,7 +831,7 @@ def _hurdle_mixture(*, name, nonzero_p, nonzero_dist, dtype, max_n_steps=10_000,
831831

832832
class HurdlePoisson:
833833
R"""
834-
Hurdle Poisson log-likelihood.
834+
Hurdle Poisson distribution.
835835
836836
The Poisson distribution is often used to model the number of events occurring
837837
in a fixed period of time or space when the times or locations
@@ -877,7 +877,7 @@ def dist(cls, psi, mu, **kwargs):
877877

878878
class HurdleNegativeBinomial:
879879
R"""
880-
Hurdle Negative Binomial log-likelihood.
880+
Hurdle Negative Binomial distribution.
881881
882882
The negative binomial distribution describes a Poisson random variable
883883
whose rate parameter is gamma distributed.
@@ -935,7 +935,7 @@ def dist(cls, psi, mu=None, alpha=None, p=None, n=None, **kwargs):
935935

936936
class HurdleGamma:
937937
R"""
938-
Hurdle Gamma log-likelihood.
938+
Hurdle Gamma distribution.
939939
940940
.. math::
941941
@@ -987,7 +987,7 @@ def dist(cls, psi, alpha=None, beta=None, mu=None, sigma=None, **kwargs):
987987

988988
class HurdleLogNormal:
989989
R"""
990-
Hurdle LogNormal log-likelihood.
990+
Hurdle LogNormal distribution.
991991
992992
.. math::
993993

0 commit comments

Comments
 (0)