mlr3 (version 0.1.0-9000)

mlr_measures_classif.costs: Cost-sensitive Classification Measure

Description

Uses a cost matrix to create a classification measure. The cost matrix is stored as slot "costs". Costs are aggregated with the mean.

Usage

MeasureClassifCosts

Arguments

Format

R6::R6Class() inheriting from MeasureClassif.

Construction

MeasureClassifCosts$new(costs = NULL, normalize = TRUE)
  • id :: character(1) Identifier for the measure.

  • costs :: matrix() Numeric matrix of costs (truth in columns, predicted response in rows).

  • normalize :: logical(1) If TRUE, calculate the mean costs instead of the total costs.