<?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: Create Decision Tree Graphs in a SAS Code Node Using %em_report in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/Create-Decision-Tree-Graphs-in-a-SAS-Code-Node-Using-em-report/m-p/420617#M6447</link>
    <description>&lt;P&gt;Thanks Wendy,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All the columns in the table are the same, as you called them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately I get an error, that the parameter is not &lt;SPAN&gt;ABOVETEXT, BELOWTEXT&amp;nbsp;is not correct. (see below)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MLOGIC(EM_REPORT): Parameter PARENT has value PARENT&lt;BR /&gt;MLOGIC(EM_REPORT): Parameter NODETEXT has value NODETEXT&lt;BR /&gt;MLOGIC(EM_REPORT): Parameter TIPTEXT has value TEXTALL&lt;BR /&gt;ERROR: The keyword parameter ABOVETEXT was not defined with the macro.&lt;BR /&gt;ERROR: The keyword parameter BELOWTEXT was not defined with the macro.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If i remove these parameters from the macro call, than i get an empty graph.&lt;/P&gt;&lt;P&gt;Maybe it is a problem but I am using "SAS Enterprise Miner 12.1".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also tried to draw the graph, after a simple decision node tree, using its simple tree_plot output. It did not help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way to figure out the macro call in the decision tree itself? I have checked the logs, but i couldn't find anything usefull.&lt;/P&gt;&lt;P&gt;Or is there any documentation about this topic.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Laszlo&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 12 Dec 2017 21:55:42 GMT</pubDate>
    <dc:creator>lmagyar</dc:creator>
    <dc:date>2017-12-12T21:55:42Z</dc:date>
    <item>
      <title>Create Decision Tree Graphs in a SAS Code Node Using %em_report</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Create-Decision-Tree-Graphs-in-a-SAS-Code-Node-Using-em-report/m-p/420566#M6437</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am triing to draw a decision tree graph with Enterprise Miner SAS code node. The same way as Decision Tree node does (see below).&amp;nbsp;&amp;nbsp;The decision tree is created inside a loop. I guess the data for this graph is stored in the tree_plot table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunatly i haven't found any example how to draw it.&lt;/P&gt;&lt;P&gt;I tried something like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%em_register(key=tree, type=data);
data &amp;amp;em_user_tree;
	set &amp;amp;EM_LIB..tree_tree_plot_loop(where=(_loop_=1));	
