Learn R Programming

dials (version 0.0.8)

num_comp: Number of new features

Description

The number of derived predictors from models or feature engineering methods.

Usage

num_comp(range = c(1L, unknown()), trans = NULL)

num_terms(range = c(1L, unknown()), trans = NULL)

Arguments

range

A two-element vector holding the defaults for the smallest and largest possible values, respectively.

trans

A trans object from the scales package, such as scales::log10_trans() or scales::reciprocal_trans(). If not provided, the default is used which matches the units used in range. If no transformation, NULL.

Details

Since the scale of these parameters often depends on the number of columns in the data set, the upper bound is set to unknown. For example, the number of PCA components is limited by the number of columns and so on.

The difference between num_comp() and num_terms() is semantics.

Examples

Run this code
# NOT RUN {
num_terms()
num_terms(c(2L, 10L))
# }

Run the code above in your browser using DataLab