<?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: VDDML - Python Open Source Node and Plots in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/VDDML-Python-Open-Source-Node-and-Plots/m-p/747853#M8727</link>
    <description>&lt;P&gt;Hi Andreas,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the plot to show up in the node results, you need to: (1) save it in jpg, png or gif format, (2) name it with rpt_ prefix, for example rpt_treeplot.png or rpt_treeplot.jpg and (3) save it in dm_nodedir folder (dm_nodedir is a variable available in the node editor pointing to a temporary working folder)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is some sample Python code that does this:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;# Plot model residuals&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;plt.scatter(pred, pred - dm_inputdf[dm_dec_target])&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;plt.axhline(y=0, color='r')&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;plt.title('Residual plot')&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;plt.ylabel('Residual')&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;plt.savefig(dm_nodedir + '/rpt_residuals.png')&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;plt.close()&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;Radhikha&lt;/P&gt;</description>
    <pubDate>Mon, 14 Jun 2021 15:59:53 GMT</pubDate>
    <dc:creator>RadhikhaMyneni</dc:creator>
    <dc:date>2021-06-14T15:59:53Z</dc:date>
    <item>
      <title>VDDML - Python Open Source Node and Plots</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/VDDML-Python-Open-Source-Node-and-Plots/m-p/747464#M8723</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have creeated a pipeline in Model Studio (DM and ML) with a Python Open Surce node where i have built a decision tree model. The node works fine and in the Reuslts window i can extract various things e.g. the variable improtance of the tree. What i am also trying to do is to output a plot of the tree. I use the following python script:&lt;/P&gt;
&lt;PRE&gt;tree.plot_tree(dm_model,filled=True,rounded=True,class_names=["Reject","Grant"],feature_names=X_enc.columns, fontsize=6)
plt.show()
&lt;/PRE&gt;
&lt;P&gt;The node works fine (green sign after the pipeline is ran) but there is not plot in the results. Do i need to add something more in the python script to have the desired result (decsiion tree viusual-plot).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Andreas&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jun 2021 18:43:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/VDDML-Python-Open-Source-Node-and-Plots/m-p/747464#M8723</guid>
      <dc:creator>andreas_zaras</dc:creator>
      <dc:date>2021-06-11T18:43:38Z</dc:date>
    </item>
    <item>
      <title>Re: VDDML - Python Open Source Node and Plots</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/VDDML-Python-Open-Source-Node-and-Plots/m-p/747853#M8727</link>
      <description>&lt;P&gt;Hi Andreas,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the plot to show up in the node results, you need to: (1) save it in jpg, png or gif format, (2) name it with rpt_ prefix, for example rpt_treeplot.png or rpt_treeplot.jpg and (3) save it in dm_nodedir folder (dm_nodedir is a variable available in the node editor pointing to a temporary working folder)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is some sample Python code that does this:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;# Plot model residuals&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;plt.scatter(pred, pred - dm_inputdf[dm_dec_target])&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;plt.axhline(y=0, color='r')&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;plt.title('Residual plot')&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;plt.ylabel('Residual')&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;plt.savefig(dm_nodedir + '/rpt_residuals.png')&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;plt.close()&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;Radhikha&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 15:59:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/VDDML-Python-Open-Source-Node-and-Plots/m-p/747853#M8727</guid>
      <dc:creator>RadhikhaMyneni</dc:creator>
      <dc:date>2021-06-14T15:59:53Z</dc:date>
    </item>
    <item>
      <title>Re: VDDML - Python Open Source Node and Plots</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/VDDML-Python-Open-Source-Node-and-Plots/m-p/748075#M8731</link>
      <description>Thanks Radhikha!</description>
      <pubDate>Tue, 15 Jun 2021 09:46:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/VDDML-Python-Open-Source-Node-and-Plots/m-p/748075#M8731</guid>
      <dc:creator>andreas_zaras</dc:creator>
      <dc:date>2021-06-15T09:46:08Z</dc:date>
    </item>
  </channel>
</rss>

