{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

hmk2solstud1

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

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

Joseph Scarabino 10/13/11 HW 2 : pt 1 Problem 1 1)

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

View Full Document
2)

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

View Full Document
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%
Joseph Scarabino 10/13/11 106310863 HW 2 : pt 2 Problem 1

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

View Full Document
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)) -
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• 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.

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

• 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.

Dana University of Pennsylvania ‘17, Course Hero Intern

• 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.

Jill Tulane University ‘16, Course Hero Intern