scale-package: The Scaleable Langevin Exact Algorithm - Reference...

Description Details Examples Author(s) References See Also

Description

An R implementation of some example applications of the ScaLE algorithm is provided.

Details

scale provides a reference implementation of the Scaleable Langevin Exact Algorithm as described in Pollock et al. (2016).

Note that this implementation attempts to explicitly replicate the mathematical formulation of the algorithm and computational efficiency has been sacrificed to a considerable degree in order to maintain the relationship between the mathematical presentation and the implementation itself.

Examples

This section explains how the examples presented in Pollock et al. (2016) can be reproduced.

Logistic Regression With Limited Information First, load this library, and download uniformative.Rdata from http://www.warwick.ac.uk/mpollock/scale (this file contains the data, the precomputed centering value and preconditioning matrix, and some helper functions.):

1
2
    library("scale")
    load("uninformative.RData")

Now run the algorithm:

1
 scale_logistic(fnm="uninformative-output.Rdata",p.num=1024,t.inc=0.0001,T.extend=0.0001,run.length=10,ss.size=2,ss.on=TRUE,seed.default=1,data.precompute=TRUE)

and after some time, the file uninformative-output.Rdata will contain the simulation output as an object with name simn. This can be supplied to scale_ergodic in order to obtain quantities suitable for computing ergodic averages as described in Pollock et al. (2016).

Logistic Regression for Airline Data First, load this library, and download airline.Rdata from http://www.warwick.ac.uk/mpollock/scale (this file contains the airline data, the precomputed centering value and preconditioning matrix and some helper functions.):

1
2
    library("scale")
    load("airline.RData")

Now run the algorithm:

1
 scale_logistic(fnm="airline-output.Rdata",p.num=1024,t.inc=0.00001,T.extend=0.00001,run.length=10,ss.size=2,ss.on=TRUE,seed.default=1,data.precompute=TRUE)

and after some time, the file airline-output.Rdata will contain the simulation output as an object with name simn. This can be supplied to scale_ergodic in order to obtain quantities suitable for computing ergodic averages as described in Pollock et al. (2016).

Large Logistic Regression First, load this library, and download large.Rdata from http://www.warwick.ac.uk/mpollock/scale (this file contains the precomputed centering value and preconditioning matrix and some )helper functions (including one to provide individual data values as required by the algorithm.):

1
2
    library("scale")
    load("large.RData")

Now run the algorithm:

1
 scale_logistic(fnm="large-output.Rdata",p.num=4096,t.inc=0.00001,T.extend=0.00001,run.length=10,ss.size=64,ss.on=TRUE,seed.default=1,data.precompute=TRUE)

and after some time, the file large-output.Rdata will contain the simulation output as an object with name simn. This can be supplied to scale_ergodic in order to obtain quantities suitable for computing ergodic averages as described in Pollock et al. (2016).

Author(s)

Murray Pollock, Paul Fearnhead, Adam Johansen and Gareth Roberts

Maintainer: Murray Pollock <m.pollock@warwick.ac.uk>

References

Pollock, Murray, Paul Fearnhead, Adam M. Johansen, and Gareth O. Roberts. "The scalable Langevin exact algorithm: Bayesian inference for big data." arXiv preprint arXiv:1609.03436 (2016).

See Also

scale_logistic scale_ergodic


mpoll/scale documentation built on Dec. 9, 2019, 7:15 a.m.