<?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 Re: How can I get lime plot for a specific observation in sas viya 3.5? in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/How-can-I-get-lime-plot-for-a-specific-observation-in-sas-viya-3/m-p/867724#M10470</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/68234"&gt;@Ullsokk&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;How do I get a LIME explanation for a specific observation is sas viya 3.5? I want to be able to explain why a specific customer has a high probability value on a model.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I moved this topic to "Data Science board".&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;A LIME explanation for one specific observation ??&lt;BR /&gt;To explain your high probability value you need to estimate&amp;nbsp;Shapley values!&lt;/P&gt;
&lt;P&gt;Run the&lt;SPAN&gt;&amp;nbsp;shapleyExplainer action in PROC CAS (&lt;EM&gt;HyperSHAP&lt;/EM&gt;&amp;nbsp;and &lt;EM&gt;KernelSHAP&lt;/EM&gt; methods are available).&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;In this blog they explain how to do :&amp;nbsp;&lt;STRONG&gt;Parallel&lt;/STRONG&gt; Shapley value estimation&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/subconsciousmusings/2021/07/06/tips-for-parallel-processing-in-casl/" target="_blank"&gt;https://blogs.sas.com/content/subconsciousmusings/2021/07/06/tips-for-parallel-processing-in-casl/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;(it might be worthwhile to do it in parallel because it takes a lot of resources&lt;/P&gt;
&lt;P&gt;, so if you do not have a lot of resources --&amp;gt; then it takes time)&lt;BR /&gt;&lt;BR /&gt;Good luck,&lt;BR /&gt;koen&lt;/P&gt;</description>
    <pubDate>Mon, 03 Apr 2023 10:06:30 GMT</pubDate>
    <dc:creator>sbxkoenk</dc:creator>
    <dc:date>2023-04-03T10:06:30Z</dc:date>
    <item>
      <title>How can I get lime plot for a specific observation in sas viya 3.5?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-can-I-get-lime-plot-for-a-specific-observation-in-sas-viya-3/m-p/867721#M10469</link>
      <description>&lt;P&gt;How do I get a LIME explanation for a specific observation is sas viya 3.5? I want to be able to explain why a specific customer has a high probability value on a model.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2023 08:59:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-can-I-get-lime-plot-for-a-specific-observation-in-sas-viya-3/m-p/867721#M10469</guid>
      <dc:creator>Ullsokk</dc:creator>
      <dc:date>2023-04-03T08:59:01Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get lime plot for a specific observation in sas viya 3.5?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-can-I-get-lime-plot-for-a-specific-observation-in-sas-viya-3/m-p/867724#M10470</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/68234"&gt;@Ullsokk&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;How do I get a LIME explanation for a specific observation is sas viya 3.5? I want to be able to explain why a specific customer has a high probability value on a model.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I moved this topic to "Data Science board".&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;A LIME explanation for one specific observation ??&lt;BR /&gt;To explain your high probability value you need to estimate&amp;nbsp;Shapley values!&lt;/P&gt;
&lt;P&gt;Run the&lt;SPAN&gt;&amp;nbsp;shapleyExplainer action in PROC CAS (&lt;EM&gt;HyperSHAP&lt;/EM&gt;&amp;nbsp;and &lt;EM&gt;KernelSHAP&lt;/EM&gt; methods are available).&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;In this blog they explain how to do :&amp;nbsp;&lt;STRONG&gt;Parallel&lt;/STRONG&gt; Shapley value estimation&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/subconsciousmusings/2021/07/06/tips-for-parallel-processing-in-casl/" target="_blank"&gt;https://blogs.sas.com/content/subconsciousmusings/2021/07/06/tips-for-parallel-processing-in-casl/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;(it might be worthwhile to do it in parallel because it takes a lot of resources&lt;/P&gt;
&lt;P&gt;, so if you do not have a lot of resources --&amp;gt; then it takes time)&lt;BR /&gt;&lt;BR /&gt;Good luck,&lt;BR /&gt;koen&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2023 10:06:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-can-I-get-lime-plot-for-a-specific-observation-in-sas-viya-3/m-p/867724#M10470</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2023-04-03T10:06:30Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get lime plot for a specific observation in sas viya 3.5?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-can-I-get-lime-plot-for-a-specific-observation-in-sas-viya-3/m-p/867725#M10471</link>
      <description>&lt;P&gt;On top of previous response ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Subject:&lt;/STRONG&gt; interpreting complex (machine learning) models&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;partial dependency plots&lt;/LI&gt;
