Efficient random sampling via linear interpolation.
When you know densities on the 2 endpoints of 1D interval, or the 4 corners of a 2D rectangle, or generally the lintsampler
provides a Python implementation of this.
See the documentation or the linear interpolant sampling paper for further details.
The documentation, including some example notebooks, is available at lintsampler.readthedocs.io/.
Three ways of installing lintsampler
:
pip
:
pip install lintsampler
conda
:
conda install -c conda-forge lintsampler
- Simply cloning this repository.
If using lintsampler
for a research publication, please cite our paper: link to come.
lintsampler
is available under the MIT license. See the LICENSE file for specifics.