View source: R/wrap_add_feature_importance.R
add_feature_importance | R Documentation |
Add a feature importance to a dataset
add_feature_importance(dataset, feature_importance, ...)
is_wrapper_with_feature_importance(dataset)
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 |
A dynwrap object with the feature importance added.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.