Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding poisson_timer and brownian_motion to new csp.random module #56

Merged
merged 1 commit into from
Feb 13, 2024

Conversation

ptomecek
Copy link
Collaborator

@ptomecek ptomecek commented Feb 9, 2024

In order to write more convincing examples for more complex cases, we need a timer that ticks at irregular (pseudo-random) intervals. Furthermore, we also need something that ticks random floats and numpy arrays to simulate live data streams.

Rather than keep this code in the examples folder, I chose to put it in csp.random so that it could be more widely used by others for examples, testing or as a building block in csp applications. To illustrate real "Monte Carlo" simulation use cases of csp, I implemented the random timer as a proper Poisson process and the random array generator as a proper multi-dimensional Brownian Motion, each with time-varying input parameters (which is relatively easy in csp). These are the two most common building blocks for stochastic processes.

timkpaine

This comment was marked as outdated.

timkpaine

This comment was marked as outdated.

csp/random.py Show resolved Hide resolved
csp/random.py Show resolved Hide resolved
csp/random.py Show resolved Hide resolved
csp/random.py Outdated Show resolved Hide resolved
csp/random.py Outdated Show resolved Hide resolved
@timkpaine
Copy link
Member

I have rebased and signed this, you can reset your local to match with:

git fetch --all
git reset origin/pit/csp_random --hard

Don't forget to sign all commits with -s!

@timkpaine timkpaine added the type: feature Issues and PRs related to new features label Feb 10, 2024
AdamGlustein
AdamGlustein previously approved these changes Feb 12, 2024
…ownian Motion generator, with time-varying parameters and test cases

Remove brownian_increments and replace with return_increments flag on brownian_motion node. Incorporate PR feedback

Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
@ptomecek ptomecek merged commit bcf3b47 into main Feb 13, 2024
13 checks passed
@ptomecek ptomecek deleted the pit/csp_random branch February 13, 2024 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature Issues and PRs related to new features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants