1 / 6

Example

Example. Calculation of Information Gain. # positive samples = 7 # negetive samples = 3 I( 7/10,3/10 ) = [ 7/10(log 2 10/7) + 3/10(log 2 10/7) ] = 0.88 Reminder ( Alternate ) = [0.7 * I(6/7,1/7)] + [0.3* I(0/3,3/3)] = 0.41

belva
Download Presentation

Example

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Example

  2. CalculationofInformationGain • # positive samples = 7 • # negetive samples = 3 • I( 7/10,3/10 ) = [ 7/10(log2 10/7) + 3/10(log2 10/7) ] = 0.88 Reminder ( Alternate ) = [0.7 * I(6/7,1/7)] + [0.3* I(0/3,3/3)] = 0.41 Reminder ( Type ) = [0.2 * I(0/2,2/2)]+ [0.1 * I(1/1,0/1)]+ [0.7 * I(5/7,2/7)] = 0.60 Reminder( Patrons ) = [0.2 * I(2/2,0/2)]+ [0.2 * I(0/2,2/2)]+ [0.6 * I(4/6,2/6)] = 0.55 IG( Alternate ) = 0.88 - 0.41 = 0.47 IG( Type ) = 0.88 – 0.60 = 0.28 IG( Patrons ) = 0.88 – 0.55 = 0.33

  3. CalculationofInformationGain • # positive samples = 7 • # negetive samples = 3 • I( 7/10,3/10 ) = [ 7/10(log2 10/7) + 3/10(log2 10/7) ] = 0.88 Reminder ( Alternate ) = [0.7 * I(6/7,1/7)] + [0.3* I(0/3,3/3)] = 0.41 Reminder ( Type ) = [0.2 * I(0/2,2/2)]+ [0.1 * I(1/1,0/1)]+ [0.7 * I(5/7,2/7)] = 0.60 Reminder( Patrons ) = [0.2 * I(2/2,0/2)]+ [0.2 * I(0/2,2/2)]+ [0.6 * I(4/6,2/6)] = 0.55 IG( Alternate ) = 0.88 - 0.41 = 0.47 IG( Type ) = 0.88 – 0.60 = 0.28 IG( Patrons ) = 0.88 – 0.55 = 0.33 1

  4. CalculationofInformationGain • # positive samples = 7 • # negetive samples = 3 • I( 7/10,3/10 ) = [ 7/10(log2 10/7) + 3/10(log2 10/7) ] = 0.88 Reminder ( Alternate ) = [0.7 * I(6/7,1/7)] + [0.3* I(0/3,3/3)] = 0.41 Reminder ( Type ) = [0.2 * I(0/2,2/2)]+ [0.1 * I(1/1,0/1)]+ [0.7 * I(5/7,2/7)] = 0.60 Reminder( Patrons ) = [0.2 * I(2/2,0/2)]+ [0.2 * I(0/2,2/2)]+ [0.6 * I(4/6,2/6)] = 0.55 IG( Alternate ) = 0.88 - 0.41 = 0.47 IG( Type ) = 0.88 – 0.60 = 0.28 IG( Patrons ) = 0.88 – 0.55 = 0.33 1 2

  5. CalculationofInformationGain • # positive samples = 7 • # negetive samples = 3 • I( 7/10,3/10 ) = [ 7/10(log2 10/7) + 3/10(log2 10/7) ] = 0.88 Reminder ( Alternate ) = [0.7 * I(6/7,1/7)] + [0.3* I(0/3,3/3)] = 0.41 Reminder ( Type ) = [0.2 * I(0/2,2/2)]+ [0.1 * I(1/1,0/1)]+ [0.7 * I(5/7,2/7)] = 0.60 Reminder( Patrons ) = [0.2 * I(2/2,0/2)]+ [0.2 * I(0/2,2/2)]+ [0.6 * I(4/6,2/6)] = 0.55 IG( Alternate ) = 0.88 - 0.41 = 0.47 IG( Type ) = 0.88 – 0.60 = 0.28 IG( Patrons ) = 0.88 – 0.55 = 0.33 1 3 2

  6. Trees Alternate ? Patrons? Tree Using IG Greedy Algorithm Optimal Algorithm No None Yes Full Some False Patrons? True False Type ? None Burger Thai Full Some False False True Type ? Alternate ? Burger Thai No Yes True False False True A.P.L = (1+1+2+3+3)/5 = 2 A.P.L = (1+2+2+3+3)/5 = 2.2 French

More Related