GradientExplainer#

class sdm.explain.GradientExplainer#

Bases: ICLExplainer[tuple[TableTensor, RelatedTables[TableTensor] | None]]

Return gradients showing how small input changes affect predictions.

Gradients describe model predictions with respect to preprocessed numerical query inputs, not the original input data.

For each output column, differentiate the sum of predictions over query rows and batch dimensions. Requires exactly one estimator.

Attribution tables have shape [C, ..., R, D], where C is the output count, R the query rows, and D the preprocessed input columns.