R: Density Measure

MeasureDens {mlr3proba} | R Documentation

## Density Measure

### Description

This measure specializes Measure for survival problems.

- `task_type` is set to `"dens"`.

- Possible values for `predict_type` are `"pdf"` and `"cdf"`.

Predefined measures can be found in the dictionary mlr3::mlr_measures.

### Super class

`mlr3::Measure` -> `MeasureDens`

### Methods

#### Public methods

- `MeasureDens$new()`

Inherited methods

- `mlr3::Measure$aggregate()`

- `mlr3::Measure$format()`

- `mlr3::Measure$help()`

- `mlr3::Measure$print()`

- `mlr3::Measure$score()`

#### Method `new()`

Creates a new instance of this R6 class.

##### Usage

    MeasureDens$new(
      id,
      range,
      minimize = NA,
      aggregator = NULL,
      properties = character(),
      predict_type = "pdf",
      task_properties = character(),
      packages = character(),
      man = NA_character_
    )

##### Arguments

`id`

  (`character(1)`)
  Identifier for the new instance.

`range`

  (`numeric(2)`)
  Feasible range for this measure as `c(lower_bound, upper_bound)`. Both bounds may be infinite.

`minimize`

  (`logical(1)`)
  Set to `TRUE` if good predictions correspond to small values, and to `FALSE` if good predictions correspond to large values. If set to `NA` (default), tuning this measure is not possible.

`aggregator`

  (`function(x)`)
  Function to aggregate individual performance scores `x` where `x` is a numeric vector. If `NULL`, defaults to `mean()`.

`properties`

  (`character()`)
  Properties of the measure. Must be a subset of mlr_reflections$measure_properties. Supported by `mlr3`:

  - `"requires_task"` (requires the complete Task),

  - `"requires_learner"` (requires the trained Learner),

  - `"requires_train_set"` (requires the training indices from the Resampling), and

  - `"na_score"` (the measure is expected to occasionally return `NA` or `NaN`).

`predict_type`

  (`character(1)`)
  Required predict type of the Learner. Possible values are stored in mlr_reflections$learner_predict_types.

`task_properties`

  (`character()`)
  Required task properties, see Task.

`packages`

  (`character()`)
  Set of required packages. A warning is signaled by the constructor if at least one of the packages is not installed, but loaded (not attached) later on-demand via `requireNamespace()`.

`man`

  (`character(1)`)
  String in the format `[pkg]::[topic]` pointing to a manual page for this object. The referenced help package can be opened via method `$help()`.

### See Also

Default density measures: `dens.logloss`

Other Measure: `MeasureSurv`

[Package mlr3proba version 0.4.0 Index]