Building models with SAS Enterprise Miner, SAS Factory Miner, SAS Visual Data Mining and Machine Learning or just with programming

Where to find confusion Matrix of test data

Accepted Solution Solved
Reply
New User
Posts: 1
Accepted Solution

Where to find confusion Matrix of test data

I'm trying to find the confusion matrix of test data, but I can only see it for validation data. I can see the misclassification rate for the test data, so I know the confusion matrix must be somewhere.

Any help very much appreciated.

Accepted Solutions
Solution
‎07-07-2017 03:10 PM
SAS Employee
Posts: 18

Re: Where to find confusion Matrix of test data

 The modeling nodes do not show the confusion matrix for the test data set.  You will need to write your own SAS code in order to get this confusion matrix.  If you add a SAS Code node after the modeling node, you can write the following code to get the confusion matrix:

***In this example, I am using the SAS Enterprise Miner macro variable of &em_import_test that will use the test data set.  I am using the target variable named target.  If my target variable is bad, then I use f_bad and I_bad;

proc freq data=&em_import_test;
tables f_target*I_target;
run;

 

 

View solution in original post


All Replies
Solution
‎07-07-2017 03:10 PM
SAS Employee
Posts: 18

Re: Where to find confusion Matrix of test data

 The modeling nodes do not show the confusion matrix for the test data set.  You will need to write your own SAS code in order to get this confusion matrix.  If you add a SAS Code node after the modeling node, you can write the following code to get the confusion matrix:

***In this example, I am using the SAS Enterprise Miner macro variable of &em_import_test that will use the test data set.  I am using the target variable named target.  If my target variable is bad, then I use f_bad and I_bad;

proc freq data=&em_import_test;
tables f_target*I_target;
run;

 

 

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 801 views
  • 0 likes
  • 2 in conversation