|
pis[i] /= resp_i.sum(axis=0) |
Seems to happen for me intermittently, depending on what random state I start with. Happens when fitting a one-step model with full gaussian measurement model and binary_nan structural. When occurring it seems that a certain element in pis[i] (and its corresponding elemnt from resp_i ) , are equal to zero, causing 0/0 -> nan.
Current workaround I used was setting pis[i] with nan_to_num, where all nans are changed to zeroes.
Not sure if this is valid to do, or just treating the symptom instead of the root cause.
stepmix/stepmix/emission/categorical.py
Line 82 in 4fdc222
Seems to happen for me intermittently, depending on what random state I start with. Happens when fitting a one-step model with full gaussian measurement model and binary_nan structural. When occurring it seems that a certain element in
pis[i](and its corresponding elemnt fromresp_i) , are equal to zero, causing 0/0 ->nan.Current workaround I used was setting pis[i] with
nan_to_num, where all nans are changed to zeroes.Not sure if this is valid to do, or just treating the symptom instead of the root cause.