weight_matrix: Calculate weighted matrix

weight_matrixR Documentation

Calculate weighted matrix

Description

Calculate weighted matrix

Usage

weight_matrix(X, normalize_W_weights = TRUE, is_groupwise = FALSE)

Arguments

X

data.table

normalize_W_weights

Logical. Whether to normalize the weights for the combinations to sum to 1 for increased numerical stability before solving the WLS (weighted least squares). Applies to all combinations except combination 1 and 2^m.

is_groupwise

Logical. Indicating whether group wise Shapley values are to be computed.

Value

Numeric matrix. See weight_matrix_cpp() for more information.

Author(s)

Nikolai Sellereite, Martin Jullum


NorskRegnesentral/shapr documentation built on April 19, 2024, 1:19 p.m.