gvanderheide / discretemarkovchain Goto Github PK
View Code? Open in Web Editor NEWCalculate the steady state distribution of a discrete Markov chain in Python.
License: MIT License
Calculate the steady state distribution of a discrete Markov chain in Python.
License: MIT License
It would be great to have this package available on conda-forge.
Something about creating a "feedstock" for it.
I will spend a 1/2 hour on this, then hope for better qualified help :)
https://conda-forge.github.io/#contribute
currently there is only support for tuples.
The following does not run well:
P = np.array([[0.5,0.5],[0.6,0.4]])
mc = markovChain(P)
mc.eigenMethod()
This gives the error:
ValueError: k must be less than ndim(A)-1, k=1
As temporary fix, the powerMethod is called when the the Markov chain consists of two states.
Hi, great work here! I'm working on a simple problem and would love your feedback. Essentially, I have these States or "buttons". I have let's say initial probabilities, of a user going from one button to another. After time t1, I want to know which button he "could" be on now(or predict). After every time 't' he presses a some button button, we update the transition matrix and predict the next button. Sounds simple I'm having a hard time incorporating this with the library.. Here's a screenshot for your reference:
I found this package super helpful for my research! There is an issue when the transition matrix is not sparse.
Issue
markovChain
assumes that P
is sparse. If P
is not sparse (e.g. PageRank) using a sparse implementation leads to a memory explosion (and much slower code).
Solution
P
is sparse or densemask
is undefined in the README example, what is it?
Planned:
Fixed:
Possibile future additions:
if __name__ = "__main__"
call.A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.