Modeling heterogeneous data with a HMM

I have gone through the concepts of HMM and I have understood most of them. However, I'm confused about how to map it to my problem.

I have patients' information. Each patient is delivered a medicine after x weeks. x depends on patient's prescription. Now, each patient is delivered extra medication so if in any case delivery fails he/she don't miss their dose. Let's call this extra medication buffer. So a patient's buffer might be full which means that he hasn't used it up. Or it might be partially full. Or empty. My output states are misdose or not misdose. The way I see it is that Ill be finding probability of P(Misdose|S={s1,s2,s3}) and P(~Misdose|S={s1,s2,s3}). Problem is that each patient will have a different sequence. Do I concatenate all the patients into one sequence? or treat them as multi-sequence? How will I be predicting for a new patient?

Resources: Following are the resources I used to understand it:

https://towardsdatascience.com/markov-and-hidden-markov-model-3eec42298d75

https://hmmlearn.readthedocs.io/en/latest/tutorial.html

Topic markov-hidden-model

Category Data Science


Hidden Markov Model (HMM) assumes the state space of the hidden variables is discrete. If extra medication buffer is your state space, it would make more sense to model it as continuous. Then one option would be linear dynamical system modeling.

Also, HMM are designed to predict a sequence based on latent state (extra medication buffer). Probability of "misdose" is not a sequence. It might be more useful to frame it as time series problem. Given a collection of observed features, what is the probability of "misdose"? No need to explicitly model any latent state.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.