Skip to main content

Implements FPP and SLE algorithms

Project description

FPP-SLE

A filtered Poisson process and stochastic logistic equation comparison playground

PyPI version Python version Licence Tests codecov pre-commit Code style: black

Install

The package is publised on PyPI and installable via pip:

pip install fpp-sle

Usage

See the examples.py script for working examples. The main classes and functions this package provide is

  • VariableRateForcing (inside fpp module)

    This is a class that inherit from the forcing generator class provided by superposed-pulses. The class adds a method for setting a custom function that generates arrival times given the time axis and a given number of total pulses to generate.

  • get_arrival_times (inside the fpp module)

    This is a module that holds functions that draws arrival times according to some non-negative numpy array or callable, that is, the variable rate process.

    • pass_rate (inside get_arrival_times)

      Used to decorate the functions that draws arrival times from the rate function. This is the function you may want to pass in to the set_arrival_times_function method of the VariableRateForcing class. It decorates functions within get_arrival_times staring with from_.

    • from_ (inside get_arrival_times)

      These are generator functions that can take a callable or a numpy array as input, and returns arrival times based on the rate function. Currently only one generator function is implemented (from_inhomogeneous_poisson_process) which draws arrival times as if the rate was the underlying rate of a Poisson process.

  • sde

    This module holds different implementations of stochastic differential equations. See the docstring of the individual functions for explanations.

Contributing

To contribute to the project, clone and install the full development version (uses poetry for dependencies). There is also a .rtx.toml file that installs and sets up an appropriate virtual environment if rtx is available on your system (it's really good, check it out!).

git clone https://github.com/uit-cosmo/fpp-sle.git
cd fpp-sle
# Set up a virtual environment, for example with rtx
rtx i
poetry install
pre-commit install

Before committing new changes to a branch you may run command

nox

to run the full test suite. You will need Poetry, nox and nox-poetry installed for this.

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

fpp_sle-0.2.3.tar.gz (22.1 kB view hashes)

Uploaded Source

Built Distribution

fpp_sle-0.2.3-py3-none-any.whl (22.1 kB view hashes)

Uploaded Python 3

Supported by

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