You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@nilsroth I think there was a bug in the training code for labeled training of the combined model
In this code snippet, you are attempting to set the only the edges that are not there yet.
However, you assume that the e.g. the entry for state transition 15 to 16 is at position (15, 16) in the transition matrix. However, because of the "sorting" bug in pomegranate this is not the case.
In result, some edges are not written and some edges are overwritten, eventhough they exist already.
# Add missing transitions which will "connect" transition-hmm and stride-hmm
# We initialize with a very small probability, so that the model can learn the correct values in the next
# step.
fortransinmissing_transitions:
add_transition(new_model, trans, 0.1)
I also changed extract_transitions_starts_stops_from_hidden_state_sequence to return a set with the actual state names and not the state indices to make that work.
Still a little bit scary that we depend on this default naming of pg... But it is what it is...
@nilsroth I think there was a bug in the training code for labeled training of the combined model
In this code snippet, you are attempting to set the only the edges that are not there yet.
However, you assume that the e.g. the entry for state transition 15 to 16 is at position (15, 16) in the transition matrix. However, because of the "sorting" bug in pomegranate this is not the case.
In result, some edges are not written and some edges are overwritten, eventhough they exist already.
gaitmap/gaitmap/future/hmm/segmentation_model.py
Lines 281 to 285 in ff2a333
I fixed that by getting the existing transitions based on the actual statenames and checking based on that.
Could you check, if the same issue exists in your old training code?
With my fix, the train-hmm example now produces an actual usable HMM :)
The text was updated successfully, but these errors were encountered: