R: Local Statistical Compelxity - Automated Pattern Discovery in...
LSC-package
R Documentation
Local Statistical Compelxity - Automated Pattern Discovery in Spatio-Temporal Data
Description
A package to estimate local statistical complexity (LSC),
a measure for automated pattern discovery in
spatio-temporal data using optimal predictors (see
References).
This package is very tightly linked to the LICORS
package, which can be used to estimate these optimal
predictors and state space from data. The LSC
builds on a known or estimated state space; most
estimation is handled by LICORS (see
?LICORS).
There are two ways the state space can be represented:
either as a unique state label or as a vector of weights.
These two are the principal arguments in the functions of
this package:
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,
…, K of PLC i
This is an early release: some function names and
arguments might/will (slightly) change in the future, so
regularly check with new package updates.
Shalizi, C. R., R. Haslinger, J.-B. Rouquier, K. L.
Klinkner, and C. Moore (2006). “Automatic filters for
the detection of coherent structure in spatiotemporal
systems.” Physical Review E 73, 036104
Shalizi, C. R., K. L. Klinkner, and R. Haslinger (2004a).
“Quantifying self-organization with optimal
predictors.” Physical Review Letters 93, 118701.
See Also
The main functions in this package are
states2LSC to estimate LSC from the state
space, and
LICORS2LSC which is a
wrapper for estimating LSC from a "LICORS" class
estimate.
Since pattern discovery without visualization
is only of very limited use, the plot.LSC
function shows informative plots for (1+1)D and
(2+1)D systems.
Examples
## known predictive state space with a state-vector
data(contCA00)
ll <- states2LSC(states = contCA00$predictive_states - min(contCA00$predictive_states) +
1)
image2(ll, density = TRUE, legend = FALSE)
# An example using estimates from LICORS
## Not run:
example(LICORS) # this will give an object 'mod' of class 'LICORS'
image2(LICORS2LSC(mod))
## End(Not run)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(LSC)
Loading required package: LICORS
Loading required package: RColorBrewer
Loading required package: fields
Loading required package: spam
Loading required package: grid
Spam version 1.3-0 (2015-10-24) is loaded.
Type 'help( Spam)' or 'demo( spam)' for a short introduction
and overview of this package.
Help for individual functions is also obtained by adding the
suffix '.spam' to the function name, e.g. 'help( chol.spam)'.
Attaching package: 'spam'
The following objects are masked from 'package:base':
backsolve, forwardsolve
Loading required package: maps
# maps v3.1: updated 'world': all lakes moved to separate new #
# 'lakes' database. Type '?world' or 'news(package="maps")'. #
Loading required package: gam
Loading required package: splines
Loading required package: foreach
Loaded gam 1.12
Loading required package: Matrix
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/LSC/LSC-package.Rd_%03d_medium.png", width=480, height=480)
> ### Name: LSC-package
> ### Title: Local Statistical Compelxity - Automated Pattern Discovery in
> ### Spatio-Temporal Data
> ### Aliases: LSC LSC-package
> ### Keywords: package
>
> ### ** Examples
>
> ## known predictive state space with a state-vector
> data(contCA00)
> ll <- states2LSC(states = contCA00$predictive_states - min(contCA00$predictive_states) +
+ 1)
> image2(ll, density = TRUE, legend = FALSE)
>
> # An example using estimates from LICORS
> ## Not run:
> ##D example(LICORS) # this will give an object 'mod' of class 'LICORS'
> ##D image2(LICORS2LSC(mod))
> ## End(Not run)
>
>
>
>
>
> dev.off()
null device
1
>