tuneThreshold: Tune prediction threshold.

Description Usage Arguments Value See Also

View source: R/tuneThreshold.R

Description

Optimizes the threshold of predictions based on probabilities. Works for classification and multilabel tasks. Uses optimizeSubInts for normal binary class problems and cma_es for multiclass and multilabel problems.

Usage

1
tuneThreshold(pred, measure, task, model, nsub = 20L, control = list())

Arguments

pred

[Prediction]
Prediction object.

measure

[Measure]
Performance measure to optimize. Default is the default measure for the task.

task

[Task]
Learning task. Rarely neeeded, only when required for the performance measure.

model

[WrappedModel]
Fitted model. Rarely neeeded, only when required for the performance measure.

nsub

[integer(1)]
Passed to optimizeSubInts for 2class problems. Default is 20.

control

[list]
Control object for cma_es when used. Default is empty list.

Value

[list]. A named list with with the following components: th is the optimal threshold, perf the performance value.

See Also

Other tune: TuneControl, getNestedTuneResultsOptPathDf, getNestedTuneResultsX, getTuneResult, makeModelMultiplexerParamSet, makeModelMultiplexer, makeTuneControlCMAES, makeTuneControlDesign, makeTuneControlGenSA, makeTuneControlGrid, makeTuneControlIrace, makeTuneControlMBO, makeTuneControlRandom, makeTuneWrapper, tuneParams


berndbischl/mlr documentation built on Nov. 21, 2017, 12:51 a.m.