predictive_info: Predictive Information

Description Usage Arguments Value Examples

View source: R/predictiveinfo.R

Description

Compute the predictive information from a time series with history length kpast and future length kfuture.

Usage

1
predictive_info(series, kpast, kfuture, local = FALSE)

Arguments

series

Vector or matrix specifying one or more time series.

kpast

Integer giving the history length.

kfuture

Integer giving the future length.

local

Boolean specifying whether to compute the local predictive information.

Value

Numeric giving the average predictive information or a vector giving the local predictive information.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# One initial condition
xs <- c(0, 0, 1, 1, 0, 0, 1, 1, 0)
predictive_info(xs, kpast = 1, kfuture = 2) # 0.985228

# [0.807, 0.807, 1.222, 1.222, 0.807, 0.807, 1.222]
predictive_info(xs, kpast = 1, kfuture = 2, local = TRUE)

# Multiple initial conditions
xs      <- matrix(0, nrow = 9, ncol = 2)
xs[, 1] <- c(0, 0, 1, 1, 0, 0, 1, 1, 0)
xs[, 2] <- c(0, 1, 0, 1, 0, 1, 0, 1, 0)
predictive_info(xs, kpast = 1, kfuture = 2) # 0.244905

# [, 1] -0.515 0.807 -0.363 1.222 -0.515 0.807 -0.363
# [, 2] 0.222 0.485  0.222 0.485  0.222 0.485  0.222
predictive_info(xs, kpast = 1, kfuture = 2, local = TRUE)

rinform documentation built on April 1, 2018, 12:12 p.m.