weight_matrix_cpp {shapr}R Documentation

Calculate weight matrix

Description

Calculate weight matrix

Usage

weight_matrix_cpp(coalitions, m, n, w)

Arguments

coalitions

List. Each of the elements equals an integer vector representing a valid combination of features/feature groups.

m

Integer. Number of features/feature groups.

n

Integer. Number of combinations.

w

Numeric vector Should have length n. w[i] equals the Shapley weight of feature/feature group combination i, represented by coalitions[[i]].

Value

Matrix of dimension n x m + 1

Author(s)

Nikolai Sellereite, Martin Jullum


[Package shapr version 1.0.4 Index]