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

Converting to GMM from MixtureModel doesn't work with diagonal covariance #107

Open
achetverikov opened this issue Aug 18, 2023 · 0 comments

Comments

@achetverikov
Copy link

So this:

g = rand(GMM, 2, 2, kind=:diag )
m = MixtureModel(g)
GMM(m)

gives an error:

ERROR: Inconsistent number of covars 2 != 4
Stacktrace:
 [1] error(s::String)
   @ Base .\error.jl:35
 [2] GMM{Float64, LinearAlgebra.Adjoint{Float64, Matrix{Float64}}}(w::Vector{Float64}, μ::LinearAlgebra.Adjoint{Float64, Matrix{Float64}}, Σ::LinearAlgebra.Adjoint{Float64, Matrix{Float64}}, hist::Vector{History}, nx::Int64)
   @ GaussianMixtures C:\Users\anche7026\.julia\packages\GaussianMixtures\zDaBV\src\gmmtypes.jl:79
 [3] GMM(w::Vector{Float64}, μ::LinearAlgebra.Adjoint{Float64, Matrix{Float64}}, Σ::LinearAlgebra.Adjoint{Float64, Matrix{Float64}}, hist::Vector{History}, nx::Int64)
   @ GaussianMixtures C:\Users\anche7026\.julia\packages\GaussianMixtures\zDaBV\src\gmmtypes.jl:89
 [4] GMM(m::MixtureModel{Multivariate, Continuous, DiagNormal, Categorical{Float64, Vector{Float64}}})
   @ GaussianMixtures C:\Users\anche7026\.julia\packages\GaussianMixtures\zDaBV\src\distributions.jl:19

while for the normal covariance things work as intended.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant