CSCI_5080_Assignment_06_1

docx

School

Austin Peay State University *

*We aren’t endorsed by this school

Course

5080

Subject

Computer Science

Date

Jan 9, 2024

Type

docx

Pages

15

Uploaded by JusticeGalaxyHorse20

Report
CSCI_5080_Assignment_06 Part 1: Examp le Heigh t Hair Eyes Class X1 Short Dark Blue + X2 Short Blonde Blue - X3 Tall Grey Brow n - X4 Tall Dark Blue + X5 Short Dark Brow n - X6 Tall Blonde Blue + p = ‘+’ = 3, and n = ‘-’ = 3 Calculating Information gain of class (decision) Information Gain of class (decision): I [ P ( p ,n ) ] = p p + n log 2 ( p p + n ) n p + n log 2 ( n p + n ) I ( 3,3 ) = 3 6 log 2 ( 3 6 ) 3 6 log 2 ( 3 6 ) = 1 1). Calculate entropy of each attribute to decide which attribute should be split first. Entropy of Height Height p n I (p, n) Short 1 2 1 3 log 2 ( 1 3 ) 2 3 log 2 ( 2 3 ) = 0.918 Tall 2 1 2 3 log 2 ( 2 3 ) 1 3 log 2 ( 1 3 ) = 0.918 E ( Height ) = 3 6 ( 0.918 ) + 3 6 ( 0.918 ) = 0.918 1 CSCI_5080_Assignment_06
Gain ( Height ) = Info gainof class E ( Height ) = 1 0.918 = 0.082 Entropy of Hair Hair p n I (p, n) Dark 2 1 2 3 log 2 ( 2 3 ) 1 3 log 2 ( 1 3 ) = 0.918 Blond 1 1 1 2 log 2 ( 1 2 ) 1 2 log 2 ( 1 2 ) = 1 Gray 0 1 0 1 log 2 ( 0 1 ) 1 1 log 2 ( 1 1 ) = 0 E ( Hair ) = 3 6 ( 0.918 ) + 2 6 ( 1 ) + 1 6 ( 0 ) = 0.792 Gain ( Hair ) = 1 0.792 = 0.208 Entropy of Eyes: Eyes p n I (p, n) Blue 3 1 3 4 log 2 ( 3 4 ) 1 4 log 2 ( 1 4 ) = 0.811 Brown 0 2 0 2 log 2 ( 0 2 ) 2 2 log 2 ( 2 2 ) = 0 E ( Eyes ) = 4 6 ( 0.811 ) + 2 6 ( 0 ) = 0.5406 Gain ( Eyes ) = 1 0.5406 = 0.4594 Gain (Height) =0.083 Gain (Hair) =0.208 Gain (Eyes) =0.4595 The “Eyes” attribute has the highest gain hence it will be split Eyes first. Time spent: 2 hours. 2 CSCI_5080_Assignment_06
2). If the eyes are blue Height Hair Class Short Dark + Short Blonde - Tall Dark + Tall Blonde + Entropy (hair) Hair p n I(p, n) Dark 2 0 0 Blonde 1 1 1 E(Hair) = 2 4 ( 0 ) + 2 4 ( 1 ) = 0.5 Gain (Eyes blue , Hair) = 0.811 – 0.5 = 0.311 Entropy (Height) Height p n I (p, n) Short 1 1 1 Tall 2 0 0 E(Hair) = 2 4 ( 0 ) + 2 4 ( 1 ) = 0.5 Gain (Eyes blue, Hair) = 0.811 – 0.5 = 0.311 Gain (Hair) & Gain (Height) are the same, hence it will not be impossible to predict when the eyes are blue. If Eyes are brown Entropy (hair) Hair p n I (p, n) 3 CSCI_5080_Assignment_06 Eyes Blue Brown
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Gray 0 1 0 Dark 0 1 0 Entropy (Height) Height p n I (p, n) Tall 0 1 0 Short 0 1 0 ? Only “-” is there for “Brown.” Both have the same gain; we are unable to determine whether it is height or hair. Time spent: 45mins. 4 CSCI_5080_Assignment_06 Eyes Blue * Brown No Complete decision tree: Hair - heigh t eye s gra y blon d dark tal l shor t brow n blu e - - + - +
3) Exampl e Height Hair Eyes Class X7 Short Gray Brow n - X8 Tall Dark Brow n - Regardless of hair and height, and based on our decision tree / if eyes are brown then class is “- “ Time spent: 25minutes. Lesson 1 Lesson 2 5 CSCI_5080_Assignment_06
2). Lesson 4: Tree Tab for the TM_Decision Tree 6 CSCI_5080_Assignment_06
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Dependency Network 7 CSCI_5080_Assignment_06
Attribute Characteristics for the Naïve Bayes Model Attribute Discrimination for the Naïve Bayes Model 8 CSCI_5080_Assignment_06
Attribute Discrimination for the Naïve Bayes Model Cluster Diagram Tab 9 CSCI_5080_Assignment_06
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Cluster Profiles Tab 10 CSCI_5080_Assignment_06
Cluster Characteristics Tab Cluster Discrimination Tab (Alphabetically Sorted Variables) 11 CSCI_5080_Assignment_06
Dependency Network Tab 12 CSCI_5080_Assignment_06
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Attribute Profiles 13 CSCI_5080_Assignment_06
Lesson 5: Lift Chart Lesson 6: Completed Lesson 6 14 CSCI_5080_Assignment_06
Time spent: 6 hours. 15 CSCI_5080_Assignment_06
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help