plotFeatureImportance: Visualize the feature importance

View source: R/plot_fi.R

plotFeatureImportanceR Documentation

Visualize the feature importance

Description

This function visualizes the feature importance as horizontal bar plot.

Usage

plotFeatureImportance(cboost, num_feats = NULL, aggregate = TRUE)

Arguments

cboost

(Compboost)
A trained Compboost object.

num_feats

(integer(1L))
Number of features that are visualized. All features are added if set to NULL.

aggregate

(logical(1L))
Flag whether the feature importance is aggregated by feature. Otherwise it is visualized per base learner.

Value

ggplot object containing the graphic.

Examples

cboost = boostSplines(data = iris, target = "Sepal.Length", loss = LossQuadratic$new())
plotFeatureImportance(cboost)
plotFeatureImportance(cboost, num_feats = 2)
plotFeatureImportance(cboost, num_feats = 2, aggregate = FALSE)

schalkdaniel/compboost documentation built on April 15, 2023, 9:03 p.m.