View source: R/ctx_node_covlmc.R
is_merged | R Documentation |
The function returns TRUE
if the context represented by this node is merged
with at least another one and FALSE
if this is not the case.
is_merged(node)
node |
A |
When a COVLMC is built on a time series with at least three distinct states,
some contexts can be merged: they use the same logistic model, leading to a
more parsimonious model. Those contexts are reported individually by
functions such as contexts.covlmc()
. The present function can be used
to detect such merging, while merged_with()
can be used to recover the
other contexts.
TRUE or FALSE, depending on the nature of the context
merged_with()
pc <- powerconsumption[powerconsumption$week == 15, ]
dts <- cut(pc$active_power, breaks = c(0, 1, 2, 3, 8))
dts_cov <- data.frame(day_night = (pc$hour >= 7 & pc$hour <= 17))
m_cov <- covlmc(dts, dts_cov, min_size = 5, alpha = 0.1)
ctxs <- contexts(m_cov)
## no merging
sapply(ctxs, is_merged)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.