compute_performance: Compute Performance for an Object

View source: R/allgeneric.R

compute_performanceR Documentation

Compute Performance for an Object

Description

Delegate calculation of performance metrics to the appropriate method.

Usage

compute_performance(obj, result)

Arguments

obj

The input object.

result

The classification/regression result object to evaluate.

Value

Named numeric vector of performance metrics.

Examples

cres <- binary_classification_result(
  observed  = factor(c("a", "b")),
  predicted = factor(c("a", "b")),
  probs     = matrix(c(0.8, 0.2, 0.3, 0.7), ncol = 2,
                     dimnames = list(NULL, c("a", "b")))
)
dummy <- list(performance = performance)
class(dummy) <- "mvpa_model"
compute_performance(dummy, cres)

bbuchsbaum/rMVPA documentation built on June 10, 2025, 8:23 p.m.