Skip to contents

Visualise the feature importance (% Gain for boosted tree models) for each variable of a deweather model, with some customisation.

Usage

plot_dw_importance(dw, aggregate_factors = FALSE, sort = TRUE, cols = "tol")

Arguments

dw

A deweather model created with build_dw_model().

aggregate_factors

Defaults to FALSE. If TRUE, the importance of factor inputs (e.g., Weekday) will be summed into a single variable. This only applies to certain engines which report factor importance as disaggregate features.

sort

If TRUE, the default, features will be sorted by their importance. If FALSE, they will be sorted alphabetically. In plot_dw_importance() this will change the ordering of the y-axis, whereas in get_dw_importance() it will change whether var is returned as a factor or character data type.

cols

Colours to use for plotting. See openair::openColours().

Value

a ggplot2 figure