add_feature_importance {dynwrap} | R Documentation |
Add a feature importance to a dataset
Description
Add a feature importance to a dataset
Usage
add_feature_importance(dataset, feature_importance, ...)
is_wrapper_with_feature_importance(dataset)
Arguments
dataset |
A dataset created by |
feature_importance |
The impotances of the features, can be a named vector or a dataframe with columns feature_id and importance |
... |
Extra information to be stored in the dataset |
Value
A dynwrap object with the feature importance added.
Examples
dataset <- example_dataset
feature_importance <- runif(nrow(dataset$feature_info))
names(feature_importance) <- dataset$feature_info$feature_id
dataset <- add_feature_importance(dataset, feature_importance)
head(dataset$feature_importance)
[Package dynwrap version 1.2.4 Index]