Visualise the feature importance (% Gain for boosted tree models) for each variable of a deweather model, with some customisation.
Arguments
- dw
A deweather model created with
build_dw_model().- aggregate_factors
Defaults to
FALSE. IfTRUE, 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. IfFALSE, they will be sorted alphabetically. Inplot_dw_importance()this will change the ordering of the y-axis, whereas inget_dw_importance()it will change whethervaris returned as a factor or character data type.- cols
Colours to use for plotting. See
openair::openColours().
Value
a ggplot2 figure
