Giter Club home page Giter Club logo

point-process-rust's Introduction

Point processes in Rust

Crates.io Status Docs License Build Status

Point processes are stochastic processes with a wide range of applications in seismology, epidemiology, or financial mathematics. They are utilized to model the arrival of random events as a function of time.

variablepoisson

This crate provides functions to simulate point processes in Rust, built on top of ndarray. There is a Rust API available through the base crate as well as a Python library crate.

Overview

Time-dependent processes

The following time-dependent point processes have been implemented within the temporal module:

  • Poisson point process (homogeneous and inhomogeneous, with custom function)
  • Exponential-kernel Hawkes processes, using a linear-time simulation algorithm (both constant and variable background intensities supported)

cos_bg_exphawkes

Spatial processes

2dpoisson_circle

The generalized module provides functions for higher-dimensional processes.

For now, only Poisson processes have been implemented.

Estimators

The estimators module provides estimator routines for point process statistics such as the intensity.

polyexp_poisson_estimation

Python package

An Python wrapper crate is available in the pylib directory.

Examples

Run the examples with for instance

cd lib/
cargo run --example variable_poisson

Some will produce SVG image files in the lib/examples directory.

The examples show how to use the API.

They require the plotters crate for plotting.

Building locally

To compile the Rust library, do

cd lib/
cargo build

To build the Python library,

cd pylib/
cargo build --release

Warning on macOS, you might need to add the following to ~/.cargo/config (see PyO3's README):

[target.x86_64-apple-darwin]
rustflags = [
  "-C", "link-arg=-undefined",
  "-C", "link-arg=dynamic_lookup",
]

or linking with the C compiler will fail.

To compile both crates at the same time, just do

cargo build

point-process-rust's People

Contributors

dependabot[bot] avatar manifoldfr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

point-process-rust's Issues

Interest in putting this on pypi?

I've been learning the ropes of python packages, particularly about how to deploy self contained binaries (manylinux). I can help you get this on pypi if you're interested.

Multidimensional Hawkes processes

Right now the only kind of Hawkes process that is implemented is the one-dimensional exponential kernel process. It could be enhanced by adapting the sampling algorithm to a multidimensional case.

Lognormal Cox process

Add lognormal Cox processes to the library.

  • Temporal ones where the log-intensity is a Gaussian process (first simple brownian motion)
  • Eventually spatial ones with the log-intensity being a Gaussian process

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.