Learn R Programming

LICORS (version 0.2.0)

LICORS-package: Light Cone Reconstruction of States - Predictive State Estimation From Spatio-Temporal Data

Description

A package for predictive state estimation from spatio-temporal data. The main function is mixed_LICORS, which implements an EM algorithm for predictive state recovery (see References).

This is an early release: some function names and arguments might/will (slightly) change in the future, so regularly check with new package updates.

Details on Methodology - Predictive State Model for Spatio-temporal Processes

For details and additional references please consult Goerg and Shalizi (2012, 2013).

Let \(\mathcal{D} = \lbrace X(\mathbf{r}, t) \mid \mathbf{r} \in \mathbf{S}, t = 1, \ldots, T \rbrace = (X_1, \ldots, X_{\tilde{N}})\) be a sample from a spatio-temporal process, observed over an \(N\)-dimensional spatial grid \(\mathbf{S}\) and for \(T\) time steps. We want to find a model that is optimal for forecasting a new \(X(\mathbf{s}, u)\) given the data \(\mathcal{D}\). To do this we need to know $$ P(X(\mathbf{s}, u) \mid \mathcal{D}) $$

In general this is too complicated/time-intensive since \(\mathcal{D}\) is very high-dimensional. But we know that in any physical system, information can only propagate at a finite speed, and thus we can restrict the search for optimal predictors to a subset \(\ell^{-}(\mathbf{r}, t) \subset \mathcal{D}\); this is the past light cone (PLC) at \((\mathbf{r}, t)\).

There exists a mapping \(\epsilon: \ell^{-} \rightarrow \mathcal{S}\), where \(\mathcal{S} = \lbrace s_1, \ldots, s_K \rbrace\) is the predictive state space. This mapping is such that $$ P(X_i \mid \ell^{-}_i) = P(X_i \mid s_j), $$ where \(s_j = \epsilon(\ell^{-}_i)\) is the predictive state of PLC \(i\). Furthermore, the future is independent of the past given the predictive state: $$ P(X_i \mid \ell^{-}_i, s_j) = P(X_i \mid s_j) . $$

The likelihood of the joint process factorizes as a product of predictive conditional distributions $$ P(X_1, \ldots, X_N ) \propto \prod_{i=1}^{N} P(X_i \mid \ell^{-}_i) = \prod_{i=1}^{N} P(X_i \mid \epsilon(\ell^{-}_i)). $$

Since \(s_j\) is unknown this can be seen as the complete data likelihood of a nonparametric finite mixture model over predictive states: $$ P(X_1, \ldots, X_N ) \propto \prod_{i=1}^{N} \sum_{j=1}^{K} \mathbf{1}(\epsilon(\ell^{-}_i) = s_j) \times P(X_i \mid s_j). $$

This predictive state model is a provably optimal finite mixture model, where the ``parameter'' \(\epsilon\) is chosen to provide optimal forecasts.

The LICORS R package implements methods to estimate this optimal mapping \(\epsilon\).

Acronyms and common function arguments

The R package uses a lot of acronyms and terminology from the References, which are provided here for the sake of clarity/easier function navigation:

LCs

light cones

PLC

past light cone; notation: \(\ell^{-}\)

FLC

future light cone; notation: \(\ell^{+}\)

LICORS

LIght COne Reconstruction of States

Many functions use these acryonyms as part of their name. Function arguments that repeat over and over again are:

weight.matrix

an \(N \times K\) matrix, where \(N\) are the samples and \(K\) are the states. That is, each row contains a vector of length \(K\) that adds up to one (the mixture weights).

states

a vector of length \(N\) with entry \(i\) being the label \(k = 1, \ldots, K\) of PLC \(i\)

References

Goerg and Shalizi (2013), JMLR W\&CP 31:289-297. Also available at arxiv.org/abs/1211.3760.

Goerg and Shalizi (2012). Available at arxiv.org/abs/1206.2398.

See Also

The main function in this package: mixed_LICORS

Examples

Run this code
# NOT RUN {
# setup the light cone geometry
LC_geom <- setup_LC_geometry(speed = 1, horizon = list(PLC = 2, FLC = 0), 
    shape = "cone")
# load the field
data(contCA00)
# get LC configurations from field
contCA_LCs <- data2LCs(contCA00$observed, LC.coordinates = LC_geom$coordinates)
# run mixed LICORS

mod <- mixed_LICORS(contCA_LCs, num.states_start = 10, initialization = "KmeansPLC", 
    max_iter = 20)

plot(mod)
# }

Run the code above in your browser using DataLab