NeuralEstimators

R-CMD-check codecov

This repository contains the R interface to the Julia package NeuralEstimators (see here). The package facilitates the user-friendly development of neural point estimators, which are neural networks that map data to a point summary of the posterior distribution. These estimators are likelihood-free and amortised, in the sense that, after an initial setup cost, inference from observed data can be made in a fraction of the time required by conventional approaches. It also facilitates the construction of neural networks that approximate the likelihood-to-evidence ratio in an amortised fashion, which allows for making inference based on the likelihood function or the entire posterior distribution. The package caters for any model for which simulation is feasible by allowing the user to implicitly define their model via simulated data. See the vignette to get started!

Installation

To install the package, please:

  1. Install Julia (see here) and R (see here).
  2. Install the Julia version of NeuralEstimators.
  3. Install the R interface to NeuralEstimators.

Note that if you wish to simulate training data “on-the-fly” using R functions, you will also need to install the Julia package RCall. Note also that one may compile the vignettes during installation (which takes roughly 10 minutes) by adding the argument build_vignettes = TRUE in the final command above.

Supporting and citing

This software was developed as part of academic research. If you would like to support it, please star the repository. If you use it in your research or other activities, please also use the following citation.

@article{,
    author = {Sainsbury-Dale, Matthew and Zammit-Mangion, Andrew and Huser, Raphaël},
    title = {Likelihood-Free Parameter Estimation with Neural {B}ayes Estimators},
    journal = {The American Statistician},
    year = {2024},
    volume = {78},
    pages = {1--14},
    doi = {10.1080/00031305.2023.2249522},
    url = {https://doi.org/10.1080/00031305.2023.2249522}
}

Papers using NeuralEstimators

Several other software packages have been developed to facilitate neural likelihood-free inference. These include:

A summary of the functionality in these packages is given in Zammit-Mangion et al. (2024, Section 6.1). Note that this list of related packages was created in July 2024; if you have software to add to this list, please contact the package maintainer.