setPredictType: Set the type of predictions the learner should return.

View source: R/setPredictType.R

setPredictTypeR Documentation

Set the type of predictions the learner should return.

Description

Possible prediction types are: Classification: Labels or class probabilities (including labels). Regression: Numeric or response or standard errors (including numeric response). Survival: Linear predictor or survival probability.

For complex wrappers the predict type is usually also passed down the encapsulated learner in a recursive fashion.

Usage

setPredictType(learner, predict.type)

Arguments

learner

(Learner | character(1))
The learner. If you pass a string the learner will be created via makeLearner.

predict.type

(character(1))
Classification: “response” or “prob”. Regression: “response” or “se”. Survival: “response” (linear predictor) or “prob”. Clustering: “response” or “prob”. Default is “response”.

Value

Learner.

See Also

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

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


mlr documentation built on Sept. 29, 2022, 5:05 p.m.