Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Input and Output Thanks: I. Witten and E. Frank.

Similar presentations


Presentation on theme: "1 Input and Output Thanks: I. Witten and E. Frank."— Presentation transcript:

1

2 1 Input and Output Thanks: I. Witten and E. Frank

3 2 The weather problem Conditions for playing an outdoor game OutlookTemperatureHumidityWindyPlay SunnyHotHighFalseNo SunnyHotHighTrueNo OvercastHotHighFalseYes RainyMildNormalFalseYes …………… If outlook = sunny and humidity = high then play = no If outlook = rainy and windy = true then play = no If outlook = overcast then play = yes If humidity = normal then play = yes If none of the above then play = yes

4 3 Classification vs. Association rules Classification rule: predicts value of pre- specified attribute (the classification of an example) Associations rule: predicts value of arbitrary attribute or combination of attributes If outlook = sunny and humidity = high then play = no If temperature = cool then humidity = normal If humidity = normal and windy = false then play = yes If outlook = sunny and play = no then humidity = high If windy = false and play = no then outlook = sunny and humidity = high

5 4 Weather data with mixed attributes Two attributes with numeric values OutlookTemperatureHumidityWindyPlay Sunny85 FalseNo Sunny8090TrueNo Overcast8386FalseYes Rainy7580FalseYes …………… If outlook = sunny and humidity > 83 then play = no If outlook = rainy and windy = true then play = no If outlook = overcast then play = yes If humidity < 85 then play = yes If none of the above then play = yes

6 5 The contact lenses data AgeSpectacle prescriptionAstigmatismTear production rateRecommended lenses YoungMyopeNoReducedNone YoungMyopeNoNormalSoft YoungMyopeYesReducedNone YoungMyopeYesNormalHard YoungHypermetropeNoReducedNone YoungHypermetropeNoNormalSoft YoungHypermetropeYesReducedNone YoungHypermetropeYesNormalhard Pre-presbyopicMyopeNoReducedNone Pre-presbyopicMyopeNoNormalSoft Pre-presbyopicMyopeYesReducedNone Pre-presbyopicMyopeYesNormalHard Pre-presbyopicHypermetropeNoReducedNone Pre-presbyopicHypermetropeNoNormalSoft Pre-presbyopicHypermetropeYesReducedNone Pre-presbyopicHypermetropeYesNormalNone PresbyopicMyopeNoReducedNone PresbyopicMyopeNoNormalNone PresbyopicMyopeYesReducedNone PresbyopicMyopeYesNormalHard PresbyopicHypermetropeNoReducedNone PresbyopicHypermetropeNoNormalSoft PresbyopicHypermetropeYesReducedNone PresbyopicHypermetropeYesNormalNone

7 6 A complete and correct rule set If tear production rate = reduced then recommendation = none If age = young and astigmatic = no and tear production rate = normal then recommendation = soft If age = pre-presbyopic and astigmatic = no and tear production rate = normal then recommendation = soft If age = presbyopic and spectacle prescription = myope and astigmatic = no then recommendation = none If spectacle prescription = hypermetrope and astigmatic = no and tear production rate = normal then recommendation = soft If spectacle prescription = myope and astigmatic = yes and tear production rate = normal then recommendation = hard If age young and astigmatic = yes and tear production rate = normal then recommendation = hard If age = pre-presbyopic and spectacle prescription = hypermetrope and astigmatic = yes then recommendation = none If age = presbyopic and spectacle prescription = hypermetrope and astigmatic = yes then recommendation = none

8 7 A decision tree for this problem

9 8 Predicting CPU performance Cycle time (ns) Main memory (Kb) Cache (Kb) ChannelsPerformance MYCTMMINMMAXCACHCHMINCHMAXPRP 1125256600025616128198 229800032000328 269 … 2084805128000320067 2094801000400000045 PRP = -55.9 + 0.0489 MYCT + 0.0153 MMIN + 0.0056 MMAX + 0.6410 CACH - 0.2700 CHMIN + 1.480 CHMAX

10 9 Data from labor negotiations AttributeType123…40 Duration(Number of years)1232 Wage increase first yearPercentage2%4%4.3%4.5 Wage increase second yearPercentage?5%4.4%4.0 Wage increase third yearPercentage???? Cost of living adjustment{none,tcf,tc}nonetcf?none Working hours per week(Number of hours)28353840 Pension{none,ret-allw, empl-cntr}none??? Standby payPercentage?13%?? Shift-work supplementPercentage?5%4%4 Education allowance{yes,no}yes??? Statutory holidays(Number of days)111512 Vacation{below-avg,avg,gen}avggen avg Long-term disability assistance{yes,no}no??yes Dental plan contribution{none,half,full}none?full Bereavement assistance{yes,no}no??yes Health plan contribution{none,half,full}none?fullhalf Acceptability of contract{good,bad}badgood

11 10 Decision trees for the labor data

12 11 Instance-based representation Simplest form of learning: rote learning Training instances are searched for instance that most closely resembles new instance The instances themselves represent the knowledge Also called instance-based learning Similarity function defines what’s “learned” Instance-based learning is lazy learning Methods: nearest-neighbor, k-nearest- neighbor, …

13 12 Learning prototypes/Case Based Reasoning Only those instances involved in a decision need to be stored

14 13 Representing clusters I Simple 2-D representationVenn diagram Overlapping clusters

15 14 Representing clusters II 1 2 3 a 0.40.1 0.5 b 0.10.8 0.1 c 0.30.3 0.4 d 0.10.1 0.8 e 0.40.2 0.4 f 0.10.4 0.5 g 0.70.2 0.1 h 0.50.4 0.1 … Probabilistic assignmentDendrogram NB: dendron is the Greek word for tree


Download ppt "1 Input and Output Thanks: I. Witten and E. Frank."

Similar presentations


Ads by Google