Learn R Programming

counterfactuals (version 0.1.6)

make_param_set: Creates a ParamSet for the features of a data.table.

Description

Creates a ParamSet for the columns of dt. Depending on the class of a column, a different Domain is created:

  • double: p_dbl()

  • integer: p_int()

  • character: p_fct() (with unique values as levels)

  • factor: p_fct() (with factor levels as levels)

Usage

make_param_set(dt, lower = NULL, upper = NULL)

Value

A ParamSet for the features of dt.

Arguments

dt

(data.table())
The data for the ParamSet.

lower

(numeric() | NULL)
Vector of minimum values for numeric features. If not NULL, it should be named with the corresponding feature names. If NULL (default) lower is taken for each numeric feature as its minimum value in dt.

upper

(numeric() | NULL)
Vector of maximum values for numeric features. If not NULL, it should be named with the corresponding feature names. If NULL (default) upper is taken for each numeric feature as its maximum value in dt.