Description Details Examples Author(s) References See Also
An R implementation of some example applications of the ScaLE algorithm is provided.
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.
This section explains how the examples presented in Pollock et al. (2016) can be reproduced.
Download the relevant data files from http://www.warwick.ac.uk/mpollock/scale
Download the precomputed centering and preconditioning data from http://www.warwick.ac.uk/mpollock/scale
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 |
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 |
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 |
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).
Murray Pollock, Paul Fearnhead, Adam Johansen and Gareth Roberts
Maintainer: Murray Pollock <m.pollock@warwick.ac.uk>
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).
scale_logistic scale_ergodic
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.