The number of derived predictors from models or feature engineering methods.
Arguments
- range
A two-element vector holding the defaults for the smallest and largest possible values, respectively. If a transformation is specified, these values should be in the transformed units.
- trans
A
transobject from thescalespackage, such asscales::transform_log10()orscales::transform_reciprocal(). If not provided, the default is used which matches the units used inrange. 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
num_terms()
#> # Model Terms (quantitative)
#> Range: [1, ?]
num_terms(c(2L, 10L))
#> # Model Terms (quantitative)
#> Range: [2, 10]
