Define feature combinations, and fetch additional information about each unique combination
feature_combinations( m, exact = TRUE, n_combinations = 200, weight_zero_m = 10^6, group_num = NULL )
Positive integer. Total number of features.
2^m combinations are generated, otherwise a
subsample of the combinations is used.
Positive integer. Note that if
exact = TRUE,
n_combinations is ignored. However, if
m > 12 you'll need to add a positive integer
Numeric. The value to use as a replacement for infinite combination weights when doing numerical operations.
List. Contains vector of integers indicating the feature numbers for the different groups.
A data.table that contains the following columns:
Positive integer. Represents a unique key for each combination. Note that the table
is sorted by
id_combination, so that is always equal to
x[["id_combination"]] = 1:nrow(x).
List. Each item of the list is an integer vector where
represents the indices of the features included in combination
i. Note that all the items
are sorted such that
features[[i]] == sort(features[[i]]) is always true.
Vector of positive integers.
n_features[i] equals the number of features in combination
n_features[i] = length(features[[i]]).
Positive integer. The number of unique ways to sample
m different features, without replacement.
# All combinations x <- feature_combinations(m = 3) nrow(x) # Equals 2^3 = 8 #>  8 # Subsample of combinations x <- feature_combinations(exact = FALSE, m = 10, n_combinations = 1e2)