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
1212The 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
1414at a position in the vector an indicates that the corresponding argument to the
1515base distribution is a scalar, and integer values of i for i >= 1 indicate that
1616the 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
135135The argument is the vector of base distributions, one for each mixture component.
136136
0 commit comments