{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

hmk2solstud1 - Joseph Scarabino HW 2 pt 1 Problem 1 1 2...

Info icon This preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
Joseph Scarabino 10/13/11 HW 2 : pt 1 Problem 1 1)
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
2)
Image of page 2
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Evaluate Predictive Accuracy: Tree 1: 3 well classified / 6 total = 50% Tree 2: 2 well classified / 6 total = 33% Problem 2 Tree 1: Obj Age Income Student Credit Buys_comp 1 >40 High No Fair Yes 2 <=30 Low Yes Excellent Yes 3 31-40 Low No Excellent No 4 <=30 High No Fair Yes 5 >40 Medium No Excellent No 6 <=30 Medium Yes Fair Yes Tree 2: Obj Age Income Student Credit Buys_comp 1 >40 Low Yes Fair Yes 2 31-40 High No Fair Yes 3 <=30 High No Excellent No 4 31-40 Medium No Excellent Yes 5 >40 Low Yes Excellent Yes <=30 Medium Yes Fair No Problem 3 Predictive Accuracy from notes: 4 well classified / 6 total = 67%
Image of page 4
Joseph Scarabino 10/13/11 106310863 HW 2 : pt 2 Problem 1
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
I will calculate Information Gain on the two nodes chosen after the initial Student node (age & credit). I(p,n) = -p/(p+n) * log 2 ( p/(p+n) ) - n/(p+n) * log 2 ( n/(p+n) ) E = (p i + n i )/(p + n) * I(p i ,n i ) Gain(A) = I(p,n) E(A) Age: I(3,4) = -3/(3+4) * log 2 (3/(3+4)) - 4/(3+4) * log 2 (4/(3+4)) = -3/7 * log 2 (3/7) - 4/7 * log 2 (4/7) = -0.4286 * -1.2223 - 0.5714 * -.8074 = .9852 I(0,3) = -0/(0+3) * log 2 (0/(0+3)) - 3/(0+3) * log 2 (3/(0+3)) = 0 - log 2 (1) = 0 I(2,0) = -2/(2+0) * log 2 (2/(2+0)) -
Image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern