Linearly transforms a numeric target of a
TaskRegr so it is between
upper. The formula for this is x' = offset + x * scale,
where scale is (upper - lower) / (max(x) - min(x)) and
offset is -min(x) * scale + lower. The same transformation is applied during training and
R6Class object inheriting from
PipeOpTargetTrafoScaleRange$new(id = "targettrafoscalerange", param_vals = list())
Identifier of resulting object, default
param_vals :: named
List of hyperparameter settings, overwriting the hyperparameter settings that would otherwise be set during construction. Default
Input and output channels are inherited from
$state is a named
list containing the slots
The parameters are the parameters inherited from
PipeOpTargetTrafo, as well as:
Target value of smallest item of input target. Initialized to 0.
Target value of greatest item of input target. Initialized to 1.
.invert(). Should be used in combination with
Only methods inherited from
library(mlr3) task = tsk("boston_housing") po = PipeOpTargetTrafoScaleRange$new() po$train(list(task)) po$predict(list(task)) #syntactic sugar for a graph using ppl(): ttscalerange = ppl("targettrafo", trafo_pipeop = PipeOpTargetTrafoScaleRange$new(), graph = PipeOpLearner$new(LearnerRegrRpart$new())) ttscalerange$train(task) ttscalerange$predict(task) ttscalerange$state$regr.rpart
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.