Skip to contents

Compute the higher order terms as the difference between the output of ot_indices() and the output of ot_indices_wb() computed on the same sample.

Usage

residual_gap(ot_result, wb_result)

Arguments

ot_result

An object returned by ot_indices().

wb_result

An object returned by ot_indices_wb().

Value

An object of class gsaot_indices containing the higher order terms of the Wasserstein-Bures decomposition.

Details

The helper computes the point estimate difference between two already computed results. The function checks that the ground cost used for the ot_result object is the squared Euclidean one (default). The user should therefore pay attention to this aspect when using the function.

Examples

dat <- gaussian_fun(1000)
ot_result <- ot_indices(dat$x, dat$y, 10)
wb_result <- ot_indices_wb(dat$x, dat$y, 10)
residual_gap(ot_result, wb_result)
#> Method: residual gap 
#> 
#> Indices:
#>        X1        X2        X3 
#> 0.2354056 0.2471580 0.3255658