Hi,

I wish to work with the Gaussian Mixture distribution (especially rand and 
pdf), exactly as in this example 
<https://github.com/johnmyleswhite/MixtureModels.jl>: 

mu = [0.0 25.0; 0.0 25.0] 
sigma = Array(Float64, 2, 2, 2) 
sigma[:, :, 1] = [1.0 0.9; 0.9 1.0] 
sigma[:, :, 2] = 7.5 * [1.0 0.0; 0.0 1.0] 
p = [0.9, 0.1] 

distr = MixtureMultivariateNormals(mu, sigma, p) 
X = rand(distr, 10_000)


However, the method MixtureMultivariateNormals(mu, sigma, p) used in that 
example no longer exists. The maintained version of MixtureModels.jl 
<https://github.com/lindahua/MixtureModels.jl> has no examples or methods 
in the documentation of basic usage, and it is far from obvious how to use 
it for a Gaussian mixture.

Separately, the package GaussianMixtures.jl 
<https://github.com/davidavdav/GaussianMixtures.jl>, does not successfully 
work in what would seem to be the obvious method:

julia> GMM(p,mu,sigma)
ERROR: `GMM{T<:FloatingPoint,CT<:Union(Array{T,2},Array{T,1})}` has no 
method matching 
GMM{T<:FloatingPoint,CT<:Union(Array{T,2},Array{T,1})}(::Array{Float64,1}, 
::Array{Float64,2}, ::Array{Float64,2})

Could someone show me a working example analogous to the one above, using 
whichever package you wish?

Thank you,
Bradley

Reply via email to