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

Underflow error in viterbi.f #4

Open
jmbreda opened this issue Oct 25, 2022 · 0 comments
Open

Underflow error in viterbi.f #4

jmbreda opened this issue Oct 25, 2022 · 0 comments

Comments

@jmbreda
Copy link

jmbreda commented Oct 25, 2022

Hi,
First, thank you for sharing this useful package.

I encounter an underflow error where scr/viterbi.f vit() complained that log(initialProb) was infinite.

In R/Viterbi.R I added

initialProb <- log(initialProb)
initialProb[is.infinite(initialProb)] <- -325

As it is done for emissionProb. Of course, I then gave initialProb in the argument of the fortran vit function.

I had never encountered this error before.

Cheers.
Jeremie

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