spedygiorgio / markovchain

Easy Handling Discrete Time Markov Chains
https://spedygiorgio.github.io/markovchain/
Other
105 stars 39 forks source link

Documentation for markovchainList #81

Closed MarkEdmondson1234 closed 8 years ago

MarkEdmondson1234 commented 8 years ago

Hello again :)

I can see you are busy so low priority, but after reading the documentation I am still a little unclear how markovchainList works as its not documented as fully as the rest. Bear in mind I'm a newbie to Markov chains but I'd like to get a deeper understanding as I can see its very useful for my line of work.

It may be because there aren't so many methods created yet for it, or perhaps there are equivalent ways to get the same data, but a brief overview on why and when to use the markovchainList would be a great help :)

For example, I have this data and using it as such:

visitId         1         2        3        4          etc.... 
1111111111      /pageA    /pageB  /pageC   /pageA
222222222       /pageB    /pageA  /pageD   /pageA
..etc...

mcfL <- markovchainListFit(the_data, name = "seq")

predict(mcfL$estimate, newdata = "/pageA")
"/pageG"

I am using it for one row per website session, then each column for a website pageview in that session, which are non-homogenous. I have a prediction for the next page working via mcfL$estimate (but not working for mcfL which the documentation implies) which is great, but I'd also like to see the probability of that prediction.

How is markovchainList combining the rows to make the prediction? Does it just run over all the normal markovchain objects? (via mcfL$estimates@markovchains ?) In that case could I do a similar apply and sum up to find the prediction? Or must this wait for the method to be enabled?

Many thanks for any help or direction you can give.

spedygiorgio commented 8 years ago

Dear Deepak, please could you add some documentation on the topic? Best

spedygiorgio commented 8 years ago

Added few lines, that should provide more clarifations