View source: R/ctx_node_covlmc.R
model | R Documentation |
This function returns a representation of the logistic model associated to a COVLMC context from its node in the associated context tree.
model(node, type = c("coef", "full"))
node |
A |
type |
specifies the model information to return, either the
coefficients only ( |
Full model extraction is only possible if the COVLMC model what not fully
trimmed (see trim.covlmc()
). Notice that find_sequence.covlmc()
can
produce node that are not context: in this case this function return NULL
.
if node
is a context, the coefficients of the logistic model (as a
vector or a matrix depending on the size of the state space) or a logistic
model as a R object. If node
is not a context, NULL
.
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)
vals <- states(m_cov)
node <- find_sequence(m_cov, c(vals[1], vals[1]))
node
model(node)
model(node, type = "full")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.