Description Usage Arguments Value Examples
View source: R/predictiveinfo.R
Compute the predictive information from a time series with history length
kpast
and future length kfuture
.
1 | predictive_info(series, kpast, kfuture, local = FALSE)
|
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. |
Numeric giving the average predictive information or a vector giving the local predictive information.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.