• ### Markov chain

Here is an abstraction for a 2 step markov chain. It's using the [coll] object and is largely based on ideas from here http://algorithmiccomposer.blogspot.com/2010/05/algorithmic-composition-tutorial-markov.html

it has a time out function that works quite well if you give it discontinuous bits of information - it will end up playing back phrases. The rhythm thing that's included with the help patch isn't great, but it gives some sort of idea.

Simon

the save function is very buggy!!!!

just got rid of the save function altogether - use [textfile] or a message box or something

...the help patch needs a help patch ... I just added a value to the rhythm sequence to keep if from stalling. If it is stopping it is because it is calling up an index that doesn't exist. You can see which index is being addressed inside of the [marvov2step] abstraction - it's the [\$1-\$2( at the top of the reader subpatch.

http://www.pdpatchrepo.info/hurleur/markov2step.pd

• Posts 6 | Views 8025
• To be honest i could not test your abstraction but the link was very usefull. Thanks.

• the abstraction is basically what they build in that link - except it creates the index out of the previous 2 values instead of just the last value - so it's a 2 step markov chain instead of a 1 step ... a little more musical I think. It's a very simple way of doing it.

• That's neat, thanks.

• I would love to use this abstraction, but I really don't understand where to put my data set.

Could you explain how to use this?

• That seems fine, but I think computation of empirical joint distribution requires enormous amount of data and is generally not feasible.The joint probability is approximated with the product of conditional probabilities based on first order Markov Chain assumption p(xi+n|xi+n-1)p(xi+n-1|xi+n-2)…p(xi+1|xi).

You can explore how I have used Markov Chain model to detect anomalies in time series sequence with ECG data.

Posts 6 | Views 8025
Internal error.

Oops! Looks like something went wrong!