- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I've successfully created an autoencoder model using the annTrain action.
Now I want to add explanation to a single prediction using SHAP method (as in https://arxiv.org/pdf/1903.02407.pdf).
I see that the linearExplainer action supports the SHAP method (https://documentation.sas.com/?docsetId=casactml&docsetTarget=casactml_linearexplainer_syntax.htm&do...) but it requires a target variable.
Since the autoencoder model does not have a target variable (i.e. the input variables are the targets), what can I do?
Thanks
Regards
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
EduxEdux,
The linearExplainer action, which supports the SHAP Kernel method for estimating Shapley values does require a "predicted target." However, in your case, you have multiple "predicted targets" as the paper about Shapley values on autotunecoders suggests. While the autoencoder is trying to predict what each input variable is, the linearExplainer action wants to know the name of the output variable.
The only complication I can see is if the annTrain autoencode has the same output variable names as input variable names. As long as they are different names, derived or otherwise, then you should be able to use the linearExplainer action.
For the "predictedTarget" parameter, instead use the output variable name corresponding to the input variable that you wish to examine. As the paper says, you first need to consider the top variables which are different between input and output (and thus you'd need different names in SAS anyway, otherwise you'd overwrite). When you go to use the linearExplainer action, use that output variable name as the "predictedTarget".
Hopefully this is clear, let me know if I can help further!
-Ralph
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
EduxEdux,
The linearExplainer action, which supports the SHAP Kernel method for estimating Shapley values does require a "predicted target." However, in your case, you have multiple "predicted targets" as the paper about Shapley values on autotunecoders suggests. While the autoencoder is trying to predict what each input variable is, the linearExplainer action wants to know the name of the output variable.
The only complication I can see is if the annTrain autoencode has the same output variable names as input variable names. As long as they are different names, derived or otherwise, then you should be able to use the linearExplainer action.
For the "predictedTarget" parameter, instead use the output variable name corresponding to the input variable that you wish to examine. As the paper says, you first need to consider the top variables which are different between input and output (and thus you'd need different names in SAS anyway, otherwise you'd overwrite). When you go to use the linearExplainer action, use that output variable name as the "predictedTarget".
Hopefully this is clear, let me know if I can help further!
-Ralph
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You're right, thank you very much I didn't thing to run the linearExplainer one predictedTarget at time.
It works great!
Regards