{ "info": { "author": "Christopher Flynn", "author_email": "crf204@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Scientific/Engineering", "Topic :: Scientific/Engineering :: Mathematics", "Topic :: Scientific/Engineering :: Physics" ], "description": "stochastic\n==========\n\n|travis| |rtd| |codecov| |pypi| |pyversions|\n\n\n.. |travis| image:: https://img.shields.io/travis/crflynn/stochastic.svg\n :target: https://travis-ci.org/crflynn/stochastic\n\n.. |rtd| image:: https://img.shields.io/readthedocs/stochastic.svg\n :target: http://stochastic.readthedocs.io/en/latest/\n\n.. |codecov| image:: https://codecov.io/gh/crflynn/stochastic/branch/master/graphs/badge.svg\n :target: https://codecov.io/gh/crflynn/stochastic\n\n.. |pypi| image:: https://img.shields.io/pypi/v/stochastic.svg\n :target: https://pypi.python.org/pypi/stochastic\n\n.. |pyversions| image:: https://img.shields.io/pypi/pyversions/stochastic.svg\n :target: https://pypi.python.org/pypi/stochastic\n\n\nA python package for generating realizations of common\n(and perhaps some less common) stochastic processes, with some optimization\nfor repeated simulation.\n\nInstallation\n------------\n\nThe ``stochastic`` package is available on pypi and can be installed using pip\n\n.. code-block:: shell\n\n pip install stochastic\n\nDependencies\n~~~~~~~~~~~~\n\nStochastic uses ``numpy`` for many calculations and ``scipy`` for sampling\nspecific random variables.\n\nProcesses\n---------\n\nThis package offers a number of common discrete-time, continuous-time, and\nnoise process objects for generating realizations of stochastic processes as\n``numpy`` arrays.\n\nThe diffusion processes are approximated using the Euler\u2013Maruyama method.\n\nHere are the currently supported processes and their class references within\nthe package.\n\n* stochastic\n\n * continuous\n\n * BesselProcess\n * BrownianBridge\n * BrownianExcursion\n * BrownianMeander\n * BrownianMotion\n * CauchyProcess\n * FractionalBrownianMotion\n * GammaProcess\n * GeometricBrownianMotion\n * InverseGaussianProcess\n * MultifractionalBrownianMotion\n * PoissonProcess\n * SquaredBesselProcess\n * VarianceGammaProcess\n * WienerProcess\n\n * diffusion\n\n * ConstantElasticityVarianceProcess\n * CoxIngersollRossProcess\n * OrnsteinUhlenbeckProcess\n * VasicekProcess\n\n * discrete\n\n * BernoulliProcess\n * ChineseRestaurantProcess\n * MarkovChain\n * MoranProcess\n * RandomWalk\n\n * noise\n\n * BlueNoise\n * BrownianNoise\n * ColoredNoise\n * PinkNoise\n * RedNoise\n * VioletNoise\n * WhiteNoise\n * FractionalGaussianNoise\n * GaussianNoise\n\nUsage patterns\n--------------\n\nSampling\n~~~~~~~~\n\nTo use ``stochastic``, import the process you want and instantiate with the\nrequired parameters. Every process class has a ``sample`` method for generating\nrealizations. The ``sample`` methods accept a parameter ``n`` for the quantity\nof steps in the realization, but others (Poisson, for instance) may take\nadditional parameters. Parameters can be accessed as attributes of the\ninstance.\n\n.. code-block:: python\n\n from stochastic.discrete import BernoulliProcess\n\n\n bp = BernoulliProcess(p=0.6)\n s = bp.sample(16)\n success_probability = bp.p\n\n\nContinuous processes provide a default parameter, ``t``, which indicates the\nmaximum time of the process realizations. The default value is 1. The sample\nmethod will generate ``n`` equally spaced increments on the\ninterval ``[0, t]``.\n\nSampling at specific times\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nSome continuous processes also provide a ``sample_at()`` method, in which a\nsequence of time values can be passed at which the object will generate a\nrealization. This method ignores the parameter, ``t``, specified on\ninstantiation.\n\n\n.. code-block:: python\n\n from stochastic.continuous import BrownianMotion\n\n\n bm = BrownianMotion(drift=1, scale=1, t=1)\n times = [0, 3, 10, 11, 11.2, 20]\n s = sample_at(times)\n\nSample times\n~~~~~~~~~~~~\n\nContinuous processes also provide a method ``times()`` which generates the time\nvalues (using ``numpy.linspace``) corresponding to a realization of ``n``\nsteps. This is particularly useful for plotting your samples.\n\n\n.. code-block:: python\n\n import matplotlib.pyplot as plt\n from stochastic.continuous import FractionalBrownianMotion\n\n\n fbm = FractionalBrownianMotion(hurst=0.7, t=1)\n s = fbm.sample(32)\n times = fbm.times(32)\n\n plt.plot(times, s)\n plt.show()\n\n\nSpecifying an algorithm\n~~~~~~~~~~~~~~~~~~~~~~~\n\nSome processes provide an optional parameter ``algorithm``, in which one can\nspecify which algorithm to use to generate the realization using the\n``sample()`` or ``sample_at()`` methods. See the documentation for\nprocess-specific implementations.\n\n\n.. code-block:: python\n\n from stochastic.noise import FractionalGaussianNoise\n\n\n fgn = FractionalGaussianNoise(hurst=0.6, t=1)\n s = fgn.sample(32, algorithm='hosking')\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/crflynn/stochastic", "keywords": "stochastic processes", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "stochastic", "package_url": "https://pypi.org/project/stochastic/", "platform": "", "project_url": "https://pypi.org/project/stochastic/", "project_urls": { "Homepage": "https://github.com/crflynn/stochastic" }, "release_url": "https://pypi.org/project/stochastic/0.4.0/", "requires_dist": [ "numpy", "scipy" ], "requires_python": "", "summary": "Stochastic process realizations.", "version": "0.4.0" }, "last_serial": 4186386, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "e21773cfbd9c38d0694a6346c2306ebe", "sha256": "d1f27cda6c0a11e2bf7642c858a9a78f3421bc370a4f9c953f8910ad128a454b" }, "downloads": -1, "filename": "stochastic-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e21773cfbd9c38d0694a6346c2306ebe", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 35817, "upload_time": "2018-01-05T02:04:34", "url": "https://files.pythonhosted.org/packages/98/9c/22542e369450a1af04090fd37899f92e4dc8a71186bbb889865e1a269850/stochastic-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7c7f9997d5b4f2fc72a6cf3eabd4fb1c", "sha256": "723163bc7c4e1059c386bff902554b00df4b2b94ed9dcb32a81d8b4ba8fd92c1" }, "downloads": -1, "filename": "stochastic-0.1.0.tar.gz", "has_sig": false, "md5_digest": "7c7f9997d5b4f2fc72a6cf3eabd4fb1c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27236, "upload_time": "2018-01-05T02:04:36", "url": "https://files.pythonhosted.org/packages/bb/21/dca2b28f7c9a778717cd6a3185364f51fd95c98238f3c7f16aa349485e9c/stochastic-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "f7ca704e4f2ccad0d35953f62f0cc6cd", "sha256": "66268102ab55096a48aefe3f8b823288ced162644c5a6fb35cce15f93127f927" }, "downloads": -1, "filename": "stochastic-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f7ca704e4f2ccad0d35953f62f0cc6cd", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 40175, "upload_time": "2018-07-11T23:29:39", "url": "https://files.pythonhosted.org/packages/b9/b1/f1d2eca62f695abffb8d43b42a532788e820d0774ad1e9e6f2b152b5fd88/stochastic-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4df5bc1235e77493a0b4e37cec80b9be", "sha256": "5edce3f987b345f2fda3622b68a5dfb9a1b214212692d5c921f319fb76753cd4" }, "downloads": -1, "filename": "stochastic-0.2.0.tar.gz", "has_sig": false, "md5_digest": "4df5bc1235e77493a0b4e37cec80b9be", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29245, "upload_time": "2018-07-11T23:29:40", "url": "https://files.pythonhosted.org/packages/6c/fc/28de71581d83636cd19d607549f09f6d7ede7dcd39218a7011f1f61a07b4/stochastic-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "7e00b6922fbe969b5c478d919961f917", "sha256": "740f1d4f6e17a7550479f8c6593bb88457912f32a22a8e9c7a5e709c68e97bed" }, "downloads": -1, "filename": "stochastic-0.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7e00b6922fbe969b5c478d919961f917", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 42305, "upload_time": "2018-07-22T23:11:07", "url": "https://files.pythonhosted.org/packages/5f/fa/fb329a71fb3ec43bc358e05e8235a723ff70efc3a89963155cb234ae2406/stochastic-0.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6926635d3dd2a516319d8069fc1a6d84", "sha256": "acedb01ab5f28ba83609f27b500054e65336de2a0b5bc2a64dfff02a704e4689" }, "downloads": -1, "filename": "stochastic-0.3.0.tar.gz", "has_sig": false, "md5_digest": "6926635d3dd2a516319d8069fc1a6d84", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30462, "upload_time": "2018-07-22T23:11:08", "url": "https://files.pythonhosted.org/packages/37/3f/0a3b53003b0f5daec4b33704ec862b80e6be9c04952c4eeb73bde4f34439/stochastic-0.3.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "63443747d536ce9e18b5078d5455f642", "sha256": "59bc3e1bc1c7b8645d996e36c3e75ed19b8397bac9de3f5ac7abaf07f37c3025" }, "downloads": -1, "filename": "stochastic-0.4.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "63443747d536ce9e18b5078d5455f642", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 43641, "upload_time": "2018-08-19T21:28:26", "url": "https://files.pythonhosted.org/packages/62/fb/1bdf5bef80bb31369306290c308371a64aebf825029520602570135ea7f1/stochastic-0.4.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f4c73b1371ea9dfb9e426e256de30d4e", "sha256": "75c70e537b7e8bfcb90de49bfcbe76c9448a24d38a13d0d5fac2b75779450057" }, "downloads": -1, "filename": "stochastic-0.4.0.tar.gz", "has_sig": false, "md5_digest": "f4c73b1371ea9dfb9e426e256de30d4e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31671, "upload_time": "2018-08-19T21:28:27", "url": "https://files.pythonhosted.org/packages/fa/0c/55489755d37a8b63ea26729830ecc768ba4e188ddbfd8075e57fa58c128c/stochastic-0.4.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "63443747d536ce9e18b5078d5455f642", "sha256": "59bc3e1bc1c7b8645d996e36c3e75ed19b8397bac9de3f5ac7abaf07f37c3025" }, "downloads": -1, "filename": "stochastic-0.4.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "63443747d536ce9e18b5078d5455f642", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 43641, "upload_time": "2018-08-19T21:28:26", "url": "https://files.pythonhosted.org/packages/62/fb/1bdf5bef80bb31369306290c308371a64aebf825029520602570135ea7f1/stochastic-0.4.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f4c73b1371ea9dfb9e426e256de30d4e", "sha256": "75c70e537b7e8bfcb90de49bfcbe76c9448a24d38a13d0d5fac2b75779450057" }, "downloads": -1, "filename": "stochastic-0.4.0.tar.gz", "has_sig": false, "md5_digest": "f4c73b1371ea9dfb9e426e256de30d4e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31671, "upload_time": "2018-08-19T21:28:27", "url": "https://files.pythonhosted.org/packages/fa/0c/55489755d37a8b63ea26729830ecc768ba4e188ddbfd8075e57fa58c128c/stochastic-0.4.0.tar.gz" } ] }