人工智能的课件CH18_Learningfromobservations_第1页
人工智能的课件CH18_Learningfromobservations_第2页
人工智能的课件CH18_Learningfromobservations_第3页
人工智能的课件CH18_Learningfromobservations_第4页
人工智能的课件CH18_Learningfromobservations_第5页
已阅读5页,还剩21页未读, 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、智能计算研究中心Learning from Observations(chapter18)Autumn 2012Instructor: Wang XiaolongHarbin Institute of Technology, Shenzhen Graduate SchoolIntelligent Computation Research Center(HITSGS ICRC)2Outlines Learning agents Inductive learning Decision tree learning Measuring learning performance3Learning Lea

2、rning is essential for unknown environments, i.e., when designer lacks omniscience Learning is useful as a system construction method, i.e., expose the agent to reality rather than trying to write it down Learning modifies the agents decision mechanisms to improve performance4Learning agents5Learnin

3、g element Design of a learning element is affected by Which components of the performance element are to be learned What feedback is available to learn these components What representation is used for the components Type of feedback: Supervised learning: involves learning a function from examples of

4、 its input and outputs. Unsupervised learning: involves learning patterns in the input when no specific output values are supplied. Reinforcement learning: learn from rewards (reinforcement)6Inductive learning Simplest form: learn a function from examplesf is the target functionAn example is a pair

5、(x, f(x)Problem: find a hypothesis hsuch that h fgiven a training set of examples(This is a highly simplified model of real learning: Ignores prior knowledge Assumes examples are given)7Inductive learning methodConstruct/adjust h to agree with f on training set(h is consistent if it agrees with f on

6、 all examples)E.g., curve fitting:8Inductive learning methodConstruct/adjust h to agree with f on training set(h is consistent if it agrees with f on all examples)E.g., curve fitting:9Inductive learning methodConstruct/adjust h to agree with f on training set(h is consistent if it agrees with f on a

7、ll examples)E.g., curve fitting:10Inductive learning methodConstruct/adjust h to agree with f on training set(h is consistent if it agrees with f on all examples)E.g., curve fitting:11Inductive learning methodConstruct/adjust h to agree with f on training set(h is consistent if it agrees with f on a

8、ll examples)E.g., curve fitting:12Inductive learning methodConstruct/adjust h to agree with f on training set(h is consistent if it agrees with f on all examples)E.g., curve fitting:Ockhams razor: prefer the simplest hypothesis consistent with data - In Latin, it means “Entities are not to be multip

9、lied beyond necessity”13Learning decision treesProblem: decide whether to wait for a table at a restaurant, based on the following attributes:1.Alternate: is there an alternative restaurant nearby?2.Bar: is there a comfortable bar area to wait in?3.Fri/Sat: is today Friday or Saturday?4.Hungry: are

10、we hungry?5.Patrons: number of people in the restaurant (None, Some, Full)6.Price: price range ($, $, $)7.Raining: is it raining outside?8.Reservation: have we made a reservation?9.Type: kind of restaurant (French, Italian, Thai, Burger)10. WaitEstimate: estimated waiting time (0-10, 10-30, 30-60, 6

11、0)14Attribute-based representationsExamples described by attribute values (Boolean, discrete, continuous)E.g., situations where I will/wont wait for a table:Classification of examples is positive (T) or negative (F)15Decision treesOne possible representation for hypothesesE.g., here is the “true” tr

12、ee for deciding whether to wait:16ExpressivenessDecision trees can express any function of the input attributes.E.g., for Boolean functions, truth table row path to leaf:Trivially, there is a consistent decision tree for any training set with one path to leaf for each example (unless f nondeterminis

13、tic in x) but it probably wont generalize to new examplesPrefer to find more compact decision trees17Hypothesis spacesHow many distinct decision trees with n Boolean attributes?= number of Boolean functions= number of distinct truth tables with 2n rows = 22nE.g., with 6 Boolean attributes, there are

14、 18,446,744,073,709,551,616 treesMore expressive hypothesis space increases chance that target function can be expressed increases number of hypotheses consistent with training set may get worse predictions18Decision tree learningAim: find a small tree consistent with the training examplesIdea: (rec

15、ursively) choose most significant attribute as root of (sub)tree19Choosing an attribute Idea: a good attribute splits the examples into subsets that are (ideally) all positive or all negativePatrons? is a better choice20Using information theoryInformation answers questionsThe more clueless I am abou

16、t the answer initially, the more information is contained in the answerInformation Content (Entropy):I(P(v1), , P(vn) = i=1 -P(vi) log2 P(vi)For a training set containing p positive examples and n negative examples:npnnpnnppnppnpnnppI22loglog),(21Information gainA chosen attribute A divides the trai

17、ning set E into subsets E1, , Ev according to their values for A, where A has v distinct values.Information Gain (IG) or reduction in entropy from the attribute test:Choose the attribute with the largest IGviiiiiiiiinpnnppInpnpAremainder1),()()(),()(AremaindernpnnppIAIG22Information gainFor the trai

18、ning set, p = n = 6, I(6/12, 6/12) = 1 bitConsider the attributes Patrons and Type (and others too):Patrons has the highest IG of all attributes and so is chosen by the DTL algorithm as the rootbits 0)42,42(124)42,42(124)21,21(122)21,21(1221)(bits 0541.)64,62(126)0 , 1 (124) 1 , 0(1221)(IIIITypeIGIIIPatronsIG23Example contd. Decision tree learned from the 12 examples: Substantially simpler than “true” tree-a more complex hypothesis isnt justified by small amount of data24Performance measu

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

最新文档

评论

0/150

提交评论