<?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: Weekend Challenge in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Weekend-Challenge/m-p/131538#M26799</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's not CHAID, but it is ID3/C4.5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc format;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; value specname&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1='SETOSA&amp;nbsp;&amp;nbsp;&amp;nbsp; '&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2='VERSICOLOR'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3='VIRGINICA ';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; value specchar&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1='S'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2='O'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3='V';&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data iris;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; title 'Fisher (1936) Iris Data';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; input sepallen sepalwid petallen petalwid species @@;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; format species specname.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; label sepallen='Sepal Length in mm.'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sepalwid='Sepal Width&amp;nbsp; in mm.'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; petallen='Petal Length in mm.'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; petalwid='Petal Width&amp;nbsp; in mm.';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;50 33 14 02 1 64 28 56 22 3 65 28 46 15 2 67 31 56 24 3&lt;/P&gt;&lt;P&gt;63 28 51 15 3 46 34 14 03 1 69 31 51 23 3 62 22 45 15 2&lt;/P&gt;&lt;P&gt;59 32 48 18 2 46 36 10 02 1 61 30 46 14 2 60 27 51 16 2&lt;/P&gt;&lt;P&gt;65 30 52 20 3 56 25 39 11 2 65 30 55 18 3 58 27 51 19 3&lt;/P&gt;&lt;P&gt;68 32 59 23 3 51 33 17 05 1 57 28 45 13 2 62 34 54 23 3&lt;/P&gt;&lt;P&gt;77 38 67 22 3 63 33 47 16 2 67 33 57 25 3 76 30 66 21 3&lt;/P&gt;&lt;P&gt;49 25 45 17 3 55 35 13 02 1 67 30 52 23 3 70 32 47 14 2&lt;/P&gt;&lt;P&gt;64 32 45 15 2 61 28 40 13 2 48 31 16 02 1 59 30 51 18 3&lt;/P&gt;&lt;P&gt;55 24 38 11 2 63 25 50 19 3 64 32 53 23 3 52 34 14 02 1&lt;/P&gt;&lt;P&gt;49 36 14 01 1 54 30 45 15 2 79 38 64 20 3 44 32 13 02 1&lt;/P&gt;&lt;P&gt;67 33 57 21 3 50 35 16 06 1 58 26 40 12 2 44 30 13 02 1&lt;/P&gt;&lt;P&gt;77 28 67 20 3 63 27 49 18 3 47 32 16 02 1 55 26 44 12 2&lt;/P&gt;&lt;P&gt;50 23 33 10 2 72 32 60 18 3 48 30 14 03 1 51 38 16 02 1&lt;/P&gt;&lt;P&gt;61 30 49 18 3 48 34 19 02 1 50 30 16 02 1 50 32 12 02 1&lt;/P&gt;&lt;P&gt;61 26 56 14 3 64 28 56 21 3 43 30 11 01 1 58 40 12 02 1&lt;/P&gt;&lt;P&gt;51 38 19 04 1 67 31 44 14 2 62 28 48 18 3 49 30 14 02 1&lt;/P&gt;&lt;P&gt;51 35 14 02 1 56 30 45 15 2 58 27 41 10 2 50 34 16 04 1&lt;/P&gt;&lt;P&gt;46 32 14 02 1 60 29 45 15 2 57 26 35 10 2 57 44 15 04 1&lt;/P&gt;&lt;P&gt;50 36 14 02 1 77 30 61 23 3 63 34 56 24 3 58 27 51 19 3&lt;/P&gt;&lt;P&gt;57 29 42 13 2 72 30 58 16 3 54 34 15 04 1 52 41 15 01 1&lt;/P&gt;&lt;P&gt;71 30 59 21 3 64 31 55 18 3 60 30 48 18 3 63 29 56 18 3&lt;/P&gt;&lt;P&gt;49 24 33 10 2 56 27 42 13 2 57 30 42 12 2 55 42 14 02 1&lt;/P&gt;&lt;P&gt;49 31 15 02 1 77 26 69 23 3 60 22 50 15 3 54 39 17 04 1&lt;/P&gt;&lt;P&gt;66 29 46 13 2 52 27 39 14 2 60 34 45 16 2 50 34 15 02 1&lt;/P&gt;&lt;P&gt;44 29 14 02 1 50 20 35 10 2 55 24 37 10 2 58 27 39 12 2&lt;/P&gt;&lt;P&gt;47 32 13 02 1 46 31 15 02 1 69 32 57 23 3 62 29 43 13 2&lt;/P&gt;&lt;P&gt;74 28 61 19 3 59 30 42 15 2 51 34 15 02 1 50 35 13 03 1&lt;/P&gt;&lt;P&gt;56 28 49 20 3 60 22 40 10 2 73 29 63 18 3 67 25 58 18 3&lt;/P&gt;&lt;P&gt;49 31 15 01 1 67 31 47 15 2 63 23 44 13 2 54 37 15 02 1&lt;/P&gt;&lt;P&gt;56 30 41 13 2 63 25 49 15 2 61 28 47 12 2 64 29 43 13 2&lt;/P&gt;&lt;P&gt;51 25 30 11 2 57 28 41 13 2 65 30 58 22 3 69 31 54 21 3&lt;/P&gt;&lt;P&gt;54 39 13 04 1 51 35 14 03 1 72 36 61 25 3 65 32 51 20 3&lt;/P&gt;&lt;P&gt;61 29 47 14 2 56 29 36 13 2 69 31 49 15 2 64 27 53 19 3&lt;/P&gt;&lt;P&gt;68 30 55 21 3 55 25 40 13 2 48 34 16 02 1 48 30 14 01 1&lt;/P&gt;&lt;P&gt;45 23 13 03 1 57 25 50 20 3 57 38 17 03 1 51 38 15 03 1&lt;/P&gt;&lt;P&gt;55 23 40 13 2 66 30 44 14 2 68 28 48 14 2 54 34 17 02 1&lt;/P&gt;&lt;P&gt;51 37 15 04 1 52 35 15 02 1 58 28 51 24 3 67 30 50 17 2&lt;/P&gt;&lt;P&gt;63 33 60 25 3 53 37 15 02 1&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc export data=iris outfile='/tmp/iris.csv' dbms=csv replace; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc groovy;&lt;/P&gt;&lt;P&gt;add classpath='/tmp/weka.jar'; *you need to get weka first...;&lt;/P&gt;&lt;P&gt;submit;&lt;/P&gt;&lt;P&gt;import weka.core.Instances&lt;/P&gt;&lt;P&gt;import weka.core.converters.CSVLoader&lt;/P&gt;&lt;P&gt;import weka.classifiers.trees.J48&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loader = new CSVLoader()&lt;/P&gt;&lt;P&gt;loader.setSource(new File('/tmp/iris.csv'))&lt;/P&gt;&lt;P&gt;data = loader.getDataSet()&lt;/P&gt;&lt;P&gt;data.setClassIndex(4)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;j48 = new J48()&lt;/P&gt;&lt;P&gt;j48.buildClassifier(data)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;println j48&lt;/P&gt;&lt;P&gt;endsubmit;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;J48 pruned tree&lt;/P&gt;&lt;P&gt;------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;petalwid &amp;lt;= 6: SETOSA (50.0)&lt;/P&gt;&lt;P&gt;petalwid &amp;gt; 6&lt;/P&gt;&lt;P&gt;|&amp;nbsp;&amp;nbsp; petalwid &amp;lt;= 17&lt;/P&gt;&lt;P&gt;|&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp; petallen &amp;lt;= 49: VERSICOLOR (48.0/1.0)&lt;/P&gt;&lt;P&gt;|&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp; petallen &amp;gt; 49&lt;/P&gt;&lt;P&gt;|&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp; petalwid &amp;lt;= 15: VIRGINICA (3.0)&lt;/P&gt;&lt;P&gt;|&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp; petalwid &amp;gt; 15: VERSICOLOR (3.0/1.0)&lt;/P&gt;&lt;P&gt;|&amp;nbsp;&amp;nbsp; petalwid &amp;gt; 17: VIRGINICA (46.0/1.0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Number of Leaves&amp;nbsp; : 5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Size of the tree : 9&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Jun 2014 18:36:10 GMT</pubDate>
    <dc:creator>FriedEgg</dc:creator>
    <dc:date>2014-06-04T18:36:10Z</dc:date>
    <item>
      <title>Weekend Challenge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Weekend-Challenge/m-p/131533#M26794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It has been a while since I've seen anyone post a weekend programming challenge.&amp;nbsp; And, since the World Series ended early, I thought some of you might like an interesting challenge.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; text-align: justify;"&gt;&lt;SPAN lang="EN-US" style="font-size: 9.0pt; font-family: 'Arial','sans-serif';"&gt;SAS used to distribute two macros that, together, can be used to conduct decision tree and CHAID (Chi-Square Automatic Interaction Detection) types of analyses.&amp;nbsp; The macros are still available on a number of sites (see, e.g., &lt;/SPAN&gt;&lt;A href="http://support.sas.com/kb/25/035.html"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif';"&gt;http://support.sas.com/kb/25/035.html&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN lang="EN-US" style="font-size: 9.0pt; font-family: 'Arial','sans-serif';"&gt; (for the xmacro) and&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 12.0pt; text-align: justify;"&gt;&lt;A href="http://www.psych.yorku.ca/friendly/lab/files/macros/treedisc.sas"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif';"&gt;http://www.psych.yorku.ca/friendly/lab/files/macros/treedisc.sas&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN lang="EN-US" style="font-size: 9.0pt; font-family: 'Arial','sans-serif';"&gt;&amp;nbsp; (for the treedisc macro)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 12.0pt; text-align: justify;"&gt;&lt;SPAN lang="EN-US" style="font-size: 9.0pt; font-family: 'Arial','sans-serif';"&gt;The treedisc macro requires SAS/IML to run and, if one desires to print the decision tree, it also requires SAS/OR. However, one can see the results without actually printing the tree, thus SAS/OR isn’t essential for the task.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 12.0pt; text-align: justify;"&gt;&lt;SPAN lang="EN-US" style="font-size: 9.0pt; font-family: 'Arial','sans-serif';"&gt;However, since most sites don't license IML, the challenge is to come up with base SAS (and possibly SAS/STAT) code that can adequately replace the call to IML in the treedisc macro.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 12.0pt; text-align: justify;"&gt;&lt;SPAN lang="EN-US" style="font-size: 9.0pt; font-family: 'Arial','sans-serif';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Nov 2013 20:26:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Weekend-Challenge/m-p/131533#M26794</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2013-11-01T20:26:07Z</dc:date>
    </item>
    <item>
      <title>Re: Weekend Challenge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Weekend-Challenge/m-p/131534#M26795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not having SAS at home means working on this challenge would mean I'd have to work on the weekend.&amp;nbsp; &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://communities.sas.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Nov 2013 16:29:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Weekend-Challenge/m-p/131534#M26795</guid>
      <dc:creator>jaredp</dc:creator>
      <dc:date>2013-11-04T16:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: Weekend Challenge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Weekend-Challenge/m-p/131535#M26796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since I didn't get any response as yet, the challenge has now become an anytime challenge.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Nov 2013 16:46:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Weekend-Challenge/m-p/131535#M26796</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2013-11-04T16:46:47Z</dc:date>
    </item>
    <item>
      <title>Re: Weekend Challenge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Weekend-Challenge/m-p/131536#M26797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Art&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;without the resources to launch the macros provided it is hard to imagine the objectives that the challenger must achieve.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you provide a before/after to explain~: inputs, processes and outputs ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 Nov 2013 18:03:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Weekend-Challenge/m-p/131536#M26797</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2013-11-10T18:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: Weekend Challenge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Weekend-Challenge/m-p/131537#M26798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A __default_attr="392339" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt;: as I think you already know, I am always interested in discovering ways that one can achieve various analyses without having to purchase expensive addons.&amp;nbsp; Running CHAID is one of those that I think should be accomplishable via base SAS, but I'm not familiar with IML, thus don't know what the substitutes would be.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I'd like to run is:&lt;/P&gt;&lt;P style="margin-left: .5in; margin-bottom: .0001pt; text-align: justify;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New';"&gt;%inc "c:\xmacro.sas";&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: .5in; margin-bottom: .0001pt; text-align: justify;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New';"&gt;%inc "c:\treedisc.sas";&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: .5in; margin-bottom: .0001pt; text-align: justify;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New';"&gt;%treedisc(data=banksize,depvar=possible_target_bank,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: .5in; margin-bottom: .0001pt; text-align: justify;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New';"&gt;&amp;nbsp; ordinal=total_customers,&amp;nbsp; outtree=trd, options=noformat)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: .5in; margin-bottom: .0001pt; text-align: justify;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: .5in; margin-bottom: .0001pt; text-align: justify;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New';"&gt;That wouldn't require OR, as I don't need to print the tree, but the macro does some of its work in IML.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: .5in; margin-bottom: .0001pt; text-align: justify;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New';"&gt;The challenge is to provide code that accomplishes the same thing, but only using base SAS.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: .5in; margin-bottom: .0001pt; text-align: justify;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New';"&gt;I don't know if one needs the data for this challenge but, if so, it is the data for which a link is provided in a paper I did for MWSUG, namely &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: .5in; margin-bottom: .0001pt; text-align: justify;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;A href="http://www.sascommunity.org/wiki/Expert_Panel_Solution_MWSUG_2013-Tabachneck" title="http://www.sascommunity.org/wiki/Expert_Panel_Solution_MWSUG_2013-Tabachneck"&gt;Expert Panel Solution MWSUG 2013-Tabachneck - sasCommunity&lt;/A&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 Nov 2013 19:04:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Weekend-Challenge/m-p/131537#M26798</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2013-11-10T19:04:13Z</dc:date>
    </item>
    <item>
      <title>Re: Weekend Challenge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Weekend-Challenge/m-p/131538#M26799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's not CHAID, but it is ID3/C4.5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc format;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; value specname&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1='SETOSA&amp;nbsp;&amp;nbsp;&amp;nbsp; '&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2='VERSICOLOR'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3='VIRGINICA ';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; value specchar&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1='S'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2='O'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3='V';&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data iris;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; title 'Fisher (1936) Iris Data';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; input sepallen sepalwid petallen petalwid species @@;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; format species specname.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; label sepallen='Sepal Length in mm.'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sepalwid='Sepal Width&amp;nbsp; in mm.'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; petallen='Petal Length in mm.'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; petalwid='Petal Width&amp;nbsp; in mm.';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;50 33 14 02 1 64 28 56 22 3 65 28 46 15 2 67 31 56 24 3&lt;/P&gt;&lt;P&gt;63 28 51 15 3 46 34 14 03 1 69 31 51 23 3 62 22 45 15 2&lt;/P&gt;&lt;P&gt;59 32 48 18 2 46 36 10 02 1 61 30 46 14 2 60 27 51 16 2&lt;/P&gt;&lt;P&gt;65 30 52 20 3 56 25 39 11 2 65 30 55 18 3 58 27 51 19 3&lt;/P&gt;&lt;P&gt;68 32 59 23 3 51 33 17 05 1 57 28 45 13 2 62 34 54 23 3&lt;/P&gt;&lt;P&gt;77 38 67 22 3 63 33 47 16 2 67 33 57 25 3 76 30 66 21 3&lt;/P&gt;&lt;P&gt;49 25 45 17 3 55 35 13 02 1 67 30 52 23 3 70 32 47 14 2&lt;/P&gt;&lt;P&gt;64 32 45 15 2 61 28 40 13 2 48 31 16 02 1 59 30 51 18 3&lt;/P&gt;&lt;P&gt;55 24 38 11 2 63 25 50 19 3 64 32 53 23 3 52 34 14 02 1&lt;/P&gt;&lt;P&gt;49 36 14 01 1 54 30 45 15 2 79 38 64 20 3 44 32 13 02 1&lt;/P&gt;&lt;P&gt;67 33 57 21 3 50 35 16 06 1 58 26 40 12 2 44 30 13 02 1&lt;/P&gt;&lt;P&gt;77 28 67 20 3 63 27 49 18 3 47 32 16 02 1 55 26 44 12 2&lt;/P&gt;&lt;P&gt;50 23 33 10 2 72 32 60 18 3 48 30 14 03 1 51 38 16 02 1&lt;/P&gt;&lt;P&gt;61 30 49 18 3 48 34 19 02 1 50 30 16 02 1 50 32 12 02 1&lt;/P&gt;&lt;P&gt;61 26 56 14 3 64 28 56 21 3 43 30 11 01 1 58 40 12 02 1&lt;/P&gt;&lt;P&gt;51 38 19 04 1 67 31 44 14 2 62 28 48 18 3 49 30 14 02 1&lt;/P&gt;&lt;P&gt;51 35 14 02 1 56 30 45 15 2 58 27 41 10 2 50 34 16 04 1&lt;/P&gt;&lt;P&gt;46 32 14 02 1 60 29 45 15 2 57 26 35 10 2 57 44 15 04 1&lt;/P&gt;&lt;P&gt;50 36 14 02 1 77 30 61 23 3 63 34 56 24 3 58 27 51 19 3&lt;/P&gt;&lt;P&gt;57 29 42 13 2 72 30 58 16 3 54 34 15 04 1 52 41 15 01 1&lt;/P&gt;&lt;P&gt;71 30 59 21 3 64 31 55 18 3 60 30 48 18 3 63 29 56 18 3&lt;/P&gt;&lt;P&gt;49 24 33 10 2 56 27 42 13 2 57 30 42 12 2 55 42 14 02 1&lt;/P&gt;&lt;P&gt;49 31 15 02 1 77 26 69 23 3 60 22 50 15 3 54 39 17 04 1&lt;/P&gt;&lt;P&gt;66 29 46 13 2 52 27 39 14 2 60 34 45 16 2 50 34 15 02 1&lt;/P&gt;&lt;P&gt;44 29 14 02 1 50 20 35 10 2 55 24 37 10 2 58 27 39 12 2&lt;/P&gt;&lt;P&gt;47 32 13 02 1 46 31 15 02 1 69 32 57 23 3 62 29 43 13 2&lt;/P&gt;&lt;P&gt;74 28 61 19 3 59 30 42 15 2 51 34 15 02 1 50 35 13 03 1&lt;/P&gt;&lt;P&gt;56 28 49 20 3 60 22 40 10 2 73 29 63 18 3 67 25 58 18 3&lt;/P&gt;&lt;P&gt;49 31 15 01 1 67 31 47 15 2 63 23 44 13 2 54 37 15 02 1&lt;/P&gt;&lt;P&gt;56 30 41 13 2 63 25 49 15 2 61 28 47 12 2 64 29 43 13 2&lt;/P&gt;&lt;P&gt;51 25 30 11 2 57 28 41 13 2 65 30 58 22 3 69 31 54 21 3&lt;/P&gt;&lt;P&gt;54 39 13 04 1 51 35 14 03 1 72 36 61 25 3 65 32 51 20 3&lt;/P&gt;&lt;P&gt;61 29 47 14 2 56 29 36 13 2 69 31 49 15 2 64 27 53 19 3&lt;/P&gt;&lt;P&gt;68 30 55 21 3 55 25 40 13 2 48 34 16 02 1 48 30 14 01 1&lt;/P&gt;&lt;P&gt;45 23 13 03 1 57 25 50 20 3 57 38 17 03 1 51 38 15 03 1&lt;/P&gt;&lt;P&gt;55 23 40 13 2 66 30 44 14 2 68 28 48 14 2 54 34 17 02 1&lt;/P&gt;&lt;P&gt;51 37 15 04 1 52 35 15 02 1 58 28 51 24 3 67 30 50 17 2&lt;/P&gt;&lt;P&gt;63 33 60 25 3 53 37 15 02 1&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc export data=iris outfile='/tmp/iris.csv' dbms=csv replace; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc groovy;&lt;/P&gt;&lt;P&gt;add classpath='/tmp/weka.jar'; *you need to get weka first...;&lt;/P&gt;&lt;P&gt;submit;&lt;/P&gt;&lt;P&gt;import weka.core.Instances&lt;/P&gt;&lt;P&gt;import weka.core.converters.CSVLoader&lt;/P&gt;&lt;P&gt;import weka.classifiers.trees.J48&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loader = new CSVLoader()&lt;/P&gt;&lt;P&gt;loader.setSource(new File('/tmp/iris.csv'))&lt;/P&gt;&lt;P&gt;data = loader.getDataSet()&lt;/P&gt;&lt;P&gt;data.setClassIndex(4)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;j48 = new J48()&lt;/P&gt;&lt;P&gt;j48.buildClassifier(data)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;println j48&lt;/P&gt;&lt;P&gt;endsubmit;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;J48 pruned tree&lt;/P&gt;&lt;P&gt;------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;petalwid &amp;lt;= 6: SETOSA (50.0)&lt;/P&gt;&lt;P&gt;petalwid &amp;gt; 6&lt;/P&gt;&lt;P&gt;|&amp;nbsp;&amp;nbsp; petalwid &amp;lt;= 17&lt;/P&gt;&lt;P&gt;|&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp; petallen &amp;lt;= 49: VERSICOLOR (48.0/1.0)&lt;/P&gt;&lt;P&gt;|&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp; petallen &amp;gt; 49&lt;/P&gt;&lt;P&gt;|&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp; petalwid &amp;lt;= 15: VIRGINICA (3.0)&lt;/P&gt;&lt;P&gt;|&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp; petalwid &amp;gt; 15: VERSICOLOR (3.0/1.0)&lt;/P&gt;&lt;P&gt;|&amp;nbsp;&amp;nbsp; petalwid &amp;gt; 17: VIRGINICA (46.0/1.0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Number of Leaves&amp;nbsp; : 5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Size of the tree : 9&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jun 2014 18:36:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Weekend-Challenge/m-p/131538#M26799</guid>
      <dc:creator>FriedEgg</dc:creator>
      <dc:date>2014-06-04T18:36:10Z</dc:date>
    </item>
    <item>
      <title>Re: Weekend Challenge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Weekend-Challenge/m-p/131539#M26800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A __default_attr="733023" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt;: Much appreciated!&amp;nbsp; I was starting to think that no one was going to accept the challenge.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't test your code at the moment, but definitely will and compare the result with that which I obtained trom the treedisc macro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I'm satisfied with the result, a no one else has provided a better alternative, I'll change your helping rating to a correct answer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jun 2014 18:51:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Weekend-Challenge/m-p/131539#M26800</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2014-06-04T18:51:15Z</dc:date>
    </item>
    <item>
      <title>Re: Weekend Challenge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Weekend-Challenge/m-p/131540#M26801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have had you post in the back of my mind since you originally posted.&amp;nbsp; Figured it was about time I post something...&amp;nbsp; That being said, I consider my answer a clear cheat on the intention of the challenge.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jun 2014 19:14:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Weekend-Challenge/m-p/131540#M26801</guid>
      <dc:creator>FriedEgg</dc:creator>
      <dc:date>2014-06-04T19:14:58Z</dc:date>
    </item>
    <item>
      <title>Re: Weekend Challenge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Weekend-Challenge/m-p/131541#M26802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is excellent! FYI... the Fisher iris data is a sample data set in sashelp.iris.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jun 2014 11:48:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Weekend-Challenge/m-p/131541#M26802</guid>
      <dc:creator>FloydNevseta</dc:creator>
      <dc:date>2014-06-10T11:48:17Z</dc:date>
    </item>
  </channel>
</rss>

