赵才荣 同济大学,电子与信息工程学院,智信馆410室

Slides:



Advertisements
Similar presentations
Chapter 2 Combinatorial Analysis 主講人 : 虞台文. Content Basic Procedure for Probability Calculation Counting – Ordered Samples with Replacement – Ordered.
Advertisements

Which TV program is the video? 中国达人秀 China’s Got Talent 选秀节目 talent show talent n. 天资;天赋.
期末考试作文讲解 % 的同学赞成住校 30% 的学生反对住校 1. 有利于培养我们良好的学 习和生活习惯; 1. 学生住校不利于了解外 界信息; 2 可与老师及同学充分交流有 利于共同进步。 2. 和家人交流少。 在寄宿制高中,大部分学生住校,但仍有一部分学生选 择走读。你校就就此开展了一次问卷调查,主题为.
考研英语复试 口语准备 考研英语口语复试. 考研英语复试 口语准备 服装 谦虚、微笑、自信 态度积极 乐观沉稳.
黄国文 中山大学 通用型英语人才培养中的 语言学教学 黄国文 中山大学
如何与客户有效沟通 外贸团队销售及管理实战培训 浙江艾力斯特健康科技有限公司
听力满分不是梦 博智 —— Anna钟小娜.
2014 年上学期 湖南长郡卫星远程学校 制作 13 Getting news from the Internet.
Healthy Breakfast 第四組 電子一甲(電資一) 指導老師:高美玉 組長:B 侯昌毅
-CHINESE TIME (中文时间): Free Response idea: 你周末做了什么?
:sisu Password:
How can we become good leamers
2014年上海市中职校学业水平考试 英语学科总结报告
真题重现:广东高考中的不定式。 1 (2008年高考题)For example, the proverb,“ plucking up a crop _________(help) it grow ,” is based on the following story… 2 (2007年高考题)While.
摘要的开头: The passage mainly tells us sth.
Operating System CPU Scheduing - 3 Monday, August 11, 2008.
深層學習 暑期訓練 (2017).
What are the shirts made of?
Euler’s method of construction of the Exponential function
Homework 4 an innovative design process model TEAM 7
Unit 4 I used to be afraid of the dark.
Module 5.
Ⅱ、从方框里选择合适的单词填空,使句子完整通顺。 [ size beef special large yet ]
模式识别 Pattern Recognition
教師的成長 與 教師專業能力理念架構 教育局 專業發展及培訓分部 TCF, how much you know about it?
Unit title: 买东西 - Shopping
Chinese IAB (IA +IB) 11 Weather and Internet Module (L21-L22)
Guide to Freshman Life Prepared by Sam Wu.
Decision Support System (靜宜資管楊子青)
HLA - Time Management 陳昱豪.
创建型设计模式.
This Is English 3 双向视频文稿.
消費者偏好與效用概念.
客户服务 询盘惯例.
Lesson 44:Popular Sayings
Decision Support System (靜宜資管楊子青)
Could you please clean your room?
客户服务 售后服务.
Traditional Chinese Medicine
Chinese IAB (IA +IB) 11 Weather and Internet Module (L21-L22)
Chp.4 The Discount Factor
IBM SWG Overall Introduction
Unit title: 买东西 - Shopping
二、雅思学术类阅读题型 10种题型 5种大题型+5种小题型.
高性能计算与天文技术联合实验室 智能与计算学部 天津大学
Unit 8 Our Clothes Topic1 What a nice coat! Section D 赤峰市翁牛特旗梧桐花中学 赵亚平.
Guide to a successful PowerPoint design – simple is best
Respect cannot be demanded, it must be earned
Chp.4 The Discount Factor
中央社新聞— <LTTC:台灣學生英語聽說提升 讀寫相對下降>
Lab 4 買房負擔 著重: 不動產計算 是否可承擔起買房 (lab 4) 使用”分析藍本管理員” Excel : IF 函數/功能.
中考英语阅读理解 完成句子命题与备考 宝鸡市教育局教研室 任军利
Chp.4 The Discount Factor
Philosophy of Life.
高考应试作文写作训练 5. 正反观点对比.
取材 Tommy’s Window slideshow
TEEN CHALLENGE Next Steps 核心价值观总结 CORE VALUES 青年挑战核心价值观
An organizational learning approach to information systems development
李宏毅專題 Track A, B, C 的時間、地點開學前通知
Review of Statistics.
磁共振原理的临床应用.
Introduction of this course
立足语境,放眼词块,螺旋上升 年温州一模试卷题型分析 及相应的二轮复习对策 by Sue March 14,2013.
英语单项解题思路.
Class imbalance in Classification
Hospitality English 酒店商务英语 讲师:罗云利 工商与公共管理学院.
簡單迴歸分析與相關分析 莊文忠 副教授 世新大學行政管理學系 計量分析一(莊文忠副教授) 2019/8/3.
Respect cannot be demanded, it must be earned
Unit 1 Book 8 A land of diversity
Gaussian Process Ruohua Shi Meeting
Presentation transcript:

