<?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: SAM EM: confusion matrix on test/validation data? in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/SAM-EM-confusion-matrix-on-test-validation-data/m-p/778933#M8959</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/393358"&gt;@ycenycute&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The Logistic Regression node does not show the confusion matrix for the test data set.&amp;nbsp;&amp;nbsp;You will need to write your own SAS code in order to get this confusion matrix.&amp;nbsp;&amp;nbsp;If you add a SAS Code node after the Logistic Regression node, you can write the following code to get the confusion matrix:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;*** I am using the target variable named target.&amp;nbsp;&amp;nbsp;If your target variable is named 'bad', then use f_bad and i_bad.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=&amp;amp;_test;
tables f_target*i_target; /* f_ = from ; i_ = into */
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;The code is the same for any modeling node.&amp;nbsp;&amp;nbsp;It can be Neural Networks, Tree, Regression, etc.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Good luck,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Koen&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 06 Nov 2021 13:07:22 GMT</pubDate>
    <dc:creator>sbxkoenk</dc:creator>
    <dc:date>2021-11-06T13:07:22Z</dc:date>
    <item>
      <title>SAM EM: confusion matrix on test/validation data?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/SAM-EM-confusion-matrix-on-test-validation-data/m-p/778898#M8956</link>
      <description>&lt;P&gt;I have a dataset where the Y variable is a binary variable. I have partitioned the data into training and testing, and connect a logistic regression node to the partition node. I am wondering the is confusion matrix in the results only for the training data only? Cuz I see the role = TRAIN (see below). If so, is there a way to get the confusion matrix for testing data to do the evaluation?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 476px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/65452i2401536C30FBB83F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 06 Nov 2021 03:18:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/SAM-EM-confusion-matrix-on-test-validation-data/m-p/778898#M8956</guid>
      <dc:creator>ycenycute</dc:creator>
      <dc:date>2021-11-06T03:18:31Z</dc:date>
    </item>
    <item>
      <title>Re: SAM EM: confusion matrix on test/validation data?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/SAM-EM-confusion-matrix-on-test-validation-data/m-p/778933#M8959</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/393358"&gt;@ycenycute&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The Logistic Regression node does not show the confusion matrix for the test data set.&amp;nbsp;&amp;nbsp;You will need to write your own SAS code in order to get this confusion matrix.&amp;nbsp;&amp;nbsp;If you add a SAS Code node after the Logistic Regression node, you can write the following code to get the confusion matrix:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;*** I am using the target variable named target.&amp;nbsp;&amp;nbsp;If your target variable is named 'bad', then use f_bad and i_bad.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=&amp;amp;_test;
tables f_target*i_target; /* f_ = from ; i_ = into */
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;The code is the same for any modeling node.&amp;nbsp;&amp;nbsp;It can be Neural Networks, Tree, Regression, etc.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Good luck,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Koen&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 06 Nov 2021 13:07:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/SAM-EM-confusion-matrix-on-test-validation-data/m-p/778933#M8959</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2021-11-06T13:07:22Z</dc:date>
    </item>
    <item>
      <title>Re: SAM EM: confusion matrix on test/validation data?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/SAM-EM-confusion-matrix-on-test-validation-data/m-p/779276#M8961</link>
      <description>I followed your code, I created a SAS code and connected to the regression node. I opened code editor in the property panel and wrote the following code in Training code. &lt;BR /&gt;&lt;BR /&gt;proc freq data=&amp;amp;_test;&lt;BR /&gt;tables f_Status*i_Status; /* f_ = from ; i_ = into */&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;But it threw run time error. The system error returned was 3000. &lt;BR /&gt;</description>
      <pubDate>Tue, 09 Nov 2021 07:48:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/SAM-EM-confusion-matrix-on-test-validation-data/m-p/779276#M8961</guid>
      <dc:creator>ycenycute</dc:creator>
      <dc:date>2021-11-09T07:48:09Z</dc:date>
    </item>
    <item>
      <title>Re: SAM EM: confusion matrix on test/validation data?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/SAM-EM-confusion-matrix-on-test-validation-data/m-p/779277#M8962</link>
      <description>Looks like the error is related to this "tables f_Status*i_Status; /* f_ = from ; i_ = into */". symbol not recognized.</description>
      <pubDate>Tue, 09 Nov 2021 07:55:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/SAM-EM-confusion-matrix-on-test-validation-data/m-p/779277#M8962</guid>
      <dc:creator>ycenycute</dc:creator>
      <dc:date>2021-11-09T07:55:44Z</dc:date>
    </item>
  </channel>
</rss>