run;
%EM_Report(key=tree, viewtype=decisiontree, block=Table, description=%nrbquote(Trees), autodisplay=Y);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Propably it is not even em_report.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help,&lt;/P&gt;&lt;P&gt;Laszlo&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://support.sas.com/documentation/cdl/en/emgsj/67981/HTML/default/images/interactivetree.png" border="0" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2017 20:25:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Create-Decision-Tree-Graphs-in-a-SAS-Code-Node-Using-em-report/m-p/420566#M6437</guid>
      <dc:creator>lmagyar</dc:creator>
      <dc:date>2017-12-12T20:25:11Z</dc:date>
    </item>
    <item>
      <title>Re: Create Decision Tree Graphs in a SAS Code Node Using %em_report</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Create-Decision-Tree-Graphs-in-a-SAS-Code-Node-Using-em-report/m-p/420576#M6438</link>
      <description>&lt;P&gt;I could give you the %em_report call, but unfortunately I don't think it will help since a "_loop" version of the Tree_plot data set isn't created when doing group processing.&amp;nbsp; This is true for many of the results tables.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2017 20:38:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Create-Decision-Tree-Graphs-in-a-SAS-Code-Node-Using-em-report/m-p/420576#M6438</guid>
      <dc:creator>WendyCzika</dc:creator>
      <dc:date>2017-12-12T20:38:43Z</dc:date>
    </item>
    <item>
      <title>Re: Create Decision Tree Graphs in a SAS Code Node Using %em_report</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Create-Decision-Tree-Graphs-in-a-SAS-Code-Node-Using-em-report/m-p/420590#M6439</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN class="login-bold"&gt;Wendy, Thanks for your answer.&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;An EM_Reprort call, or example, that creates a decision tree graph like that will be appreciated.&lt;/P&gt;&lt;P&gt;Just give me any example, i will then create the table myself, in the requested format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2017 21:14:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Create-Decision-Tree-Graphs-in-a-SAS-Code-Node-Using-em-report/m-p/420590#M6439</guid>
      <dc:creator>lmagyar</dc:creator>
      <dc:date>2017-12-12T21:14:26Z</dc:date>
    </item>
    <item>
      <title>Re: Create Decision Tree Graphs in a SAS Code Node Using %em_report</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Create-Decision-Tree-Graphs-in-a-SAS-Code-Node-Using-em-report/m-p/420593#M6440</link>
      <description>&lt;P&gt;But, actually&amp;nbsp;&lt;SPAN&gt;Tree_plot_loop is created.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2017 21:15:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Create-Decision-Tree-Graphs-in-a-SAS-Code-Node-Using-em-report/m-p/420593#M6440</guid>
      <dc:creator>lmagyar</dc:creator>
      <dc:date>2017-12-12T21:15:44Z</dc:date>
    </item>
    <item>
      <title>Re: Create Decision Tree Graphs in a SAS Code Node Using %em_report</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Create-Decision-Tree-Graphs-in-a-SAS-Code-Node-Using-em-report/m-p/420594#M6441</link>
      <description>&lt;P&gt;Oh okay!&amp;nbsp; Sure, this is an example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/* display tree diagram */&lt;BR /&gt; %em_report(key=TREE_PLOT, viewtype=DTree, id=NODE, parent=PARENT, nodetext=NODETEXT, tipText=TEXTALL, abovetext=ABOVETEXT, belowText=BELOWTEXT,&lt;BR /&gt; nodesize=N, nodecolor=NODECOLOR, linkwidth=LINKWIDTH, block=MODEL, description=TREE, autodisplay=Y);&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2017 21:16:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Create-Decision-Tree-Graphs-in-a-SAS-Code-Node-Using-em-report/m-p/420594#M6441</guid>
      <dc:creator>WendyCzika</dc:creator>
      <dc:date>2017-12-12T21:16:11Z</dc:date>
    </item>
    <item>
      <title>Re: Create Decision Tree Graphs in a SAS Code Node Using %em_report</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Create-Decision-Tree-Graphs-in-a-SAS-Code-Node-Using-em-report/m-p/420596#M6442</link>
      <description>&lt;P&gt;Weird!&amp;nbsp; It wasn't showing up for me.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2017 21:17:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Create-Decision-Tree-Graphs-in-a-SAS-Code-Node-Using-em-report/m-p/420596#M6442</guid>
      <dc:creator>WendyCzika</dc:creator>
      <dc:date>2017-12-12T21:17:16Z</dc:date>
    </item>
    <item>
      <title>Re: Create Decision Tree Graphs in a SAS Code Node Using %em_report</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Create-Decision-Tree-Graphs-in-a-SAS-Code-Node-Using-em-report/m-p/420617#M6447</link>
      <description>&lt;P&gt;Thanks Wendy,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All the columns in the table are the same, as you called them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately I get an error, that the parameter is not &lt;SPAN&gt;ABOVETEXT, BELOWTEXT&amp;nbsp;is not correct. (see below)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MLOGIC(EM_REPORT): Parameter PARENT has value PARENT&lt;BR /&gt;MLOGIC(EM_REPORT): Parameter NODETEXT has value NODETEXT&lt;BR /&gt;MLOGIC(EM_REPORT): Parameter TIPTEXT has value TEXTALL&lt;BR /&gt;ERROR: The keyword parameter ABOVETEXT was not defined with the macro.&lt;BR /&gt;ERROR: The keyword parameter BELOWTEXT was not defined with the macro.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If i remove these parameters from the macro call, than i get an empty graph.&lt;/P&gt;&lt;P&gt;Maybe it is a problem but I am using "SAS Enterprise Miner 12.1".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also tried to draw the graph, after a simple decision node tree, using its simple tree_plot output. It did not help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way to figure out the macro call in the decision tree itself? I have checked the logs, but i couldn't find anything usefull.&lt;/P&gt;&lt;P&gt;Or is there any documentation about this topic.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Laszlo&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2017 21:55:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Create-Decision-Tree-Graphs-in-a-SAS-Code-Node-Using-em-report/m-p/420617#M6447</guid>
      <dc:creator>lmagyar</dc:creator>
      <dc:date>2017-12-12T21:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: Create Decision Tree Graphs in a SAS Code Node Using %em_report</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Create-Decision-Tree-Graphs-in-a-SAS-Code-Node-Using-em-report/m-p/420622#M6448</link>
      <description>&lt;P&gt;I also tried to create a dataset that simply shows a single node. It did not helped, empty graph.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%em_register(key=tree_plot, type=data);
