axiom_completeness: Verifies the axiom of completeness.

View source: R/integratedGradients.R

axiom_completenessR Documentation

Verifies the axiom of completeness.

Description

Computes the difference in the prediction at input 'x' and the prediction at a 'baseline' and compare it with the sum of the integrated gradients.

Usage

axiom_completeness(input, baseline, model, site, integrated.gradients)

Arguments

input

The predictor field in matrix/array format.

baseline

The integrated gradients method attributes the prediction at input 'x' relative to a 'baseline', computing the contribution of 'x' to the prediction. The baseline parameter defines this baseline, . Default to NULL which set the baseline to a 0 array. For custom baselines, input an array with the dimensions matching those of the input layer of the neural network.

model

A keras sequential or functional model.

site

A data frame containing the 'x' and 'y' coordinates of the desired site where to compute the gradients. e.g., site = data.frame("x" = -3.82, "y" = 43.46)

integrated.gradients

An array/matrix of integrated gradients.

Value

A matrix/array of the gradients of the predictions w.r.t input

Author(s)

J. Bano-Medina


SantanderMetGroup/downscaleR.keras documentation built on July 7, 2023, 1:22 p.m.