Hi, I have an enquiry on how to generate confusion matrix in SAS Enterprise Miner?
I am interested in calculating Precision, Recall and F1 Score of my model but I can't find it anywhere on EM.
Thank you.
- Filbert
Hello,
I had a nice program for that , but lost it due to our document retention policy.
I had forgotten to label it for "more than x-year preservation".
But in fact, it's easy.
Suppose your (binary) target variable is named "BM".
Then submit this code :
proc freq data=my_dataset;
tables F_BM * I_BM / missing list out=work.ConfusionMatrix;
run;
... and calculate all your wished for metrics from there using a datastep with retain statement.
But only the F1-score needs to be calculated , if I remember well.
All other metrics are given by Enterprise Miner already.
Remember this :
See also : https://en.wikipedia.org/wiki/Precision_and_recall
Cheers,
Koen
Hello,
In your diagram, add the Cutoff node from the Assess group.
Run it and open the Results.
"View" pull-down menu --> Classification Rates
"View" pull-down menu --> Precision Rates
Koen
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.
Find more tutorials on the SAS Users YouTube channel.