Open ko62147 opened 3 months ago
predict_proba
gives you the posterior probabilities that each observation aligns to each hidden state in the model given all of the other observations in the sequence. It's also called the forward-backward algorithm.
log_probability
can be positive when you have continuous observations and have a distribution with a very small variance. For instance, if you have a normal distribution with a mean of 0 and a std of 0.0001, a value of 0 will have a probability above 1.
Thanks for the reply. I am trying to understand the physical meaning of the results from the log_probability
method. Does it mean that situations where continuous observations return a positive log probability (or probability greater than 1) have complete certainty (i.e. 100% probability) that the observations/data are generated from the distribution/model?
I think you're entering one of the confusing areas of probability theory. Basically, just because a point estimate is above 1 doesn't mean that it's guaranteed to happen. For instance, in my example above, P(0.0001) would be above 1 but so would P(0.00011). Both can't be guaranteed to happen. Instead, people usually look at probabilites of events happening within ranges of a probability distribution and then set those ranges to be very small, e.g., (P(x+e) - P(x - e)) / 2e In my experience, the most practical interpretation of probabilities greater than 1 is that your model has overfit to something.
Understood. Thanks for the clarification. What do you recommend to reduce overfitting for HMMs?
I am fitting/training HMMs using time series (datetime) data transformed into radial basis functions or sine/cosine vectors scaled using min-max scaler. However, I keep obtaining positive log_probability
values for some of the test sequence observations using these time series (datetime) transformations. Based on your experience:
log_probability
values returned for the test observation sequences?
Hello,
I fitted an HMM to a set of observation sequences, however I get positive log probability values (or probability values greater than 1) when I call the
log_probability
method on some test observation sequences. What does positivelog probability
values mean in the context of the HMM inference, and how is thelog_probability
method different from thepredict_proba
method?