data &amp;amp;em_user_tree_plot;
NODE=1; parent=.; NODETEXT="nodetext"; TEXTALL="textall"; N=100; 
NODECOLOR=100; LINKWIDTH=10; ABOVETEXT="a"; BELOWTEXT="b"; 
output;
run;
%em_report(key=TREE_PLOT, viewtype=DTree, id=NODE, parent=PARENT, nodetext=NODETEXT, tipText=TEXTALL,
nodesize=N, nodecolor=NODECOLOR, linkwidth=LINKWIDTH, block=MODEL, description=TREE, autodisplay=Y
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2017 22:18:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Create-Decision-Tree-Graphs-in-a-SAS-Code-Node-Using-em-report/m-p/420622#M6448</guid>
      <dc:creator>lmagyar</dc:creator>
      <dc:date>2017-12-12T22:18:23Z</dc:date>
    </item>
    <item>
      <title>Re: Create Decision Tree Graphs in a SAS Code Node Using %em_report</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Create-Decision-Tree-Graphs-in-a-SAS-Code-Node-Using-em-report/m-p/420800#M6449</link>
      <description>&lt;P&gt;I don't have a 12.1 version of EM to try on, but it (the code below) worked for me in the latest version.&amp;nbsp; If you just run a Decision Tree node (not inside of group processing), then try this, does this work in a SAS Code node for you?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%em_register(key=tree, type=data);&lt;BR /&gt;data &amp;amp;em_user_tree;&lt;BR /&gt; set &amp;amp;EM_LIB..tree_tree_plot;&amp;nbsp; /* might have to adjust index to be tree2_tree_plot e.g., for the corresponding Decision Tree node */&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;/* display tree diagram */&lt;BR /&gt;%em_report(key=TREE, viewtype=DTree, id=NODE, parent=PARENT, nodetext=NODETEXT, tipText=TEXTALL, abovetext=ABOVETEXT, belowText=BELOWTEXT,&lt;BR /&gt;nodesize=N, nodecolor=NODECOLOR, linkwidth=LINKWIDTH, block=MODEL, description=TREE, autodisplay=Y);&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2017 14:26:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Create-Decision-Tree-Graphs-in-a-SAS-Code-Node-Using-em-report/m-p/420800#M6449</guid>
      <dc:creator>WendyCzika</dc:creator>
      <dc:date>2017-12-13T14:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: Create Decision Tree Graphs in a SAS Code Node Using %em_report</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Create-Decision-Tree-Graphs-in-a-SAS-Code-Node-Using-em-report/m-p/420817#M6450</link>
      <description>&lt;P&gt;Thanks for your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunatly it didn't draw anything it gives an error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MLOGIC(EM_REPORT): Parameter NODETEXT has value NODETEXT&lt;BR /&gt;MLOGIC(EM_REPORT): Parameter TIPTEXT has value TEXTALL&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;ERROR&lt;/FONT&gt;: The keyword parameter ABOVETEXT was not defined with the macro.&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;ERROR&lt;/FONT&gt;: The keyword parameter BELOWTEXT was not defined with the macro.&lt;BR /&gt;MLOGIC(EM_REPORT): Parameter NODESIZE has value N&lt;BR /&gt;MLOGIC(EM_REPORT): Parameter NODECOLOR has value NODECOLOR&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I try to remove these 2 parameters from the macro call, then it creates an empty window.&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://image.ibb.co/m9Ohpm/image.png" border="0" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://image.ibb.co/cDEDUm/image.png" border="0" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I guess that the %EM_report call has some other parameters. I am trying to find the exact macro call in the decision tree code/ or the EM_report macro definition. But i can not find it in any of the catalogs, ect.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have any other ideas?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Laszlo&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2017 15:07:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Create-Decision-Tree-Graphs-in-a-SAS-Code-Node-Using-em-report/m-p/420817#M6450</guid>
      <dc:creator>lmagyar</dc:creator>
      <dc:date>2017-12-13T15:07:38Z</dc:date>
    </item>
  </channel>
</rss>

