Download presentation
Presentation is loading. Please wait.
Published byOswin Sanders Modified over 8 years ago
1
example: input data outlooktemp.humiditywindyplay sunnyhothighfalseno sunnyhothightrueno overcasthothighfalseyes rainymildhighfalseyes rainycoolnormalfalseyes rainycoolnormaltrueno overcastcoolnormaltrueyes sunnymildhighfalseno sunnycoolnormalfalseyes rainymildnormalfalseyes sunnymildnormaltrueyes overcastmildhightrueyes overcasthotnormalfalseyes rainymildhightrueno
2
outlook sunny-no2/5 overcast-yes0/4 rainy-yes2/5 total 4/14 outlooktemp.humiditywindyplay sunnyhothighfalseno sunnyhothightrueno overcasthothighfalseyes rainymildhighfalseyes rainycoolnormalfalseyes rainycoolnormaltrueno overcastcoolnormaltrueyes sunnymildhighfalseno sunnycoolnormalfalseyes rainymildnormalfalseyes sunnymildnormaltrueyes overcastmildhightrueyes overcasthotnormalfalseyes rainymildhightrueno temp. hot-no*2/4 mild-yes2/6 cool-yes1/4 total 5/14 humidity high-no3/7 normal-yes1/7 total 4/14 windy false-yes2/8 true-no*3/6 total 5/14 example: 1R
3
outlooktemp.humiditywindyplay sunnyhothighfalseno sunnyhothightrueno overcasthothighfalseyes rainymildhighfalseyes rainycoolnormalfalseyes rainycoolnormaltrueno overcastcoolnormaltrueyes sunnymildhighfalseno sunnycoolnormalfalseyes rainymildnormalfalseyes sunnymildnormaltrueyes overcastmildhightrueyes overcasthotnormalfalseyes rainymildhightrueno sunnycoolhightrue? yes sunny2/9 cool3/9 high3/9 true3/9 overall9/14 0.0053 20.5 % no sunny3/5 cool1/5 high4/5 true3/5 overall5/14 0.0206 79.5 % example: Naïve Bayes
4
outlooktemp.humiditywindyplay sunnyhothighfalseno sunnyhothightrueno overcasthothighfalseyes rainymildhighfalseyes rainycoolnormalfalseyes rainycoolnormaltrueno overcastcoolnormaltrueyes sunnymildhighfalseno sunnycoolnormalfalseyes rainymildnormalfalseyes sunnymildnormaltrueyes overcastmildhightrueyes overcasthotnormalfalseyes rainymildhightrueno outlook sunny 2:3 overcast 4:0 rainy 3:2 temp. hot 2:2 cool 3:1 mild 4:2 humidity high 3:4 normal 6:1 windy false 6:2 true 3:3 temp. hot 0:2 cool 1:0 mild 1:1 humidity high 0:3 normal 2:0 windy false 1:2 true 1:1 example: ID3
5
outlook windy humidity yes noyes no high normal false true sunny overcast rainy example: ID3
6
example: PRISM outlooktemp.humiditywindyplay sunnyhothighfalseno sunnyhothightrueno overcasthothighfalseyes rainymildhighfalseyes rainycoolnormalfalseyes rainycoolnormaltrueno overcastcoolnormaltrueyes sunnymildhighfalseno sunnycoolnormalfalseyes rainymildnormalfalseyes sunnymildnormaltrueyes overcastmildhightrueyes overcasthotnormalfalseyes rainymildhightrueno If ? then P=yes If O=overcast then P=yes O = sunny2/5 O = overcast4/4 O = rainy3/5 T = hot 2/4 T = mild4/6 T = cool3/4 H = high3/7 H = normal6/7 W = false6/8 W = true3/6
7
outlooktemp.humiditywindyplay sunnyhothighfalseno sunnyhothightrueno overcasthothighfalseyes rainymildhighfalseyes rainycoolnormalfalseyes rainycoolnormaltrueno overcastcoolnormaltrueyes sunnymildhighfalseno sunnycoolnormalfalseyes rainymildnormalfalseyes sunnymildnormaltrueyes overcastmildhightrueyes overcasthotnormalfalseyes rainymildhightrueno example: PRISM If ? then P=yes If H=normal then P=yes O = sunny2/5 O = rainy3/5 T = hot 0/2 T = mild3/5 T = cool2/3 H = high1/5 H = normal4/5 W = false4/6 W = true1/4
8
outlooktemp.humiditywindyplay sunnyhothighfalseno sunnyhothightrueno overcasthothighfalseyes rainymildhighfalseyes rainycoolnormalfalseyes rainycoolnormaltrueno overcastcoolnormaltrueyes sunnymildhighfalseno sunnycoolnormalfalseyes rainymildnormalfalseyes sunnymildnormaltrueyes overcastmildhightrueyes overcasthotnormalfalseyes rainymildhightrueno example: PRISM O = sunny2/2 O = rainy2/3 T = mild2/2 T = cool2/3 W = false3/3 W = true1/2 If H=normal and ? then P=yes If H=normal and W=false then P=yes
9
outlooktemp.humiditywindyplay sunnyhothighfalseno sunnyhothightrueno overcasthothighfalseyes rainymildhighfalseyes rainycoolnormalfalseyes rainycoolnormaltrueno overcastcoolnormaltrueyes sunnymildhighfalseno sunnycoolnormalfalseyes rainymildnormalfalseyes sunnymildnormaltrueyes overcastmildhightrueyes overcasthotnormalfalseyes rainymildhightrueno example: PRISM O = sunny1/4 O = rainy1/3 T = hot0/2 T = mild2/3 T = cool0/1 H = high1/5 H = normal1/2 W = false1/3 W = true1/4 If ? then P=yes If T=mild then P=yes
10
outlooktemp.humiditywindyplay sunnyhothighfalseno sunnyhothightrueno overcasthothighfalseyes rainymildhighfalseyes rainycoolnormalfalseyes rainycoolnormaltrueno overcastcoolnormaltrueyes sunnymildhighfalseno sunnycoolnormalfalseyes rainymildnormalfalseyes sunnymildnormaltrueyes overcastmildhightrueyes overcasthotnormalfalseyes rainymildhightrueno example: PRISM O = sunny1/2 O = rainy1/2 H = high1/3 H = normal1/1 W = false1/2 W = true1/2 If T=mild and ? then P=yes If T=mild and H=normal then P=yes
11
outlooktemp.humiditywindyplay sunnyhothighfalseno sunnyhothightrueno overcasthothighfalseyes rainymildhighfalseyes rainycoolnormalfalseyes rainycoolnormaltrueno overcastcoolnormaltrueyes sunnymildhighfalseno sunnycoolnormalfalseyes rainymildnormalfalseyes sunnymildnormaltrueyes overcastmildhightrueyes overcasthotnormalfalseyes rainymildhightrueno example: PRISM O = sunny0/3 O = rainy1/3 T = hot0/2 T = mild1/3 T = cool0/1 H = high1/5 H = normal0/1 W = false1/3 W = true0/3 If ? then P=yes If O=rainy then P=yes
12
outlooktemp.humiditywindyplay sunnyhothighfalseno sunnyhothightrueno overcasthothighfalseyes rainymildhighfalseyes rainycoolnormalfalseyes rainycoolnormaltrueno overcastcoolnormaltrueyes sunnymildhighfalseno sunnycoolnormalfalseyes rainymildnormalfalseyes sunnymildnormaltrueyes overcastmildhightrueyes overcasthotnormalfalseyes rainymildhightrueno example: PRISM T = mild1/2 T = cool0/1 H = high1/2 H = normal0/1 W = false1/1 W = true0/2 If O=rainy and ? then P=yes If O=rainy and W=false then P=yes
13
outlooktemp.humiditywindyplay sunnyhothighfalseno sunnyhothightrueno overcasthothighfalseyes rainymildhighfalseyes rainycoolnormalfalseyes rainycoolnormaltrueno overcastcoolnormaltrueyes sunnymildhighfalseno sunnycoolnormalfalseyes rainymildnormalfalseyes sunnymildnormaltrueyes overcastmildhightrueyes overcasthotnormalfalseyes rainymildhightrueno If O=overcast then P=yes If H=normal and W=false then P=yes If T=mild and H=normal then P=yes If O=rainy and W=false then P=yes example: PRISM
14
outlooktemp.humiditywindyplaydistance sunnyhothighfalseno2 sunnyhothightrueno1 overcasthothighfalseyes3 rainymildhighfalseyes3 rainycoolnormalfalseyes3 rainycoolnormaltrueno2 overcastcoolnormaltrueyes2 sunnymildhighfalseno2 sunnycoolnormalfalseyes2 rainymildnormalfalseyes4 sunnymildnormaltrueyes2 overcastmildhightrueyes2 overcasthotnormalfalseyes4 rainymildhightrueno2 example: kNN sunnycoolhightrue?
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.