IM_dep {GTbasedIM} | R Documentation |
IM_dep Function: Calculate Influence Measure with Dependent Features
Description
The IM_dep
function calculates the influence measure of equation (2) in Davila-Pena et al. (2024).
The features are grouped into unions based on the index
vector.
Usage
IM_dep(Xdata, Ydata, index)
Arguments
Xdata |
Matrix. A dataset where rows represent observations and columns represent features. |
Ydata |
Vector. The response variable associated with each row in |
index |
Vector. A grouping vector that assigns each feature in |
Details
The IM_dep
function calculates the weighted average of the number of times a change in
the value of a feature associated to a specific union influences the response value.
Value
A vector of influences for each feature.
References
Davila-Pena, L., Saavedra-Nieves, A., & Casas-Méndez, B. (2024). On the influence of dependent features in classification problems: a game-theoretic perspective. arXiv preprint. doi:10.48550/arXiv.2408.02481.
Examples
# Example usage from Example 5.2 in Davila-Pena et al. (2024):
library(CoopGame)
n.user <- 16
Xdata <- createBitMatrix(4)[,-5]
Xdata <- rbind(c(0,0,0,0),Xdata)
Ydata <- rep(0,n.user)
Ydata[1+c(10,11,13,14,15)] <- 1
# Scenario 1:
IM_dep(Xdata,Ydata,index = c(1,2,3,4))
# Scenario 9:
IM_dep(Xdata,Ydata,index = c(1,2,1,2))