Aggregates SHAP values across horizons and draws a horizontal waterfall.

plot_dynrmf_shap_waterfall(
  shap,
  title = "SHAP Waterfall",
  agg_fun = sum,
  colors = list(pos = "#4575b4", neg = "#d73027", base = "#878787")
)

Arguments

shap

A "dynrmf_shap" object from dynrmf_shap()

title

Plot title string

agg_fun

How to aggregate across horizons: sum (default) or mean

colors

Named list with elements "pos", "neg", "base"

Value

A ggplot2 object