This measure returns the number of observations in the Prediction object. Its main purpose is debugging.

Dictionary

This Measure can be instantiated via the dictionary mlr_measures or with the associated sugar function msr():

mlr_measures$get("debug")
msr("debug")

Meta Information

  • Type: NA

  • Range: \([0, \infty)\)

  • Minimize: NA

  • Required prediction: 'response'

See also

Super class

mlr3::Measure -> MeasureDebug

Public fields

na_ratio

(numeric(1))
Ratio of scores which randomly should be NA, between 0 (default) and 1. Default is 0.

Methods

Public methods

Inherited methods

Method new()

Creates a new instance of this R6 class.

Usage

MeasureDebug$new()


Method clone()

The objects of this class are cloneable with this method.

Usage

MeasureDebug$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

task = tsk("wine") learner = lrn("classif.featureless") measure = msr("debug") rr = resample(task, learner, rsmp("cv", folds = 3)) rr$score(measure)
#> task task_id learner #> 1: <TaskClassif[44]> wine <LearnerClassifFeatureless[32]> #> 2: <TaskClassif[44]> wine <LearnerClassifFeatureless[32]> #> 3: <TaskClassif[44]> wine <LearnerClassifFeatureless[32]> #> learner_id resampling resampling_id iteration prediction #> 1: classif.featureless <ResamplingCV[19]> cv 1 <list[1]> #> 2: classif.featureless <ResamplingCV[19]> cv 2 <list[1]> #> 3: classif.featureless <ResamplingCV[19]> cv 3 <list[1]> #> debug #> 1: 60 #> 2: 59 #> 3: 59