Learn R Programming

shapr (version 1.0.6)

weight_matrix: Calculate Weighted Matrix

Description

Calculate Weighted Matrix

Usage

weight_matrix(X, normalize_W_weights = TRUE)

Value

Numeric matrix. See weight_matrix_cpp() for more information.

Arguments

X

data.table. Output from create_coalition_table().

normalize_W_weights

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

Author

Nikolai Sellereite, Martin Jullum