Sampling repelled point processes, estimating function integrals using various Monte Carlo methods (including a method with the repelled point process), and illustrating 2D gravitational allocation from the Lebesgue measure to a point process.
MCRPPy
is an open-source Python package that currently includes methods for sampling from a variety of point processes, including the homogeneous Poisson, Thomas, Ginibre, scrambled Sobol, Binomial, and their repelled counterparts. The project also includes several Monte Carlo methods, including a Monte Carlo method with the repelled point process.
Furthermore, the package provides tools for visualizing the gravitational allocation from the Lebesgue measure to a point process within a two-dimensional space (d=2).
This project serves as a companion code for the research paper titled ''Repelled point processes with application to numerical integration''; see: How to cite this work.
-
Python dependencies are listed in the
pyproject.toml
file.
-
Install from source (this may be broken)
# activate your virtual environment and run poetry add git+https://github.com/dhawat/MCRPPy.git # pip install git+https://github.com/dhawat/MCRPPy.git
The package can be installed in editable mode using poetry
.
To do this, clone the repository:
-
if you considered forking the repository
git clone https://github.com/your_user_name/MCRPPy.git
-
if you have not forked the repository
git clone https://github.com/dhawat/MCRPPy.git
and install the package in editable mode
cd mcrppy
poetry shell # to create/activate local .venv (see poetry.toml)
poetry install
# poetry install --no-dev # to avoid installing the development dependencies
# poetry add -E docs -E MCRPPy # to install extra dependencies
We wrote a companion paper to MCRPPy
, "Repelled point processes with application to numerical integration".
In the paper, we introduce the repelled point process, analyze its properties, and use it to develop a Monte Carlo estimator for approximating function integrals. Our main theoretical result is that the repelled Poisson point process yields an unbiased Monte Carlo estimator with lower variance than the crude Monte Carlo method. On the computational side, the evaluation of our estimator is only quadratic in the number of integrand evaluations and can be easily parallelized without any communication across tasks. We illustrate the variance reduction result with numerical experiments and compare it to popular Monte Carlo methods. Finally, we numerically investigate a few open questions on the repulsion operator.
We provide three tutorial Jupyter Notebooks available in the ./notebooks folder.
tutorial_sample_repelled_point_pattern.ipynb
: tutorial for sampling a Repelled point process.tutorial_monte_carlo_methods.ipynb
: tutorial for estimating function integrals using the available Monte Carlo methods.tutorial_gravitational_allocation.ipynb
: tutorial for illustrating a two-dimensional gravitational allocation from Lebesgue to a point process.
We also provide two Jupyter Notebooks for replicating the study of the companion paper.
companion_paper.ipynb
: main notebook.structure_factor_and_pcf.ipynb
: supplementary notebook.
See the README.md in the ./notebooks folder for further instructions on how to run a notebook locally.
If MCRPPy
has been significant in your research, and you would like to acknowledge the project in your academic publication, please consider citing it with this piece of BibTeX:
@preprint{HBLR2023,
arxivid = {2308.04825},
journal = {arXiv},
author = {Hawat, Diala and Bardenet, R{\'{e}}mi and Lachi{\`{e}}ze-Rey, Rapha{\"{e}}l},
title = {Repelled point processes with application to numerical integration},
year = {2023},
}