lintsampler: Easy random sampling via linear interpolation
<|reference_start|>lintsampler: Easy random sampling via linear interpolation: 'lintsampler' provides a Python implementation of a technique we term 'linear interpolant sampling': an algorithm to efficiently draw pseudo-random samples from an arbitrary probability density function (PDF). First, the PDF is evaluated on a grid-like structure. Then, it is assumed that the PDF can be approximated between grid vertices by the (multidimensional) linear interpolant. With this assumption, random samples can be efficiently drawn via inverse transform sampling. lintsampler is primarily written with 'numpy', drawing some additional functionality from 'scipy'. Under the most basic usage of lintsampler, the user provides a Python function defining the target PDF and some parameters describing a grid-like structure to the 'LintSampler' class, and is then able to draw samples via the 'sample' method. Additionally, there is functionality for the user to set the random seed, employ quasi-Monte Carlo sampling, or sample within a premade grid ('DensityGrid') or tree ('DensityTree') structure.<|reference_end|>
@article{naik2024lintsampler:,
    title={lintsampler: Easy random sampling via linear interpolation},
    author={Aneesh P. Naik and Michael S. Petersen},
    journal={Journal of Open Source Software, 2024, 9(102), 6906},
    year={2024},
    doi={10.21105/joss.06906},
    archivePrefix={arXiv},
    eprint={2410.05811},
    primaryClass={stat.CO astro-ph.IM cs.MS math.PR}
}