I have a lot of data from pulse\heart rate measurements, so the data is in long integer lists, and I have 8 states (although the data can range to much more than 1 to 8- it can be 50 to 140). I want an algorithm which can take the measurements data and through unsupervised learning to give me the probability to move from one state to another. So I don't know the transition-matrix, and I don't know on the measurement data to allocate the different states. all I have is 8 states, vectors with the heart-rate measurements, and I need to get the probabilities to move from one state to all others. I'm not sure how can I use HMM to do it, or is it a way to do it at all.
Asked
Active
Viewed 768 times
0
-
1could you be more specific? an example will be helpful – Ashlou May 27 '18 at 22:22
-
So you have 8 known states (obversable?) and the hidden states are 50-140? Or is it the other way around? – meow May 27 '18 at 22:47
-
The HMM's algo's I found so far (for python) calculated the probability to get a specific sequence, but what I need is to calculate the prob's to go from one state to another when all of the sequences are given – Bar Shaul May 28 '18 at 13:50
-
I have 8 states (not observabale- 8 emotions) which are the hidden states, and data of heart-rate, which I want to say that the data (the heart-rate sequence) has 8 hidden states in it, as you can understand which emotion the person having by knowing his heart-rate. so I want to know based on the data I had collected what are the probs to move from one hidden state to another – Bar Shaul May 28 '18 at 15:38
2 Answers
0
almost any time series data could be modeled by HMM. transition matrix should be estimated from the data using well known Baum-Welch algorithm.Simple tutorial from Wikipedia should give u a hints.

Tala Warang
- 81
- 2
-
That's not completely true, continuous timeseries (and e.g. heartbeats/time unit is continous) are not easy to model with HMM (as they would result in an infinite state space), you would have to use something like a continuous density hidden Markov model. Also timeseries with a finite large state space become intractable to compute quite soon (oftentimes approximations such as particle filters are used then). – meow May 30 '18 at 10:48
0
Have you heard of TICC?
It's an Inverse Covariance-Based Clustering of Multivariate Time Series Data. This algorithm can help you use heart rate measurements (and many other data ) and use an unsupervised method to identify different states. This algorithm is really good because you can specify two critical tuning parameters:
number_of_clusters
: The number of expected states in your data. In this case, you have 8 observed states. That will make the traning of the algorithm much more accurate.beta
: The switch penalty. You can control how easy/difficult for the algorithm to switch from one state to another. This could be straight forward if you have a good knowledge of your problem or, if not, be subject to try and error.
I recommend having a look at TICC implementation in Python.
Here's a quick example:
fname = "bar_shaul_data.txt"
ticc = TICC(window_size=1, number_of_clusters=8, lambda_parameter=11e-2, beta=600, maxIters=100, threshold=2e-5,
write_out_file=False, prefix_string="output_folder/", num_proc=1)
(cluster_assignment, cluster_MRFs) = ticc.fit(input_file=fname)
print(cluster_assignment)
np.savetxt('Results.txt', cluster_assignment, fmt='%d', delimiter=',')
More docs are available on README.
Disclaimer: I'm a contributor to the library.

Mohamed Taher Alrefaie
- 15,698
- 9
- 48
- 66