&lt;LI&gt;variable importance plots / Variable Importance Rankings&lt;/LI&gt;
&lt;LI&gt;LIME (Local Interpretable Model Agnostic Explanations)&lt;/LI&gt;
&lt;LI&gt;ICE (Individual Conditional Expectation)&lt;/LI&gt;
&lt;LI&gt;SHAPLEY values&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Some resources (#5):&lt;/P&gt;
&lt;UL class="lia-list-style-type-disc"&gt;
&lt;LI&gt;LIME and ICE in SAS Viya 3.4: Interpreting Machine Learning Models (article)&lt;BR /&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/LIME-and-ICE-in-SAS-Viya-3-4-Interpreting-Machine-Learning/ta-p/510915" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/LIME-and-ICE-in-SAS-Viya-3-4-Interpreting-Machine-Learning/ta-p/510915&lt;/A&gt;&lt;BR /&gt;See also REFERENCES and ADDITIONAL RESOURCES in the bottom of article!&lt;/LI&gt;
&lt;LI&gt;Paper SAS1950-2018 &lt;BR /&gt;Interpreting Black-Box Machine Learning Models Using Partial Dependence and Individual Conditional Expectation Plots &lt;BR /&gt;Ray Wright, SAS Institute Inc.&lt;BR /&gt;&lt;A href="https://www.sas.com/content/dam/SAS/support/en/sas-global-forum-proceedings/2018/1950-2018.pdf" target="_blank"&gt;https://www.sas.com/content/dam/SAS/support/en/sas-global-forum-proceedings/2018/1950-2018.pdf&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;SAS Tutorial | Interpreting Machine Learning Models in SAS (video van 41m10s)&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="https://www.youtube.com/watch?v=6LcyVSLwVck" target="_blank"&gt;https://www.youtube.com/watch?v=6LcyVSLwVck&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Communicating Analytical Results and Interpreting Machine Learning Models with SAS Viya (video van 44m11s)&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="https://www.youtube.com/watch?v=Ql5oB-CDFGU" target="_blank"&gt;https://www.youtube.com/watch?v=Ql5oB-CDFGU&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;Model Interpretability Plots - SAS Help Center&lt;BR /&gt;&lt;A href="https://go.documentation.sas.com/?docsetId=vdmmladvug&amp;amp;docsetTarget=n0dqb7uyhlqogvn16xnengpro0fc.htm&amp;amp;docsetVersion=8.4&amp;amp;locale=en"&gt;https://go.documentation.sas.com/?docsetId=vdmmladvug&amp;amp;docsetTarget=n0dqb7uyhlqogvn16xnengpro0fc.htm&amp;amp;docsetVersion=8.4&amp;amp;locale=en&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Enjoy!&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2023 10:12:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-can-I-get-lime-plot-for-a-specific-observation-in-sas-viya-3/m-p/867725#M10471</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2023-04-03T10:12:45Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get lime plot for a specific observation in sas viya 3.5?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-can-I-get-lime-plot-for-a-specific-observation-in-sas-viya-3/m-p/868482#M10472</link>
      <description>&lt;P&gt;As Koen has explained in an earlier reply, Shapley values may be more appropriate for your use case because Shapley values give you the importance of each input variable for a prediction. LIME values tells you "how much would I expect the prediction to change if I change one/some of the inputs near this observation" which is not exactly the same as feature importance, but could be useful for different scenarios.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To calculate Shapley values or LIME values, you can use the explainModel action set. Here are some links for code examples -- all links are for Viya3.5:&lt;/P&gt;
&lt;P data-unlink="true"&gt;(1) &lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/casactml/casactml_explainmodel_examples36.htm" target="_self"&gt;Example for calculating Shapley values using ShapleyExplainer&lt;/A&gt; (HyperSHAP, preferred method for Shapley value estimation)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(2) &lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/casactml/casactml_explainmodel_examples01.htm" target="_self"&gt;Example for calculating LIME values&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;(3) &lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/casactml/casactml_explainmodel_examples06.htm" target="_self"&gt;Example for calculating Shapley values using linearExplainer&lt;/A&gt; (KernelSHAP, can be less accurate than HyperSHAP, but in case you need an alternative method):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Apr 2023 18:52:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-can-I-get-lime-plot-for-a-specific-observation-in-sas-viya-3/m-p/868482#M10472</guid>
      <dc:creator>xinhunt</dc:creator>
      <dc:date>2023-04-06T18:52:31Z</dc:date>
    </item>
  </channel>
</rss>

