mlr_pipeops_explicit_pta {mlr3fairness} | R Documentation |
PipeOpExplicitPta
Description
Turns the column with column role 'pta' into an explicit separate column prefixed with "..internal_pta". This keeps it from getting changed or adapted by subsequent pipelines that operate on the feature pta.
Format
R6::R6Class object inheriting from mlr3pipelines::PipeOpTaskPreproc/mlr3pipelines::PipeOp.
Construction
PipeOpExplicitPta$new(id = "reweighing", param_vals = list())
-
id
(character(1)
). -
param_vals
(list()
)
Input and Output Channels
Input and output channels are inherited from mlr3pipelines::PipeOpTaskPreproc. Instead of a mlr3::Task, a mlr3::TaskClassif is used as input and output during training and prediction.
The output during training is the input mlr3::Task with added weights column according to target class. The output during prediction is the unchanged input.
State
The $state
is a named list
with the $state
elements inherited from mlr3pipelines::PipeOpTaskPreproc.
Parameters
The PipeOp does not have any hyperparameters.
Internals
Copies the existing pta column to a new column.
Fields
Only fields inherited from mlr3pipelines::PipeOpTaskPreproc/mlr3pipelines::PipeOp.
Methods
Methods inherited from mlr3pipelines::PipeOpTaskPreproc/mlr3pipelines::PipeOp.
Super classes
mlr3pipelines::PipeOp
-> mlr3pipelines::PipeOpTaskPreproc
-> PipeOpExplicitPta
Methods
Public methods
Inherited methods
Method new()
Creates a new instance of this R6::R6Class R6 class.
Usage
PipeOpExplicitPta$new(id = "explicit_pta", param_vals = list())
Arguments
id
character
The PipeOps identifier in the PipeOps library.param_vals
list
The parameter values to be set. SeeParameters
.
Method clone()
The objects of this class are cloneable with this method.
Usage
PipeOpExplicitPta$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.
See Also
https://mlr3book.mlr-org.com/list-pipeops.html
Other PipeOps:
mlr_pipeops_equalized_odds
,
mlr_pipeops_reweighing
Examples
library("mlr3")
library("mlr3pipelines")
epta = po("explicit_pta")
new = epta$train(list(tsk("adult_train")))