InputTrafo: Input Transformation Base Class

InputTrafoR Documentation

Input Transformation Base Class

Description

Abstract input transformation class.

An input transformation can be used within a Surrogate to perform a transformation of the feature variables.

Active bindings

label

(character(1))
Label for this object.

man

(character(1))
String in the format ⁠[pkg]::[topic]⁠ pointing to a manual page for this object.

packages

(character())
Set of required packages. A warning is signaled if at least one of the packages is not installed, but loaded (not attached) later on-demand via requireNamespace().

state

(named list() | NULL)
List of meta information regarding the parameters and their state.

search_space

(paradox::ParamSet)
Search space.

cols_x

(paradox::ParamSet)
Column ids of feature variables that should be transformed.

Methods

Public methods


Method new()

Creates a new instance of this R6 class.

Usage
InputTrafo$new(label = NA_character_, man = NA_character_)
Arguments
label

(character(1))
Label for this object.

man

(character(1))
String in the format ⁠[pkg]::[topic]⁠ pointing to a manual page for this object.


Method update()

Learn the transformation based on observed data and update parameters in ⁠$state⁠. Must be implemented by subclasses.

Usage
InputTrafo$update(xdt)
Arguments
xdt

(data.table::data.table())
Data. One row per observation with at least columns ⁠$cols_x⁠.


Method transform()

Perform the transformation. Must be implemented by subclasses.

Usage
InputTrafo$transform(xdt)
Arguments
xdt

(data.table::data.table())
Data. One row per observation with at least columns ⁠$cols_x⁠.

Returns

data.table::data.table() with the transformation applied to the columns ⁠$cols_x⁠ (if applicable) or a subset thereof.


Method format()

Helper for print outputs.

Usage
InputTrafo$format()
Returns

(character(1)).


Method print()

Print method.

Usage
InputTrafo$print()
Returns

(character()).


Method clone()

The objects of this class are cloneable with this method.

Usage
InputTrafo$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

See Also

Other Input Transformation: InputTrafoUnitcube, mlr_input_trafos


mlr3mbo documentation built on June 8, 2025, 12:24 p.m.