赵才荣 E-mail:zhaocairong@tongji.edu.cn 同济大学,电子与信息工程学院,智信馆410室 《人工智能原理》课程 第十八章 样例学习 样例学习 赵才荣 E-mail:zhaocairong@tongji.edu.cn 同济大学,电子与信息工程学院,智信馆410室 理性的Agent是人工智能方法的核心 通过对Agent从感知外部环境,到实施行动,并最后对外部环境施加影响的全过程,把AI中相互分离的主要领域,如问题求解,知识与推理,合乎逻辑 的行动,不确定知识与推理,学习以及通信、感知与行动等统一在智能Agent这一框架下,形成了一个相互联系的整体。

Outline Learning agents Inductive learning Decision tree learning 上海市精品课程 人工智能原理

Why is learning important? So far we have assumed we know how the world works Rules of queens puzzle Rules of chess Knowledge base of logical facts Actions’ preconditions and effects Probabilities in Bayesian networks, MDPs, POMDPs, … Rewards in MDPs At that point “just” need to solve/optimize In the real world this information is often not immediately available AI needs to be able to learn from experience 上海市精品课程 人工智能原理

Why is learning important? Learning 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 agent's decision mechanisms to improve performance 上海市精品课程 人工智能原理

Different kinds of learning… Supervised learning: Someone gives us examples and the right answer for those examples We have to predict the right answer for unseen examples Unsupervised learning: We see examples but get no feedback We need to find patterns in the data Reinforcement learning: We take actions and get rewards Have to learn how to get high rewards 上海市精品课程 人工智能原理

Learning agents 上海市精品课程 人工智能原理

Learning 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: correct answers for each example Unsupervised learning: correct answers not given Reinforcement learning: occasional rewards 强化学习:奖惩 上海市精品课程 人工智能原理

Inductive learning (归纳学习) f is the target function An example is a pair (x, f(x)) Problem: find a hypothesis h such that h ≈ f given a training set of examples (This is a highly simplified model of real learning: Ignores prior knowledge Assumes examples are given) 归纳学习 上海市精品课程 人工智能原理

Inductive learning method Construct/adjust h to agree with f on training set (h is consistent if it agrees with f on all examples) E.g., curve fitting: 上海市精品课程 人工智能原理

Inductive learning method Construct/adjust h to agree with f on training set (h is consistent if it agrees with f on all examples) E.g., curve fitting: 上海市精品课程 人工智能原理

Inductive learning method Construct/adjust h to agree with f on training set (h is consistent if it agrees with f on all examples) E.g., curve fitting: 上海市精品课程 人工智能原理

Inductive learning method Construct/adjust h to agree with f on training set (h is consistent if it agrees with f on all examples) E.g., curve fitting: 上海市精品课程 人工智能原理

