{ "info": { "author": "Christopher Flynn", "author_email": "crf204@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Scientific/Engineering :: Mathematics", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "fbm\n===\n\n|travis| |codecov| |pypi| |pyversions|\n\n.. |travis| image:: https://img.shields.io/travis/crflynn/fbm.svg\n :target: https://travis-ci.org/crflynn/fbm\n\n.. |codecov| image:: https://codecov.io/gh/crflynn/fbm/branch/master/graphs/badge.svg\n :target: https://codecov.io/gh/crflynn/fbm\n\n.. |pypi| image:: https://img.shields.io/pypi/v/fbm.svg\n :target: https://pypi.python.org/pypi/fbm\n\n.. |pyversions| image:: https://img.shields.io/pypi/pyversions/fbm.svg\n :target: https://pypi.python.org/pypi/fbm\n\n* Exact methods for simulating fractional Brownian motion (fBm) or fractional\n Gaussian noise (fGn) in python.\n* *Approximate* simulation of multifractional Brownian motion (mBm) or\n multifractional Gaussian noise (mGn).\n\nInstallation\n------------\n\nThe fbm package is available on PyPI and can be installed via pip:\n\n.. code-block::\n\n pip install fbm\n\nfractional Brownian motion\n--------------------------\n\nFractional Brownian motion can be generated via either Hosking's method, the\nCholesky method, or the Davies-Harte method. All three methods are\ntheoretically exact in generating a discretely sampled fBm/fGn.\n\nUsage:\n\n.. code-block:: python\n\n from fbm import FBM\n\n\n f = FBM(n=1024, hurst=0.75, length=1, method='daviesharte')\n # or\n f = FBM(1024, 0.75)\n\n # Generate a fBm realization\n fbm_sample = f.fbm()\n\n # Generate a fGn realization\n fgn_sample = f.fgn()\n\n # Get the times associated with the fBm\n t_values = f.times()\n\nwhere ``n`` is the number of equispaced increments desired for a fBm with Hurst\nparameter ``hurst`` on the interval [0, ``length``]. Method can be\neither ``'hosking'``, ``'cholesky'``, or ``'daviesharte'``. The ``fbm()``\nmethod returns a length ``n+1`` array of discrete values for the fBm (includes\n0). The ``fgn()`` method returns a length ``n`` array of fBm\nincrements, or fGn. The ``times()`` method returns a length ``n+1`` array of\ntimes corresponding to the fBm realizations.\n\nThe ``n`` and ``hurst`` parameters are required. The ``length`` parameter\ndefaults to 1 and ``method`` defaults to ``'daviesharte'``.\n\nFor simulating multiple realizations use the FBM class provided as above. Some\nintermediate values are cached for repeated simulation.\n\nFor one-off samples of fBm or fGn there are separate functions available:\n\n.. code-block:: python\n\n from fbm import fbm, fgn, times\n\n\n # Generate a fBm realization\n fbm_sample = fbm(n=1024, hurst=0.75, length=1, method='daviesharte')\n\n # Generate a fGn realization\n fgn_sample = fgn(n=1024, hurst=0.75, length=1, method='daviesharte')\n\n # Get the times associated with the fBm\n t_values = times(n=1024, length=1)\n\nFor fastest performance use the Davies and Harte method. Note that the\nDavies and Harte method can fail if the Hurst parameter ``hurst`` is close to\n1 and there are a small amount of increments ``n``. If this occurs, a warning\nis printed to the console and it will fallback to using Hosking's method to\ngenerate the realization. See page 412 of the following paper for a more\ndetailed explanation:\n\n* Wood, Andrew TA, and Grace Chan. \"Simulation of stationary Gaussian processes\n in [0, 1] d.\" Journal of computational and graphical statistics 3, no. 4\n (1994): 409-432.\n\n\n**Hosking's method:**\n\n* Hosking, Jonathan RM. \"Modeling persistence in hydrological time series\n using fractional differencing.\" Water resources research 20, no. 12 (1984):\n 1898-1908.\n\n**Cholesky method:**\n\n* Asmussen, S\u00f8ren. Stochastic simulation with a view towards stochastic\n processes. University of Aarhus. Centre for Mathematical Physics and\n Stochastics (MaPhySto)[MPS], 1998.\n\n**Davies Harte method:**\n\n* Davies, Robert B., and D. S. Harte. \"Tests for Hurst effect.\" Biometrika 74,\n no. 1 (1987): 95-101.\n\n\nmultifractional Brownian motion\n-------------------------------\n\nThis package supports *approximate* generation of multifractional\nBrownian motion. The current method uses the Riemann\u2013Liouville fractional\nintegral representation of mBm.\n\nUsage:\n\n.. code-block:: python\n\n import math\n from fbm import MBM\n\n\n # Example Hurst function with respect to time.\n def h(t):\n return 0.25 * math.sin(20*t) + 0.5\n\n m = MBM(n=1024, hurst=h, length=1, method='riemannliouville')\n # or\n m = MBM(1024, h)\n\n # Generate a mBm realization\n mbm_sample = m.mbm()\n\n # Generate a mGn realization\n mgn_sample = m.mgn()\n\n # Get the times associated with the mBm\n t_values = m.times()\n\n\nThe ``hurst`` argument here should be a callable that accepts one argument\nand returns a float in (0, 1).\n\nFor one-off samples of mBm or mGn there are separate functions available:\n\n.. code-block:: python\n\n from fbm import mbm, mgn, times\n\n\n # Define a hurst function\n def h(t):\n return 0.75 - 0.5 * t\n\n # Generate a mbm realization\n mbm_sample = mbm(n=1024, hurst=h, length=1, method='riemannliouville')\n\n # Generate a fGn realization\n mgn_sample = mgn(n=1024, hurst=h, length=1, method='riemannliouville')\n\n # Get the times associated with the mBm\n t_values = times(n=1024, length=1)\n\n\n**Riemann-Liouville representation method:**\n\n*Approximate* method originally proposed for fBm in\n\n* Rambaldi, Sandro, and Ombretta Pinazza. \"An accurate fractional Brownian\n motion generator.\" Physica A: Statistical Mechanics and its Applications 208,\n no. 1 (1994): 21-30.\n\nAdapted to approximate mBm in\n\n* Muniandy, S. V., and S. C. Lim. \"Modeling of locally self-similar processes\n using multifractional Brownian motion of Riemann-Liouville type.\" Physical\n Review E 63, no. 4 (2001): 046104.\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/fbm", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "fbm", "package_url": "https://pypi.org/project/fbm/", "platform": "", "project_url": "https://pypi.org/project/fbm/", "project_urls": { "Homepage": "https://github.com/crflynn/fbm" }, "release_url": "https://pypi.org/project/fbm/0.3.0/", "requires_dist": [ "numpy" ], "requires_python": "", "summary": "Fractional Brownian motion realizations.", "version": "0.3.0" }, "last_serial": 5324210, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "62214ca03d2ca3d7eff4f0fc8f4c85b2", "sha256": "0a94a0809ab88ef543aa66589084f618b39cab9a474c50d5a3785b74f317f897" }, "downloads": -1, "filename": "fbm-0.1.0.zip", "has_sig": false, "md5_digest": "62214ca03d2ca3d7eff4f0fc8f4c85b2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7558, "upload_time": "2017-06-09T02:13:55", "url": "https://files.pythonhosted.org/packages/fe/9a/7e0b4bda73c0276d0b4d609814bb0e44bb3894a3db4f1f875e10bc4007ec/fbm-0.1.0.zip" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "d98d6b6c8eb32a5fb66e4316acd65844", "sha256": "ba861fd3e3b86944ec88cf88e9809ccb65ee7ca50510626b7b14ac585a170776" }, "downloads": -1, "filename": "fbm-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d98d6b6c8eb32a5fb66e4316acd65844", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 7807, "upload_time": "2017-06-10T14:52:39", "url": "https://files.pythonhosted.org/packages/0b/b3/6e84044accbf5fd5200686598d81d5b937afd1981b4791300c9e49f2f571/fbm-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c42bdfd0d7b65aef72478248bff91cc1", "sha256": "d31c49f3dfee3288655bdfcb36aedc5468c4743fd4bbdf45dc8389e2010d739b" }, "downloads": -1, "filename": "fbm-0.1.1.tar.gz", "has_sig": false, "md5_digest": "c42bdfd0d7b65aef72478248bff91cc1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6372, "upload_time": "2017-06-10T14:52:40", "url": "https://files.pythonhosted.org/packages/6a/dc/cdcad08db445ea800c123f0a2dcd44ef1fb3b71b0d83cef1054d1a303f6f/fbm-0.1.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "6f864d3bb87aa7bb3e086caf91e5631e", "sha256": "fd8fb3f63e2003cacf04f94e138d5896b447f3cc620a29a048e359672fc86ec6" }, "downloads": -1, "filename": "fbm-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6f864d3bb87aa7bb3e086caf91e5631e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11613, "upload_time": "2018-02-28T03:09:37", "url": "https://files.pythonhosted.org/packages/2b/e1/7d3aeecda8631d78fe98357e8033e4124174c359a35dc75ab403909e30db/fbm-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3642826c6ad978add1c7c86de70f0879", "sha256": "594a7facbab8629914afd8ea7e854324f0434a31aa02b6ef38ce2d60af7420b7" }, "downloads": -1, "filename": "fbm-0.2.0.tar.gz", "has_sig": false, "md5_digest": "3642826c6ad978add1c7c86de70f0879", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9733, "upload_time": "2018-02-28T03:09:40", "url": "https://files.pythonhosted.org/packages/05/f8/74b9c562216f7b4ec2866282717c62443d4eef3801c512f940bb99977c25/fbm-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "4447fe5b60131197ffc8eeda84fcbc02", "sha256": "8e03e230021f433d631dc289eecb6905a11a60eb6a89bd5a9dc4e66adcc22945" }, "downloads": -1, "filename": "fbm-0.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4447fe5b60131197ffc8eeda84fcbc02", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9375, "upload_time": "2019-05-27T22:59:08", "url": "https://files.pythonhosted.org/packages/16/f8/f103aa4947ae83ce8e91c448c284ac71b88e449e5418c7baff69c7c51624/fbm-0.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "92a4d1f8dd52ce0e1b5683a89d87b098", "sha256": "88d30a0851cbe72ba9c5cc1b668e9e1c49f460ace21cce6ebe7aa0b7f681d358" }, "downloads": -1, "filename": "fbm-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "92a4d1f8dd52ce0e1b5683a89d87b098", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9371, "upload_time": "2019-05-27T23:00:44", "url": "https://files.pythonhosted.org/packages/33/14/69ba4b1b00790c2608a63cc695c93cef6d932ec83a7bba8cfa8245350f84/fbm-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a76d7ca2171c35ae77c8b7c7ef39eac7", "sha256": "4f1cf868a3af0bb0da88e7a87bfc8f868817af29e926b4bebcc96d4c362e72ee" }, "downloads": -1, "filename": "fbm-0.3.0.tar.gz", "has_sig": false, "md5_digest": "a76d7ca2171c35ae77c8b7c7ef39eac7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9472, "upload_time": "2019-05-27T22:59:10", "url": "https://files.pythonhosted.org/packages/a9/52/a241755499462dd688858ccced125be3d338555b7a0e4d5f101236b91c71/fbm-0.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4447fe5b60131197ffc8eeda84fcbc02", "sha256": "8e03e230021f433d631dc289eecb6905a11a60eb6a89bd5a9dc4e66adcc22945" }, "downloads": -1, "filename": "fbm-0.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4447fe5b60131197ffc8eeda84fcbc02", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9375, "upload_time": "2019-05-27T22:59:08", "url": "https://files.pythonhosted.org/packages/16/f8/f103aa4947ae83ce8e91c448c284ac71b88e449e5418c7baff69c7c51624/fbm-0.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "92a4d1f8dd52ce0e1b5683a89d87b098", "sha256": "88d30a0851cbe72ba9c5cc1b668e9e1c49f460ace21cce6ebe7aa0b7f681d358" }, "downloads": -1, "filename": "fbm-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "92a4d1f8dd52ce0e1b5683a89d87b098", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9371, "upload_time": "2019-05-27T23:00:44", "url": "https://files.pythonhosted.org/packages/33/14/69ba4b1b00790c2608a63cc695c93cef6d932ec83a7bba8cfa8245350f84/fbm-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a76d7ca2171c35ae77c8b7c7ef39eac7", "sha256": "4f1cf868a3af0bb0da88e7a87bfc8f868817af29e926b4bebcc96d4c362e72ee" }, "downloads": -1, "filename": "fbm-0.3.0.tar.gz", "has_sig": false, "md5_digest": "a76d7ca2171c35ae77c8b7c7ef39eac7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9472, "upload_time": "2019-05-27T22:59:10", "url": "https://files.pythonhosted.org/packages/a9/52/a241755499462dd688858ccced125be3d338555b7a0e4d5f101236b91c71/fbm-0.3.0.tar.gz" } ] }