LICORS-package: Light Cone Reconstruction of States - Predictive State...

Description Details on Methodology - Predictive State Model for Spatio-temporal Processes Acronyms and common function arguments Author(s) References See Also Examples


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, …, T \rbrace = (X_1, …, 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 ε: \ell^{-} \rightarrow \mathcal{S}, where \mathcal{S} = \lbrace s_1, …, 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 = ε(\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, …, X_N ) \propto ∏_{i=1}^{N} P(X_i \mid \ell^{-}_i) = ∏_{i=1}^{N} P(X_i \mid ε(\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, …, X_N ) \propto ∏_{i=1}^{N} ∑_{j=1}^{K} \mathbf{1}(ε(\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” ε is chosen to provide optimal forecasts.

The LICORS R package implements methods to estimate this optimal mapping ε.

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:


light cones


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


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


LIght COne Reconstruction of States

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


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).


a vector of length N with entry i being the label k = 1, …, K of PLC i


Georg M. Goerg


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

Goerg and Shalizi (2012). Available at

See Also

The main function in this package: mixed_LICORS


## 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
# 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)


## End(Not run)

Search within the LICORS package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.