Skip to content

Instantly share code, notes, and snippets.

@AviSoori1x
Created April 14, 2021 00:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AviSoori1x/0421d5fb0527d1245abc49c6b8e6dbbb to your computer and use it in GitHub Desktop.
Save AviSoori1x/0421d5fb0527d1245abc49c6b8e6dbbb to your computer and use it in GitHub Desktop.
shapvals = s.linearExplainer(
table = {"name" : 'hmeqTest','caslib':'public'},
query = {"name" : 'realtime','caslib':'public'},
modelTable = {"name" :"hmeqTestAstore",'caslib':'public'},
modelTableType = "ASTORE",
predictedTarget = 'P_BAD1',
seed = 1234,
preset = "KERNELSHAP",
inputs = ['LOAN','MORTDUE','VALUE','YOJ','DEROG','DELINQ','CLAGE','NINQ','CLNO','DEBTINC','REASON', 'JOB','BAD'],
nominals = ['REASON', 'JOB','BAD']
)
shap1 = shapvals['ParameterEstimates']
shap = shap1[['Variable','Estimate']][0:10]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment