Skip to content

Commit 964c753

Browse files
committed
Fix docs
1 parent 2de2b15 commit 964c753

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

docs/src/ref/distributions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ defining custom distributions, each of which are explained below:
88
[pushforward](https://en.wikipedia.org/wiki/Pushforward_measure)) of an
99
existing distribution.
1010

11-
2. The [HeterogeneousMixture](@ref) and [HomogeneousMixture](@ref) constructors
11+
2. The [`HeterogeneousMixture`](@ref) and [`HomogeneousMixture`](@ref) constructors
1212
for distributions that are mixtures of other distributions.
1313

1414
3. An API for defining arbitrary [custom distributions](@ref

src/modeling_library/mixture.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
"""
66
HomogeneousMixture(distribution::Distribution, dims::Vector{Int})
77
8-
Defines a new type for a mixture distribution family.
8+
Define a new distribution that is a mixture of some number of instances of single base distributions.
99
10-
The first argument defines the base distribution family of each component in the mixture.
10+
The first argument defines the base distribution of each component in the mixture.
1111
1212
The second argument must have length equal
13-
to the number of arguments taken by the base distribution family. A value of 0
13+
to the number of arguments taken by the base distribution. A value of 0
1414
at a position in the vector an indicates that the corresponding argument to the
1515
base distribution is a scalar, and integer values of i for i >= 1 indicate that
1616
the corresponding argument is an i-dimensional array.
@@ -35,13 +35,13 @@ Example:
3535
# mixture of two normal distributions
3636
# with means -1.0 and 1.0
3737
# and standard deviations 0.1 and 10.0
38-
# the first normal distribution has weight 0.4 and the second has weight 0.6
38+
# the first normal distribution has weight 0.4; the second has weight 0.6
3939
x ~ mixture_of_normals([0.4, 0.6], [-1.0, 1.0], [0.1, 10.0])
4040
4141
# mixture of two multivariate normal distributions
4242
# with means: [0.0, 0.0] and [1.0, 1.0]
4343
# and covariance matrices: [1.0 0.0; 0.0 1.0] and [10.0 0.0; 0.0 10.0]
44-
# the first multivariate normal distribution has weight 0.4 and the second has weight 0.6
44+
# the first multivariate normal distribution has weight 0.4; the second has weight 0.6
4545
means = [0.0 1.0; 0.0 1.0] # or, cat([0.0, 0.0], [1.0, 1.0], dims=2)
4646
covs = cat([1.0 0.0; 0.0 1.0], [10.0 0.0; 0.0 10.0], dims=3)
4747
y ~ mixture_of_mvnormals([0.4, 0.6], means, covs)
@@ -130,7 +130,7 @@ export HomogeneousMixture
130130
"""
131131
HeterogeneousMixture(distributions::Vector{Distribution{T}}) where {T}
132132
133-
Defines a new mixture distribution family.
133+
Define a new distribution that is a mixture of a given list of base distributions.
134134
135135
The argument is the vector of base distributions, one for each mixture component.
136136

0 commit comments

Comments
 (0)