Skip to content

Underflow error in viterbi.f #4

@jmbreda

Description

@jmbreda

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions