InseadDataAnalytics / INSEADAnalytics

Other
122 stars 1.31k forks source link

Clarification on dimensions of confusion matrix (binary y variable) #136

Open carlocelis opened 6 years ago

carlocelis commented 6 years ago

Something that may be useful for the final project...

In the example used in the slide below, does the dependent variable equal 1 if the customer is retained or not? I think this is important because the relevant metric, either sensitivity or specificity, can be interchanged depending on how the dependent variable is defined.

image

Also, does R's output always follow the following format?

image

Antoine-Engerand commented 6 years ago

Yes both points are correct, to my understanding. R recognizes 1s & 0s and so you may not really care about in which format R outputs confusion matrices.

carlocelis commented 6 years ago

Thanks! I think the format is important because if I decide to swap the definition of the y variable (e.g. in the Credit card case, assign 0 to mean customer defaults next month instead of 1), then I will be more concerned about sensitivity instead of specificity