BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
geniusgenie
Obsidian | Level 7

Hi,

I am performing analysis of SVM, Decision Trees, Neural Network and Random Forest in EM and getting True Positve Rate, False Positive Rate etc for each of these 4 algos, I have a binary target variable called category with 1 for allergic and 0 for non allergic.

 

I know roughly that if i get TPR then it means allergic and FPR means false alarm of non allergic treated as allergic. (Dont know whether I am right or wrong)

 

could anyone tell me how can i declare allergic =1 as my positive class so that I can say for sure that this definitly means allergic.

And where should I declare this?

 

Regards

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
WendyCzika
SAS Employee

In the Enterprise Miner Reference Help, Model Comparison node chapter, the section Comparing Models with Binary Targets gives a nice chart showing what exactly these rates represent (shown below, but not formatted well).  It mentions that typically the value 1 is treated as the target event, and 0 as the non-event.  This is controlled by the Order that is set for the target variable in the Input Data node or a Metadata node. For a binary target, the order by default is Descending, which means the first value when sorting the target levels in descending order is used as the event (hence 1 if values are 0 and 1).  Hope that helps...

 

 

Classification Measures

Binary targets are targets whose states can be classified as event and non-event. Typically, event is associated with a value of 1 for the target variable, and non-event is associated with a value of 0 for the target variable. The following table describes the predictive relationships between event and non-event.


 

 Predicted Non-Event

 Predicted Event

 Total Actual Probability

 Non-Event

 A (true negative)

 B (false positive)

 (A + B) / (A + B + C + D )

Event

C (false negative)

 D (true positive)

(C + D) / (A + B + C + D )

 Total Predicted

A + C

 B + D

 A + B + C + D



The following classification measures are derived from the relationships in the table:

  • Classification (Accuracy) Rate: 100 * (A + D) / (A + B + C + D)
  • Misclassification Rate: 100 * (1 - ((A + D) / (A + B + C + D)))
  • Sensitivity (True Positive Rate): 100 * D / (C + D)
  • Specificity (True Negative Rate): 100 * A / (A + B)
  • 1 – Specificity (False Positive Rate): 100 * B / (A + B)

View solution in original post

2 REPLIES 2
WendyCzika
SAS Employee

In the Enterprise Miner Reference Help, Model Comparison node chapter, the section Comparing Models with Binary Targets gives a nice chart showing what exactly these rates represent (shown below, but not formatted well).  It mentions that typically the value 1 is treated as the target event, and 0 as the non-event.  This is controlled by the Order that is set for the target variable in the Input Data node or a Metadata node. For a binary target, the order by default is Descending, which means the first value when sorting the target levels in descending order is used as the event (hence 1 if values are 0 and 1).  Hope that helps...

 

 

Classification Measures

Binary targets are targets whose states can be classified as event and non-event. Typically, event is associated with a value of 1 for the target variable, and non-event is associated with a value of 0 for the target variable. The following table describes the predictive relationships between event and non-event.


 

 Predicted Non-Event

 Predicted Event

 Total Actual Probability

 Non-Event

 A (true negative)

 B (false positive)

 (A + B) / (A + B + C + D )

Event

C (false negative)

 D (true positive)

(C + D) / (A + B + C + D )

 Total Predicted

A + C

 B + D

 A + B + C + D



The following classification measures are derived from the relationships in the table:

  • Classification (Accuracy) Rate: 100 * (A + D) / (A + B + C + D)
  • Misclassification Rate: 100 * (1 - ((A + D) / (A + B + C + D)))
  • Sensitivity (True Positive Rate): 100 * D / (C + D)
  • Specificity (True Negative Rate): 100 * A / (A + B)
  • 1 – Specificity (False Positive Rate): 100 * B / (A + B)
geniusgenie
Obsidian | Level 7

Hi,

Thanks for your reply which is very helpful.

 

Cleared my concept further.

 

Regards

 

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to choose a machine learning algorithm

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.

Discussion stats
  • 2 replies
  • 982 views
  • 0 likes
  • 2 in conversation