v <- c(0,0,0,0,0,0,1,0,0,1,3,4,6,8,10)
weightedshapleyvalue(v,binary=TRUE,weights=c(0.5,0.2,0.2,0.1))
w <- c(0,0,0,0,30,30,40,40,50,50,60,70,80,90,100)
weightedshapleyvalue(w,weights=c(1,2,3,4),partition=list(c(1,2),c(3,4)))
Run the code above in your browser using DataLab