R: Set the probability threshold the learner should use.

setPredictThreshold {mlr} | R Documentation

## Set the probability threshold the learner should use.

### Description

See `predict.threshold` in makeLearner and setThreshold.

For complex wrappers only the top-level `predict.type` is currently set.

### Usage

    setPredictThreshold(learner, predict.threshold)

### Arguments

`learner` | (Learner | `character(1)`) The learner. If you pass a string the learner will be created via makeLearner.
`predict.threshold` | (numeric) Threshold to produce class labels. Has to be a named vector, where names correspond to class labels. Only for binary classification it can be a single numerical threshold for the positive class. See setThreshold for details on how it is applied. Default is `NULL` which means 0.5 / an equal threshold for each class.

### Value

Learner.

### See Also

Other predict: `asROCRPrediction()`, `getPredictionProbabilities()`, `getPredictionResponse()`, `getPredictionTaskDesc()`, `predict.WrappedModel()`, `setPredictType()`

Other learner: `LearnerProperties`, `getClassWeightParam()`, `getHyperPars()`, `getLearnerId()`, `getLearnerNote()`, `getLearnerPackages()`, `getLearnerParVals()`, `getLearnerParamSet()`, `getLearnerPredictType()`, `getLearnerShortName()`, `getLearnerType()`, `getParamSet()`, `helpLearnerParam()`, `helpLearner()`, `makeLearners()`, `makeLearner()`, `removeHyperPars()`, `setHyperPars()`, `setId()`, `setLearnerId()`, `setPredictType()`

[Package mlr version 2.17.1 Index]