-
Notifications
You must be signed in to change notification settings - Fork 22
Description
I try to remove noise from an observed sequence

The observed points are the blue points.
They correspond to team_id[in_track]
The desired behaviour corresponds to the orange curve with only one change around index 600
The I use
a = mc.HiddenMarkovModel().from_seq(team_id[in_track], team_id[in_track])
and get
a.tp
array([[ 0.94824, 0.018484, 0.033272],
[ 0.018692, 0.9486, 0.03271],
[ 0.12931, 0.2069, 0.66379]])
As I know
transition form state 0 to 1 or 1 to 0 are rare divide by 10 correspondings terms
transitions form state 0 or 1 to 2 should not occur corresponding terms are changed to 1e-9
Leading to
atp_hat
array([[ 0.99815, 0.0018484, 1e-09],
[ 0.0018692, 0.99813, 1e-09],
[ 0.12931, 0.2069, 0.66379]])
I then apply
vs, vsi = a.viterbi(obs_seq=team_id[in_track], tp=atp_hat)
but both vs and vsi are exactly indentical to blue points.
Is there a way to get what I expect ?