Skip to contents

Each design column's contribution to each row's prediction on the link scale, from the engine's own path-dependent Tree SHAP (LightGBM's type = "contrib", XGBoost's predcontrib = TRUE), with no tree code here. The bias holds each row's expected value plus its offset and the fit's base, so bias + rowSums(values) is the link-scale prediction: the log of the mean for a log-link family.

Usage

booster_contributions(object, newdata, offset = NULL)

Arguments

object

A booster_model from booster_fit().

newdata

A data frame.

offset

An optional offset added to the formula's.

Value

A list with values (a rows by design columns matrix) and bias.