Inductive learning method Construct/adjust h to agree with f on training set (h is consistent if it agrees with f on all examples) E.g., curve fitting: 上海市精品课程 人工智能原理

Inductive learning method Construct/adjust h to agree with f on training set (h is consistent if it agrees with f on all examples) E.g., curve fitting: Ockham’s razor: prefer the simplest hypothesis consistent with data 上海市精品课程 人工智能原理

Learning decision trees Problem: decide whether to wait for a table at a restaurant, based on the following attributes: Alternate: is there an alternative restaurant nearby? Bar: is there a comfortable bar area to wait in? Fri/Sat: is today Friday or Saturday? Hungry: are we hungry? Patrons: number of people in the restaurant (None, Some, Full) Price: price range ($, $$, $$$) Raining: is it raining outside? Reservation: have we made a reservation? Type: kind of restaurant (French, Italian, Thai (泰国菜), Burger) WaitEstimate: estimated waiting time (0-10, 10-30, 30-60, >60) 学习决策树: 1.是否有替代餐厅 2.等候区是否舒适 3.是周末? 4.饿否? 5.餐厅是否满员 6.价位 7.是否下雨 8.是否预约 9.类型 10.估计等待时间 上海市精品课程 人工智能原理

Attribute-based representations Examples described by attribute values (Boolean, discrete, continuous) E.g., situations where I will/won't wait for a table: Classification of examples is positive (T) or negative (F) 上海市精品课程 人工智能原理

Decision trees One possible representation for hypotheses E.g., here is the “true” tree for deciding whether to wait: 上海市精品课程 人工智能原理

Expressiveness Decision 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 nondeterministic in x) but it probably won't generalize to new examples Prefer to find more compact decision trees 上海市精品课程 人工智能原理

Hypothesis spaces How many distinct decision trees with n Boolean attributes? = number of Boolean functions = number of distinct truth tables with 2n rows = 22n E.g., with 6 Boolean attributes, there are 18,446,744,073,709,551,616 trees 上海市精品课程 人工智能原理

Hypothesis spaces How many distinct decision trees with n Boolean attributes? = number of Boolean functions = number of distinct truth tables with 2n rows = 22n E.g., with 6 Boolean attributes, there are 18,446,744,073,709,551,616 trees How many purely conjunctive hypotheses (e.g., Hungry  Rain)? Each attribute can be in (positive), in (negative), or out  3n distinct conjunctive hypotheses More expressive hypothesis space increases chance that target function can be expressed increases number of hypotheses consistent with training set  may get worse predictions 上海市精品课程 人工智能原理

Decision tree learning Aim: find a small tree consistent with the training examples Idea: (recursively) choose "most significant" attribute as root of (sub)tree 上海市精品课程 人工智能原理

Choosing an attribute Idea: a good attribute splits the examples into subsets that are (ideally) "all positive" or "all negative" Patrons? is a better choice 上海市精品课程 人工智能原理

Using information theory To implement Choose-Attribute in the DTL algorithm Information 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: 信息熵 上海市精品课程 人工智能原理

Information gain A chosen attribute A divides the training 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 IG 信息增益 上海市精品课程 人工智能原理

Information gain For the training set, p = n = 6, I(6/12, 6/12) = 1 bit Consider 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 root 上海市精品课程 人工智能原理

Example contd. Decision tree learned from the 12 examples: Substantially simpler than “true” tree---a more complex hypothesis isn’t justified by small amount of data 上海市精品课程 人工智能原理

Performance measurement How do we know that h ≈ f ? Use theorems of computational/statistical learning theory Try h on a new test set of examples (use same distribution over example space as training set) Learning curve = % correct on test set as a function of training set size 上海市精品课程 人工智能原理

Summary Learning needed for unknown environments, lazy designers Learning agent = performance element + learning element For supervised learning, the aim is to find a simple hypothesis approximately consistent with training examples Decision tree learning using information gain Learning performance = prediction accuracy measured on test set 上海市精品课程 人工智能原理

Thank you