Let's consider a binary supervised classification problem. Be "A" and "B" the two classes. Sometimes it is said that it if an individual belongs to one of the two classes, we have a "positive event" while if he belongs to the other class we have a "negative event". I know that what is a "positive event" and what is a "negative event" depends on the specific problem but I don't understand how to recognize them. Can you help me? Thank you.

  • 1
    $\begingroup$ What do you mean by recognizing them? positive and negative are just two names you give to the classes. You can name them plus and minus or zero and one. $\endgroup$ – seteropere Aug 22 '15 at 17:34

As you've said it depends on the problem's definition. So, if you read a paper it has to be stated somewhere what the positive class is. Maybe read up on how a confusion matrix is build and try out the R-function confusionMatrix that comes with the caret package. Said function lets you define what the positive class is and you can see how the evaluation measures change.


lvs <- c("normal", "abnormal")
truth <- factor(rep(lvs, times = c(86, 258)),
                levels = rev(lvs))
pred <- factor(
    rep(lvs, times = c(54, 32)),
    rep(lvs, times = c(27, 231))),               
  levels = rev(lvs))

xtab <- table(pred, truth)

confusionMatrix(xtab, positive = "abnormal")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.