sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.35k stars 462 forks source link

serious (but trivial to fix) bug in hidden markov model "generate sequence" function #11452

Closed williamstein closed 13 years ago

williamstein commented 13 years ago

The generate sequence function for continuous hidden markov models is missing a break statement, which causes the function to incorrectly choose the last state as the starting state for all generated sequences. This is a critical (mathematically very wrong) but trivial to fix bug. Fix attached.

Component: statistics

Author: William Stein

Reviewer: Bill Cauchois

Merged: sage-4.7.1.alpha4

Issue created by migration from https://trac.sagemath.org/ticket/11452

williamstein commented 13 years ago

Attachment: trac_11452.patch.gz

bfd97d0c-f9c6-4148-9118-e27ce70f592c commented 13 years ago
comment:2

Applies to Sage 4.7, passes all doctests, appears to fix the bug. Positive review!

jdemeyer commented 13 years ago

Author: William Stein

jdemeyer commented 13 years ago

Reviewer: Bill Cauchois

jdemeyer commented 13 years ago

Merged: sage-4.7.1.alpha4