https://github.com/bigbuildbench/crflynn_stochastic
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.8%) to scientific vocabulary
Last synced: 10 months ago
·
JSON representation
Repository
Basic Info
- Host: GitHub
- Owner: BigBuildBench
- License: mit
- Language: Python
- Default Branch: master
- Size: 0 Bytes
Statistics
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
- Releases: 0
Created over 1 year ago
· Last pushed over 1 year ago
Metadata Files
Readme
Changelog
License
README.rst
stochastic
==========
|build| |rtd| |codecov| |pypi| |pyversions|
.. |build| image:: https://github.com/crflynn/stochastic/actions/workflows/build.yml/badge.svg
:target: https://github.com/crflynn/stochastic/actions
.. |rtd| image:: https://img.shields.io/readthedocs/stochastic.svg
:target: http://stochastic.readthedocs.io/en/latest/
.. |codecov| image:: https://codecov.io/gh/crflynn/stochastic/branch/master/graphs/badge.svg
:target: https://codecov.io/gh/crflynn/stochastic
.. |pypi| image:: https://img.shields.io/pypi/v/stochastic.svg
:target: https://pypi.python.org/pypi/stochastic
.. |pyversions| image:: https://img.shields.io/pypi/pyversions/stochastic.svg
:target: https://pypi.python.org/pypi/stochastic
A python package for generating realizations of stochastic processes.
Installation
------------
The ``stochastic`` package is available on pypi and can be installed using pip
.. code-block:: shell
pip install stochastic
Dependencies
~~~~~~~~~~~~
Stochastic uses ``numpy`` for many calculations and ``scipy`` for sampling
specific random variables.
Processes
---------
This package offers a number of common discrete-time, continuous-time, and
noise process objects for generating realizations of stochastic processes as
``numpy`` arrays.
The diffusion processes are approximated using the Euler–Maruyama method.
Here are the currently supported processes and their class references within
the package.
* stochastic.processes
* continuous
* BesselProcess
* BrownianBridge
* BrownianExcursion
* BrownianMeander
* BrownianMotion
* CauchyProcess
* FractionalBrownianMotion
* GammaProcess
* GeometricBrownianMotion
* InverseGaussianProcess
* MixedPoissonProcess
* MultifractionalBrownianMotion
* PoissonProcess
* SquaredBesselProcess
* VarianceGammaProcess
* WienerProcess
* diffusion
* DiffusionProcess (generalized)
* ConstantElasticityVarianceProcess
* CoxIngersollRossProcess
* ExtendedVasicekProcess
* OrnsteinUhlenbeckProcess
* VasicekProcess
* discrete
* BernoulliProcess
* ChineseRestaurantProcess
* DirichletProcess
* MarkovChain
* MoranProcess
* RandomWalk
* noise
* BlueNoise
* BrownianNoise
* ColoredNoise
* PinkNoise
* RedNoise
* VioletNoise
* WhiteNoise
* FractionalGaussianNoise
* GaussianNoise
Usage patterns
--------------
Sampling
~~~~~~~~
To use ``stochastic``, import the process you want and instantiate with the
required parameters. Every process class has a ``sample`` method for generating
realizations. The ``sample`` methods accept a parameter ``n`` for the quantity
of steps in the realization, but others (Poisson, for instance) may take
additional parameters. Parameters can be accessed as attributes of the
instance.
.. code-block:: python
from stochastic.processes.discrete import BernoulliProcess
bp = BernoulliProcess(p=0.6)
s = bp.sample(16)
success_probability = bp.p
Continuous processes provide a default parameter, ``t``, which indicates the
maximum time of the process realizations. The default value is 1. The sample
method will generate ``n`` equally spaced increments on the
interval ``[0, t]``.
Sampling at specific times
~~~~~~~~~~~~~~~~~~~~~~~~~~
Some continuous processes also provide a ``sample_at()`` method, in which a
sequence of time values can be passed at which the object will generate a
realization. This method ignores the parameter, ``t``, specified on
instantiation.
.. code-block:: python
from stochastic.processes.continuous import BrownianMotion
bm = BrownianMotion(drift=1, scale=1, t=1)
times = [0, 3, 10, 11, 11.2, 20]
s = bm.sample_at(times)
Sample times
~~~~~~~~~~~~
Continuous processes also provide a method ``times()`` which generates the time
values (using ``numpy.linspace``) corresponding to a realization of ``n``
steps. This is particularly useful for plotting your samples.
.. code-block:: python
import matplotlib.pyplot as plt
from stochastic.processes.continuous import FractionalBrownianMotion
fbm = FractionalBrownianMotion(hurst=0.7, t=1)
s = fbm.sample(32)
times = fbm.times(32)
plt.plot(times, s)
plt.show()
Specifying an algorithm
~~~~~~~~~~~~~~~~~~~~~~~
Some processes provide an optional parameter ``algorithm``, in which one can
specify which algorithm to use to generate the realization using the
``sample()`` or ``sample_at()`` methods. See the documentation for
process-specific implementations.
.. code-block:: python
from stochastic.processes.noise import FractionalGaussianNoise
fgn = FractionalGaussianNoise(hurst=0.6, t=1)
s = fgn.sample(32, algorithm='hosking')
Owner
- Name: BigBuildBench
- Login: BigBuildBench
- Kind: organization
- Repositories: 1
- Profile: https://github.com/BigBuildBench
abbr. B3, benchmarking the repo-level understanding capability of your LLMs by reconstructing project build-file.
GitHub Events
Total
- Create event: 4
Last Year
- Create event: 4
Dependencies
.github/workflows/build.yml
actions
- actions/cache v1 composite
- actions/checkout v1 composite
- asdf-vm/actions/setup v1.0.1 composite
docs/requirements.txt
pypi
- alabaster ==0.7.12
- appdirs ==1.4.4
- argh ==0.26.2
- atomicwrites ==1.4.0
- attrs ==21.4.0
- babel ==2.10.1
- black ==19.10b0
- certifi ==2022.5.18.1
- charset-normalizer ==2.0.12
- click ==8.1.3
- codecov ==2.1.12
- colorama ==0.4.4
- coverage ==6.4.1
- cycler ==0.11.0
- docutils ==0.17.1
- execnet ==1.9.0
- fonttools ==4.33.3
- idna ==3.3
- imagesize ==1.3.0
- isort ==4.3.21
- jinja2 ==3.0.3
- kiwisolver ==1.4.2
- livereload ==2.6.3
- markupsafe ==2.1.1
- matplotlib ==3.5.2
- more-itertools ==8.13.0
- numpy ==1.22.4
- packaging ==21.3
- pathspec ==0.9.0
- pathtools ==0.1.2
- pillow ==9.1.1
- pluggy ==0.13.1
- port-for ==0.3.1
- py ==1.11.0
- pygments ==2.12.0
- pyparsing ==3.0.9
- pytest ==4.6.11
- pytest-cov ==2.12.1
- pytest-forked ==1.4.0
- pytest-mock ==1.13.0
- pytest-xdist ==1.34.0
- python-dateutil ==2.8.2
- pytz ==2022.1
- pyyaml ==6.0
- regex ==2022.6.2
- requests ==2.28.0
- scipy ==1.8.1
- setuptools-scm ==6.4.2
- six ==1.16.0
- snowballstemmer ==2.2.0
- sphinx ==2.4.5
- sphinx-autobuild ==0.7.1
- sphinx-rtd-theme ==0.4.3
- sphinxcontrib-applehelp ==1.0.2
- sphinxcontrib-devhelp ==1.0.2
- sphinxcontrib-htmlhelp ==2.0.0
- sphinxcontrib-jsmath ==1.0.1
- sphinxcontrib-qthelp ==1.0.3
- sphinxcontrib-serializinghtml ==1.1.5
- toml ==0.10.2
- tomli ==2.0.1
- tornado ==6.1
- typed-ast ==1.5.4
- urllib3 ==1.26.9
- watchdog ==2.1.9
- wcwidth ==0.2.5
pyproject.toml
pypi
- Jinja2 3.0.3 develop
- black ^22.3.0 develop
- codecov ^2.1.7 develop
- isort ^5.10.1 develop
- matplotlib ^3.1 develop
- pytest ^4.5 develop
- pytest-cov ^2.7 develop
- pytest-mock ^1.10 develop
- pytest-xdist ^1.28 develop
- sphinx ^2.0 develop
- sphinx-autobuild ^0.7.1 develop
- sphinx-rtd-theme ^0.4.3 develop
- python >=3.8,<3.11