active_info: Active Information

Description Usage Arguments Value Examples

View source: R/activeinfo.R

Description

Compute the average or local active information of a time series with history length k.

Usage

1
active_info(series, k, local = FALSE)

Arguments

series

Vector or matrix specifying one or more time series.

k

Integer giving the history length.

local

Boolean specifying whether to compute the local active information.

Value

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# The typical usage is to provide the time series and the history length. 
xs <- c(0, 0, 1, 1, 1, 1, 0, 0, 0)
active_info(xs, k = 2) # 0.3059585
# [-0.1926451,  0.8073549,  0.2223924,  0.2223924, -0.3625701, 1.222392,
#  0.2223924]
active_info(xs, k = 2, local = TRUE)

# Multiple Initial Conditions
xs      <- matrix(0, nrow = 9, ncol = 2)
xs[, 1] <- c(0, 0, 1, 1, 1, 1, 0, 0, 0)
xs[, 2] <- c(1, 0, 0, 1, 0, 0, 1, 0, 0)
active_info(xs, k = 2) # 0.359879
# [, 1] 0.8073549, -0.3625701,  0.6374299,  0.6374299, -0.7776076, 0.8073549,
#      -1.192645
# [, 2] 0.8073549,  0.8073549,  0.2223924,  0.8073549,  0.8073549, 0.2223924,
#      0.8073549
active_info(xs, k = 2, local = TRUE)

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