Monday, May 12, 2014

Binary classification performance

It is a frequent task to decide if specific object belongs to one of two classes. This task is called binary classification.

For example if we want to implement face detection (FD) algorithm we will first split image into number of fragments. After that we perform binary classification for each of them. Such classification will decide to which class (face / non-face) each fragment belongs to.

It seems to be a trivial task for humans, but for computer it's not so easy. So, if we want to achieve good results - it is very important to measure performance of our classification algorithm.

Let's agree that our binary classifier gives positive result if it believes that given fragment is a face and negative, if given fragment is not a face.

From the performance point of view, every classification attempt can produce one of four outcomes:
  • true positive - fragment is a face and classification result is positive
  • false positive  (or Type I error) - fragment is not a face but classification result is positive. 
  • true negative - fragment is not a face and classification result is negative
  • false negative (or Type II error) - fragment is a face and classification result is negative
Visually it can be represented as a confusion matrix:




Let's define TP, FP, TN and FN as a total number of true positive, false positive, true negative and false negative classification outcomes, correspondingly.

Having this 4 variables we can define following equations:

True positive rate (Recall):
    TPR = TP / (TP + FN)

True negative rate (Specificity):
    TNR = TN / (TN / FP)

Concept behind them is very simple - TPR tells how well our classification algorithm can pick real human faces and TNR says how resistant is our algorithm to fragments which are not faces.

In the next blog entry I will write about ROC curve, and how it can be used to tune binary classification algorithm performance.

3 comments:

  1. The FanDuel Ohio pre launch offer entitles you to a $100 no deposit bonus to wager in your favorite sports activities when Ohio sports activities betting goes stay. This is the most effective casino bonus in many of} players’ opinion and one of the popular promotions in the international iGaming industry. 1xbet korea It’s the pinnacle for beginner gamers, as there’s actually zero threat attached to any of the bonuses applied to your account. Currently, at thirteen with loads of potential for more, Pennsylvania gamers can select the operator — and welcome offer — that appeals to them. And if it would not final for lengthy term|the lengthy run}, they are free verify out|to take a look at} different choice|another choice}.

    ReplyDelete
  2. So, essential to|it could be very important|you will need to} do proper evaluation and planning of the slot growth. Thus, you can to|you presumably can} maintain a examine on the prices and remove wasteful 카지노 spending. Registration and Profile Management – Allow slot gamers to create and manage their profiles in the slot game.

    ReplyDelete
  3. Guests can relish in the intricate architecture and design features whereas having fun with the indoor pool, health middle and on-site French 소울카지노 restaurant. Only a buyer who booked via Booking.com and stayed at a specific property can write a evaluate. This lets us know our evaluations come from actual guests like you. The opinions expressed in contributions are those of Booking.com prospects and properties, and never of Booking.com. Booking.com does not settle for duty or legal responsibility for any evaluations or responses.

    ReplyDelete