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

R6Class object inheriting from PipeOpTaskPreproc/PipeOp.

Construction

PipeOpExplicitPta$new(id = "reweighing", param_vals = list())

Input and Output Channels

Input and output channels are inherited from PipeOpTaskPreproc. Instead of a Task, a TaskClassif is used as input and output during training and prediction.

The output during training is the input 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 PipeOpTaskPreproc.

Parameters

The PipeOp does not have any hyperparameters.

Internals

Copies the existing pta column to a new column.

Fields

Only fields inherited from PipeOpTaskPreproc/PipeOp.

Methods

Methods inherited from PipeOpTaskPreproc/PipeOp.

Super classes

mlr3pipelines::PipeOp -> mlr3pipelines::PipeOpTaskPreproc -> PipeOpExplicitPta

Methods

Public methods

Inherited methods

Method new()

Creates a new instance of this [R6][R6::R6Class][PipeOp] 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. See Parameters.


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")))

[Package mlr3fairness version 0.3.2 Index]