0
$\begingroup$

.. Hi, guys.

I have a problem at the uni with homework solutions that were presented to us. I tried solving the problem, but the solutions we got back from the teacher were in a way the exact opposite of what I had... I must have a severe misunderstanding of the subject and I was hoping to receive some clarification from you guys.

The training set in the textbook looks like this:

enter image description here

I then need to create a decision tree, using classification error rate as the criteria. The answer we got back from the teacher is this:

enter image description here

I got the same numbers as in the tables, but I want to calculate the error rate differently and that's where the problem lies... As I see it, error rate is adding together the false positives and the false negatives and then dividing by the total count (including true positives and true negatives). In the case of Y, for example, I would like to add 60 and 60, instead of 40 and 40. What I suspect is that I'm not comprehending the format of the tables, what the classes C1 and C2 are supposed to represent... Can we view them as 0 and 1, respectively? That's what I've been doing and it's probably what's causing the confusion.

Sorry for the lengthy post and sorry for posting images of text. I know that's a bitch for you guys who may be using screen readers.

Thanks in advance for any help you can give!

$\endgroup$
0
$\begingroup$

Your confusion rises from you seeing those tables as confusion matrixes.

These tables indicate "This number of C1 instances (objects) have attribute X = 0", "This number of C2 instances have attribute X as 0" ect ect

Now, you want to create a split based on those attributes. Your objective when splitting is minimizing the error rate. Since your attribute is binary (0 or 1), and you have two classes, you can either :

  • Strategy 1 : Choose that that attribute being 0 means that the object is of class C1 (and therefore 1 => C2)
  • Strategy 2 : Choose that that attribute being 1 means that the object is of class C1 (and therefore 0 => C2).

Since you do the choosing to minimize the error rate, you can evaluate the error rate you'd get by applying the first or the second strategy, and choose the one that works best.

This, in the table, means making the sum of (for strategy 1) the top-right bottom-left diagonal and dividing by the total count, or (for strategy 2) the sum of the top-left bottom-right diagonal and dividing by the total count. The best strategy for that attribute is the one that minimizes that error, and therefore the first split is done by choosing the attribute for which the best strategy is the overall best.

$\endgroup$

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