<?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: SAS Enterprise Miner: Produce Precision, Recall and F1 Score in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/SAS-Enterprise-Miner-Produce-Precision-Recall-and-F1-Score/m-p/838964#M10335</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I had a nice program for that , but lost it due to our document retention policy.&lt;/P&gt;
&lt;P&gt;I had forgotten to label it for "more than x-year preservation".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But in fact, it's easy.&lt;/P&gt;
&lt;P&gt;Suppose your (binary) target variable is named "BM".&lt;/P&gt;
&lt;P&gt;Then submit this code :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=my_dataset;
 tables F_BM * I_BM / missing list out=work.ConfusionMatrix;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;... and calculate all your wished for metrics from there using a datastep with retain statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But only the F1-score needs to be calculated , if I remember well.&lt;/P&gt;
&lt;P&gt;All other metrics are given by Enterprise Miner already.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Remember this :&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;In binary classification, recall is called sensitivity.&lt;BR /&gt;Recall is also known as&amp;nbsp;True Positive Rate (TPR), probability of detection, hit rate.&lt;/LI&gt;
&lt;LI&gt;Precision = Positive Predictive Value (PPV)&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See also :&amp;nbsp;&lt;A href="https://en.wikipedia.org/wiki/Precision_and_recall" target="_blank" rel="noopener"&gt;https://en.wikipedia.org/wiki/Precision_and_recall&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
    <pubDate>Mon, 17 Oct 2022 13:00:48 GMT</pubDate>
    <dc:creator>sbxkoenk</dc:creator>
    <dc:date>2022-10-17T13:00:48Z</dc:date>
    <item>
      <title>SAS Enterprise Miner: Produce Precision, Recall and F1 Score</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/SAS-Enterprise-Miner-Produce-Precision-Recall-and-F1-Score/m-p/838914#M10334</link>
      <description>&lt;P&gt;Hi, I have an enquiry on how to generate confusion matrix in SAS Enterprise Miner?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am interested in calculating Precision, Recall and F1 Score of my model but I can't find it anywhere on EM.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;- Filbert&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2022 08:44:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/SAS-Enterprise-Miner-Produce-Precision-Recall-and-F1-Score/m-p/838914#M10334</guid>
      <dc:creator>filbert2021</dc:creator>
      <dc:date>2022-10-17T08:44:41Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Enterprise Miner: Produce Precision, Recall and F1 Score</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/SAS-Enterprise-Miner-Produce-Precision-Recall-and-F1-Score/m-p/838964#M10335</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I had a nice program for that , but lost it due to our document retention policy.&lt;/P&gt;
&lt;P&gt;I had forgotten to label it for "more than x-year preservation".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But in fact, it's easy.&lt;/P&gt;
&lt;P&gt;Suppose your (binary) target variable is named "BM".&lt;/P&gt;
&lt;P&gt;Then submit this code :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=my_dataset;
 tables F_BM * I_BM / missing list out=work.ConfusionMatrix;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;... and calculate all your wished for metrics from there using a datastep with retain statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But only the F1-score needs to be calculated , if I remember well.&lt;/P&gt;
&lt;P&gt;All other metrics are given by Enterprise Miner already.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Remember this :&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;In binary classification, recall is called sensitivity.&lt;BR /&gt;Recall is also known as&amp;nbsp;True Positive Rate (TPR), probability of detection, hit rate.&lt;/LI&gt;
&lt;LI&gt;Precision = Positive Predictive Value (PPV)&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See also :&amp;nbsp;&lt;A href="https://en.wikipedia.org/wiki/Precision_and_recall" target="_blank" rel="noopener"&gt;https://en.wikipedia.org/wiki/Precision_and_recall&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2022 13:00:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/SAS-Enterprise-Miner-Produce-Precision-Recall-and-F1-Score/m-p/838964#M10335</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2022-10-17T13:00:48Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Enterprise Miner: Produce Precision, Recall and F1 Score</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/SAS-Enterprise-Miner-Produce-Precision-Recall-and-F1-Score/m-p/839111#M10336</link>
      <description>Hi Koen,&lt;BR /&gt;&lt;BR /&gt;Thank you for your prompt reply.&lt;BR /&gt;&lt;BR /&gt;For the existing metric given by Enterprise Miner like precision and recall. How do I access this information?&lt;BR /&gt;&lt;BR /&gt;I can't seem to find it at my model outputs.&lt;BR /&gt;&lt;BR /&gt;- Filbert</description>
      <pubDate>Tue, 18 Oct 2022 02:53:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/SAS-Enterprise-Miner-Produce-Precision-Recall-and-F1-Score/m-p/839111#M10336</guid>
      <dc:creator>filbert2021</dc:creator>
      <dc:date>2022-10-18T02:53:44Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Enterprise Miner: Produce Precision, Recall and F1 Score</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/SAS-Enterprise-Miner-Produce-Precision-Recall-and-F1-Score/m-p/839278#M10337</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In your diagram, add the Cutoff node from the Assess group.&lt;/P&gt;
&lt;P&gt;Run it and open the Results.&lt;BR /&gt;"View" pull-down menu --&amp;gt; Classification Rates&lt;/P&gt;
&lt;P&gt;"View" pull-down menu --&amp;gt; Precision Rates&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;
&lt;DIV id="ConnectiveDocSignExtentionInstalled" data-extension-version="1.0.4"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Tue, 18 Oct 2022 19:40:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/SAS-Enterprise-Miner-Produce-Precision-Recall-and-F1-Score/m-p/839278#M10337</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2022-10-18T19:40:33Z</dc:date>
    </item>
  </channel>
</rss>

