This function returns the length of the memory of a COVLMC context represented
by a ctx_node_covlmc
object.
Arguments
- node
A
ctx_node_covlmc
object as returned byfind_sequence()
orcontexts.covlmc()
Examples
pc <- powerconsumption[powerconsumption$week == 5, ]
dts <- cut(pc$active_power, breaks = c(0, quantile(pc$active_power, probs = c(0.5, 1))))
dts_cov <- data.frame(day_night = (pc$hour >= 7 & pc$hour <= 17))
m_cov <- covlmc(dts, dts_cov, min_size = 10)
ctxs <- contexts(m_cov)
## get all the memory lengths
sapply(ctxs, covariate_memory)
#> [1] 2 0 0