<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Explain autoencoder prediction with SHAP in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/Explain-autoencoder-prediction-with-SHAP/m-p/590747#M7991</link>
    <description>&lt;P&gt;I've successfully created an autoencoder model using the annTrain action.&lt;/P&gt;
&lt;P&gt;Now I want to add explanation to a single prediction using SHAP method (as in &lt;A href="https://arxiv.org/pdf/1903.02407.pdf" target="_blank"&gt;https://arxiv.org/pdf/1903.02407.pdf&lt;/A&gt;).&lt;/P&gt;
&lt;P&gt;I see that the linearExplainer action supports the SHAP method (&lt;A href="https://documentation.sas.com/?docsetId=casactml&amp;amp;docsetTarget=casactml_linearexplainer_syntax.htm&amp;amp;docsetVersion=8.4&amp;amp;locale=en" target="_blank"&gt;https://documentation.sas.com/?docsetId=casactml&amp;amp;docsetTarget=casactml_linearexplainer_syntax.htm&amp;amp;docsetVersion=8.4&amp;amp;locale=en&lt;/A&gt;) but it requires a target variable.&lt;/P&gt;
&lt;P&gt;Since the autoencoder model does not have a target variable (i.e. the input variable&lt;U&gt;s&lt;/U&gt; are the targets), what can I do?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
    <pubDate>Sun, 22 Sep 2019 16:13:12 GMT</pubDate>
    <dc:creator>Edoedoedo</dc:creator>
    <dc:date>2019-09-22T16:13:12Z</dc:date>
    <item>
      <title>Explain autoencoder prediction with SHAP</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Explain-autoencoder-prediction-with-SHAP/m-p/590747#M7991</link>
      <description>&lt;P&gt;I've successfully created an autoencoder model using the annTrain action.&lt;/P&gt;
&lt;P&gt;Now I want to add explanation to a single prediction using SHAP method (as in &lt;A href="https://arxiv.org/pdf/1903.02407.pdf" target="_blank"&gt;https://arxiv.org/pdf/1903.02407.pdf&lt;/A&gt;).&lt;/P&gt;
&lt;P&gt;I see that the linearExplainer action supports the SHAP method (&lt;A href="https://documentation.sas.com/?docsetId=casactml&amp;amp;docsetTarget=casactml_linearexplainer_syntax.htm&amp;amp;docsetVersion=8.4&amp;amp;locale=en" target="_blank"&gt;https://documentation.sas.com/?docsetId=casactml&amp;amp;docsetTarget=casactml_linearexplainer_syntax.htm&amp;amp;docsetVersion=8.4&amp;amp;locale=en&lt;/A&gt;) but it requires a target variable.&lt;/P&gt;
&lt;P&gt;Since the autoencoder model does not have a target variable (i.e. the input variable&lt;U&gt;s&lt;/U&gt; are the targets), what can I do?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Sun, 22 Sep 2019 16:13:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Explain-autoencoder-prediction-with-SHAP/m-p/590747#M7991</guid>
      <dc:creator>Edoedoedo</dc:creator>
      <dc:date>2019-09-22T16:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: Explain autoencoder prediction with SHAP</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Explain-autoencoder-prediction-with-SHAP/m-p/591019#M7994</link>
      <description>&lt;P&gt;EduxEdux,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hopefully this is clear, let me know if I can help further!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-Ralph&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2019 18:20:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Explain-autoencoder-prediction-with-SHAP/m-p/591019#M7994</guid>
      <dc:creator>RalphAbbey</dc:creator>
      <dc:date>2019-09-23T18:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: Explain autoencoder prediction with SHAP</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Explain-autoencoder-prediction-with-SHAP/m-p/591120#M7997</link>
      <description>&lt;P&gt;You're right, thank you very much I didn't thing to run the&amp;nbsp;&lt;SPAN&gt;linearExplainer&amp;nbsp;one predictedTarget at time.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;It works great!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Sep 2019 10:04:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Explain-autoencoder-prediction-with-SHAP/m-p/591120#M7997</guid>
      <dc:creator>Edoedoedo</dc:creator>
      <dc:date>2019-09-24T10:04:03Z</dc:date>
    </item>
  </channel>
</rss>

