Learn R Programming

NeuralEstimators

This repository contains the R interface to the Julia package NeuralEstimators. The package facilitates a suite of neural methods for parameter inference in scenarios where simulation from the model is feasible. These methods are likelihood-free and amortised, in the sense that, once the neural networks are trained on simulated data, they enable rapid inference across arbitrarily many observed data sets in a fraction of the time required by conventional approaches. 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 Julia documentation or the vignette to get started!

Installation

To install the package, please:

  1. Install required software
    Ensure you have both Julia and R installed on your system.

  2. Install the Julia version of NeuralEstimators

    • To install the current stable version, run the following command in your terminal:
      julia -e 'using Pkg; Pkg.add("NeuralEstimators")'
    • To install the development version, run:
      julia -e 'using Pkg; Pkg.add(url="https://github.com/msainsburydale/NeuralEstimators.jl")'
  3. Install the R interface to NeuralEstimators

    • To install from CRAN, run the following command in R:
      install.packages("NeuralEstimators")
    • To install the development version, first ensure you have devtools installed, then run:
      devtools::install_github("msainsburydale/NeuralEstimators")

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 the software in your research or other activities, please use the citation information accessible with the command:

citation("NeuralEstimators")

Contributing

If you encounter a bug or have a suggestion, please consider opening an issue or submitting a pull request. Instructions for developing vignettes can be found in vignettes/README.md.

Papers using NeuralEstimators

  • Likelihood-free parameter estimation with neural Bayes estimators [paper] [code]

  • Neural methods for amortized inference [paper][code]

  • Neural Bayes estimators for irregular spatial data using graph neural networks [paper][code]

  • Neural Bayes estimators for censored inference with peaks-over-threshold models [paper] [code]

  • Neural parameter estimation with incomplete data [paper][code]

Copy Link

Version

Install

install.packages('NeuralEstimators')

Monthly Downloads

186

Version

0.2.0

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Matthew Sainsbury-Dale

Last Published

March 2nd, 2025

Functions in NeuralEstimators (0.2.0)

sampleposterior

sampleposterior
savestate

save the state of a neural estimator
spatialgraph

spatialgraph
tanhloss

tanhloss
posteriormode

posteriormode
plotestimates

Plot estimates vs. true values.
risk

computes a Monte Carlo approximation of an estimator's Bayes risk
rmse

computes a Monte Carlo approximation of an estimator's root-mean-square error (RMSE)
train

Train a neural estimator
NeuralEstimators-package

NeuralEstimators: Likelihood-Free Parameter Estimation using Neural Networks
assess

assess a neural estimator
estimate

estimate
encodedata

encodedata
loadstate

Load a saved state of a neural estimator
plotdistribution

Plot the empirical sampling distribution of an estimator.
bias

computes a Monte Carlo approximation of an estimator's bias
bootstrap

bootstrap