View source: R/wvim-design-matrix.R
| wvim_design_matrix | R Documentation |
Creates a logical design matrix for leave-in or leave-out feature evaluation. Used internally with mlr3fselect to evaluate feature subsets.
wvim_design_matrix(
all_features,
feature_names = all_features,
direction = c("leave-out", "leave-in")
)
all_features |
(character()) All available feature names from the task. |
feature_names |
(character() | list of character()) Features or feature
groups to evaluate. Can be a vector for individual features or a named list
for grouped features. Defaults to |
direction |
(character(1)) Either |
data.table with logical columns for each feature in all_features and
length(feature_names) rows, one for each entry in feature_names
task = mlr3::tsk("mtcars")
# Individual features
feature_names = task$feature_names[1:3]
wvim_design_matrix(task$feature_names, feature_names, "leave-in")
wvim_design_matrix(task$feature_names, feature_names, "leave-out")
# Feature groups
feature_groups = list(
A = task$feature_names[1:2],
B = task$feature_names[3:5]
)
wvim_design_matrix(task$feature_names, feature_groups, "leave-out")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.