crflynn / stochastic

Generate realizations of stochastic processes in python.
http://stochastic.readthedocs.io/en/stable/
MIT License
456 stars 82 forks source link

Interface for iterative sampling #25

Open asmodehn opened 4 years ago

asmodehn commented 4 years ago

It would be interesting to have an interface for dynamic iterative sampling...

Instead of doing something like:

process.sample(255)

for a more dynamic process (like a simulation of some kind), I would do something like:

while True:
    process.sample(1).
    plots.update().
    # etc

but I am guessing there are restrictions on how to do the sampling in an iterative way, depending on the kind of stochastic process we want to simulate.

I only know about Markov Chain specifying that the next sample depends only on the one before, so I am assuming other kinds of stochastic processes have various constraints about this... hence why I'm thinking about an extra interface for iterative sampling to support that use-case.

Thoughts ?