View source: R/ctx_node_vlmc.R
metrics.ctx_node | R Documentation |
This function computes and returns predictive quality metrics for a node
(ctx_node
) extracted from a context tree.
## S3 method for class 'ctx_node'
metrics(model, ...)
model |
T |
... |
Additional parameters for predictive metrics computation. |
Compared to metrics.vlmc()
, this function focuses on a single context and
assesses the quality of its predictions, disregarding observations that have
other contexts. Apart from this limited scope, the function operates as
metrics.vlmc()
.
The returned value is guaranteed to have at least three components
accuracy
: the accuracy of the predictions
conf_mat
: the confusion matrix of the predictions, with predicted values
in rows and true values in columns
auc
: the AUC of the predictive model
David J. Hand and Robert J. Till (2001). "A Simple Generalisation of the Area Under the ROC Curve for Multiple Class Classification Problems." Machine Learning 45(2), p. 171–186. DOI: \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1023/A:1010920819831")}.
metrics.vlmc()
, metrics.ctx_node()
, contexts.vlmc()
, predict.vlmc()
.
pc <- powerconsumption[powerconsumption$week == 5, ]
dts <- cut(pc$active_power, breaks = c(0, quantile(pc$active_power, probs = c(0.25, 0.5, 0.75, 1))))
model <- vlmc(dts)
model_ctxs <- contexts(model)
metrics(model_ctxs[[4]])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.