HW-4,5 - Problem L5-1: Use the C4.5 software to produce a...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
Problem L5-1: Use the C4.5 software to produce a tree and rule set for Quinlan’s golf data. Solution: Copy all the executables of C4.5 and the data files to a directory. Go to the Command Prompt in Windows or UNIX and enter the working directory. Use the following commands: c4.5 –f golf c4.5rules –f golf Contents of golf.data: sunny, 85, 85, false, Don't Play sunny, 80, 90, true, Don't Play overcast, 83, 78, false, Play rain, 70, 96, false, Play rain, 68, 80, false, Play rain, 65, 70, true, Don't Play overcast, 64, 65, true, Play sunny, 72, 95, false, Don't Play sunny, 69, 70, false, Play rain, 75, 80, false, Play sunny, 75, 70, true, Play overcast, 72, 90, true, Play overcast, 81, 75, false, Play rain, 71, 80, true, Don't Play Contents of golf.names: Play, Don't Play. outlook: sunny, overcast, rain. temperature: continuous. humidity: continuous. windy: true, false. Output for command: >c45 –f golf C4.5 [release 5] decision tree generator Tue Oct 04 14:35:40 2005 ---------------------------------------- Options: File stem <golf>
Background image of page 1

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

View Full DocumentRight Arrow Icon
Read 14 cases (4 attributes) from golf.data Decision Tree: outlook = overcast: Play (4.0) outlook = sunny: | humidity <= 75 : Play (2.0) | humidity > 75 : Don't Play (3.0) outlook = rain: | windy = true: Don't Play (2.0) | windy = false: Play (3.0) Tree saved Evaluation on training data (14 items): Before Pruning After Pruning ---------------- --------------------------- Size Errors Size Errors Estimate 8 0( 0.0%) 8 0( 0.0%) (38.5%) << Output for command: >c45rules –f golf C4.5 [release 5] rule generator Tue Oct 04 14:36:12 2005 ------------------------------- Options: File stem <golf> Read 14 cases (4 attributes) from golf ------------------ Processing tree 0 Final rules from tree 0: Rule 2: outlook = overcast -> class Play [70.7%] Rule 4: outlook = rain windy = false -> class Play [63.0%] Rule 1: outlook = sunny humidity > 75 -> class Don't Play [63.0%] Rule 3: outlook = rain windy = true -> class Don't Play [50.0%] Default class: Play Evaluation on training data (14 items): Rule Size Error Used Wrong Advantage ---- ---- ----- ---- ----- --------- 2 1 29.3% 4 0 (0.0%) 0 (0|0) Play 4 2 37.0% 3 0 (0.0%) 0 (0|0) Play 1 2 37.0% 3 0 (0.0%) 3 (3|0) Don't Play
Background image of page 2
3 2 50.0% 2 0 (0.0%) 2 (2|0) Don't Play Tested 14, errors 0 (0.0%) << (a) (b) <-classified as ---- ---- 9 (a): class Play 5 (b): class Don't Play Problem L6-1: Complete the decision tree construction from the Physical Data that was begun in class. This requires that you complete the selection process for the root node that we began in class. Once this is done, you must complete the process for each of the leaf nodes. You may stop construction down a branch of the tree whenever (1) all class values at a leaf node are the same or (2) there are no attributes left. Clearly show and label your work. Solution:
Background image of page 3

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

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 08/25/2011 for the course CPE 404 taught by Professor Merz during the Fall '09 term at Missouri S&T.

Page1 / 13

HW-4,5 - Problem L5-1: Use the C4.5 software to produce a...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online