View source: R/covlmc_contexts.R
context_number.covlmc | R Documentation |
This function returns the total number of contexts of a VLMC with covariates.
## S3 method for class 'covlmc'
context_number(ct)
ct |
a fitted covlmc model. |
the number of contexts present in the VLMC with covariates.
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)
# should be 3
context_number(m_cov)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.