Skip to main content

Python package for stochastic simulations

Project description

Stochastic Simulation Algorithms in Python

Build Status codecov Updates Documentation Status pypi License Code style: black

Introduction

pyssa is a Python package for stochastic simulations. It offers a simple api to define models, perform stochastic simulations on them and visualize the results in a convenient manner.

Install

Install with pip:

$ pip install pyssa

Documentation

Usage

from pyssa.simulation import Simulation

sim = Simulation(V_r, V_p, X0, k)
sim.simulate(max_t=150, max_iter=1000, chem_flag=True, n_rep=10)

Plotting

sim.plot()

Plot of species A, B and C

Accessing the results

results = sim.results

Benchmarks

We chose numba after extensive testing and benchmarking against python and cython implementations.

Name (time in ms) Min Max Mean StdDev Median IQR Outliers OPS Rounds Iterations
test_numba_benchmark 314.1758 (1.0) 342.9915 (1.0) 322.9318 (1.0) 11.4590 (1.0) 318.7983 (1.0) 9.1533 (1.0) 1;1 3.0966 (1.0) 5 1
test_cy_benchmark 17,345.7698 (55.21) 19,628.3931 (57.23) 18,255.3931 (56.53) 862.4711 (75.27) 18,148.9358 (56.93) 1,030.3676 (112.57) 2;0 0.0548 (0.02) 5 1
test_py_benchmark 27,366.3681 (87.11) 28,417.8333 (82.85) 27,782.2482 (86.03) 387.2758 (33.80) 27,728.4224 (86.98) 347.3891 (37.95) 2;0 0.0360 (0.01) 5 1

License

Copyright (c) 2018, Dileep Kishore, Srikiran Chandrasekaran. Released under: Apache Software License 2.0

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyssa-0.5.4.tar.gz (128.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyssa-0.5.4-py2.py3-none-any.whl (133.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pyssa-0.5.4.tar.gz.

File metadata

  • Download URL: pyssa-0.5.4.tar.gz
  • Upload date:
  • Size: 128.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.6

File hashes

Hashes for pyssa-0.5.4.tar.gz
Algorithm Hash digest
SHA256 bc35deac1fdb638f185040517a917fa89643a300ee6e62c9fbd038ef6bc64877
MD5 f3049e689130575e9e59c54f9f7e812a
BLAKE2b-256 0e78ac806a65ea35095f214f4589315583a1df1b9cd24da667d50969c40a6de7

See more details on using hashes here.

File details

Details for the file pyssa-0.5.4-py2.py3-none-any.whl.

File metadata

  • Download URL: pyssa-0.5.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 133.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.6

File hashes

Hashes for pyssa-0.5.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 0b42bd27a63cdfa1f011680624090d30aab0381b3efa2b66c8f41c270c85d102
MD5 594706191acef2491c2050b73d4ba910
BLAKE2b-256 fbf4ad0c19149ae81e0eec49e4cedde0954ed5ade38533b271f0e73b2c82b1c3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page