-
Notifications
You must be signed in to change notification settings - Fork 9
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
MethodError Using baum_welch with MvLogNormal Emission Distributions #76
Comments
Hey @mcwaga,
julia> obs_seq = collect(eachrow(r0));
julia> hmm_est, logL_evolution = HiddenMarkovModels.baum_welch(pre_hmm, obs_seq)
ERROR: TaskFailedException
nested task error: OverflowError: Some values are NaN
julia> obs_seq_exp = collect(eachrow([exp.(randn(3000)) exp.(randn(3000))]));
julia> hmm_est, logL_evolution = HiddenMarkovModels.baum_welch(pre_hmm, obs_seq_exp)
ERROR: suffstats is not implemented for (MvLogNormal{Float64, PDMat{Float64, Matrix{Float64}}, Vector{Float64}}, Matrix{Float64}, SubArray{Float64, 1, Matrix{Float64}, Tuple{Int64, Base.Slice{Base.OneTo{Int64}}}, true}).
julia> pre_hmm_normal = HMM(p, transition_matrix, [MvNormal(randn(2), cov(r0)) for k=1:states]);
julia> hmm_est, logL_evolution = HiddenMarkovModels.baum_welch(pre_hmm_normal, obs_seq);
julia> logL_evolution
100-element Vector{Float64}:
-9889.346931214455
-8624.38202625008
-8619.623391367273
... |
Did this solve your troubles? Or can I help out further? |
Hi, I didn’t test it yet but I think it Will work!
…On Sat, Feb 3, 2024 at 10:19 AM Guillaume Dalle ***@***.***> wrote:
Did this solve your troubles? Or can I help out further?
—
Reply to this email directly, view it on GitHub
<#76 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABHUDYEJ5UAN5JKUQKSGK23YRY2PPAVCNFSM6AAAAABCWUX6F6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRVGMYTSOBRGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description:
When attempting to estimate the parameters of a Hidden Markov Model using the baum_welch function with multivariate log-normal (MvLogNormal) emission distributions, I encounter a MethodError. The error suggests a mismatch in expected argument types for logpdf.
Code to reproduce:
The function call results in the following error:
ERROR: MethodError: no method matching logpdf(::MvLogNormal{Float64, PDMats.PDMat{Float64, Matrix{Float64}}, Vector{Float64}}, ::Int64)
I am new to HMM, so maybe something is wrong with my approach, but I don't know. Any guidance on correcting the usage or addressing the error would be greatly appreciated.
The text was updated successfully, but these errors were encountered: