|
How to fairly attribute member's contribution? The solution by Lloyd Shapley satisfies the following properties:
Written as formula:
See: https://christophm.github.io/interpretable-ml-book/shapley.html
In the formula above, p is the total number of members and S is the number of members in the coalition excluding the member of interest.
The weight is inversely proportional to the size of a coalition “group” where each “group” includes all coalitions with the same number of members.
Each group ends up in having the same total weight of 1/4 and all weights add up to 1.
proc cas;
explainModel.linearExplainer result=shapr / table = {name='PRICEDATA_ID', caslib='PUBLIC'}
query = {name='QUERY', caslib='CASUSER'}
modelTable = {name='GB_PRICEDATA_MODEL_ID', caslib='MODELS'}
modelTableType = 'ASTORE'
predictedTarget = 'P_sale'
seed =1234
preset = 'KERNELSHAP'
dataGeneration = {method='None'}
inputs= {{name = "sale_lag3"},
{name = "sale_lag2"},
{name = "sale_lag1"},
{name = "discount"},
{name = "price"}}
;
run;
Note: If you are interested in a global explanation of your machine learning model for time series data, you can just adapt the preset parameter to 'GLOBALREG' to create a surrogate model for a global explanation of your model. |
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning and boost your career prospects.