Bài giảng Máy học và mạng neural: Bài 2 - TS. Vũ Đức Lung
lượt xem 15
download
Bài 2 trình bày về Concept Learning. Các nội dung chính trong bài này gồm có: Learning from examples, general-to specific ordering of hypotheses, version spaces and candidate elimination algorithm. Mời các bạn cùng tham khảo.
Bình luận(0) Đăng nhập để gửi bình luận!
Nội dung Text: Bài giảng Máy học và mạng neural: Bài 2 - TS. Vũ Đức Lung
- Machine Learning & ANNs Lecture 2: Concept Learning 1
- Outline Learning from examples General-to specific ordering of hypotheses Version spaces and candidate elimination algorithm Exercises 2
- Concept Learning Given: a sample of positive and negative training examples of the category Task: acquire general concepts from specific training examples. Example: Bird, car,… 3
- Training Examples for Concept Enjoy Sport Concept: ”days on which my friend Aldo enjoys his favourite water sports” Task: predict the value of ”Enjoy Sport” for an arbitrary day attributes based on the values of the other attributes Sky Temp Humid Wind Water Fore- Enjoy cast Sport Sunny Warm Normal Strong Warm Same Yes instance Sunny Warm High Strong Warm Same Yes Rainy Cold High Strong Warm Change No Sunny Warm High Strong Cool Change Yes 4
- Representing Hypothesis Hypothesis h is a conjunction of constraints on attributes Each constraint can be: A specific value : e.g. Water=Warm A don’t care value : e.g. Water=? No value allowed (null hypothesis): e.g. Water=Ø Example: hypothesis h Sky Temp Humid Wind Water Forecast < Sunny ? ? Strong ? Same > 5
- Prototypical Concept Learning Task Given: Instances X : Possible days decribed by the attributes Sky, Temp, Humidity, Wind, Water, Forecast Target function c: EnjoySport X {0,1} Hypotheses H: conjunction of literals e.g. < Sunny ? ? Strong ? Same > Training examples D : positive and negative examples of the target function: ,…, Determine: A hypothesis h in H such that h(x)=c(x) for all x in D. 6
- Inductive Learning Hypothesis Any hypothesis found to approximate the target function well over the training examples, will also approximate the target function well over the unobserved examples. 7
- Number of Instances, Concepts, Hypotheses Sky: Sunny, Cloudy, Rainy AirTemp: Warm, Cold Humidity: Normal, High Wind: Strong, Weak Water: Warm, Cold Forecast: Same, Change #distinct instances : 3*2*2*2*2*2 = 96 #distinct concepts : 296 #syntactically distinct hypotheses : 5*4*4*4*4*4=5120 #semantically distinct hypotheses : 1+4*3*3*3*3*3=973 8
- General to Specific Order Consider two hypotheses: h1=< Sunny,?,?,Strong,?,?> h2=< Sunny,?,?,?,?,?> Set of instances covered by h1 and h2: h2 imposes fewer constraints than h1 and therefore classifies more instances x as positive h(x)=1. Definition: Let hj and hk be boolean-valued functions defined over X. Then hj is more general than or equal to hk (written hj hk) if and only if x X : [ (hk(x) = 1) (hj(x) = 1)] The relation imposes a partial order over the hypothesis space H that is utilized many concept learning methods. 9
- Instance, Hypotheses and ”more general” Instances Hypotheses specific x1 h3 h1 h2 h1 h2 x2 h2 h3 general x1=< Sunny,Warm,High,Strong,Cool,Same> h1=< Sunny,?,?,Strong,?,?> x2=< Sunny,Warm,High,Light,Warm,Same> h2=< Sunny,?,?,?,?,?> h3=< Sunny,?,?,?,Cool,?> 10
- Find-S Algorithm 1. Initialize h to the most specific hypothesis in H 2. For each positive training instance x For each attribute constraint ai in h If the constraint ai in h is satisfied by x then do nothing else replace ai in h by the next more general constraint that is satisfied by x 3. Output hypothesis h 11
- Hypothesis Space Search by Find-S Instances Hypotheses x3 h0 specific h1 x1 x2 h2,3 x4 h4 general x1=+ h0=< Ø, Ø, Ø, Ø, Ø, Ø,> h1=< Sunny,Warm,Normal, x2=+ Strong,Warm,Same> h2,3=< Sunny,Warm,?, x3= - Strong,Warm,Same> x4= + h4=< Sunny,Warm,?, Strong,?,?> 12
- Properties of Find-S Hypothesis space described by conjunctions of attributes Find-S will output the most specific hypothesis within H that is consistent with the positve training examples The output hypothesis will also be consistent with the negative examples, provided the target concept is contained in H. 13
- Complaints about Find-S Can’t tell if the learner has converged to the target concept, in the sense that it is unable to determine whether it has found the only hypothesis consistent with the training examples. Can’t tell when training data is inconsistent, as it ignores negative training examples. Why prefer the most specific hypothesis? What if there are multiple maximally specific hypothesis? 14
- Version Spaces A hypothesis h is consistent with a set of training examples D of target concept if and only if h(x)=c(x) for each training example in D. Consistent(h,D) := D h(x)=c(x) The version space, VSH,D , with respect to hypothesis space H, and training set D, is the subset of hypotheses from H consistent with all training examples: VSH,D = {h H | Consistent(h,D) } 15
- List-Then Eliminate Algorithm 1. VersionSpace a list containing every hypothesis in H 2. For each training example remove from VersionSpace any hypothesis that is inconsistent with the training example h(x) c(x) 3. Output the list of hypotheses in VersionSpace 16
- Example Version Space S: {} G: {, , } x1 = + x2 = + x3 = - x4 = + 17
- Representing Version Spaces The general boundary, G, of version space VSH,D is the set of maximally general members. The specific boundary, S, of version space VSH,D is the set of maximally specific members. Every member of the version space lies between these boundaries VSH,D = {h H| ( s S) ( g G) (g h s) where x y means x is more general or equal than y 18
- Candidate Elimination Algorithm G maximally general hypotheses in H S maximally specific hypotheses in H For each training example d= If d is a positive example Remove from G any hypothesis that is inconsistent with d For each hypothesis s in S that is not consistent with d remove s from S. Add to S all minimal generalizations h of s such that h consistent with d Some member of G is more general than h Remove from S any hypothesis that is more general than another hypothesis in S 19
- Candidate Elimination Algorithm If d is a negative example Remove from S any hypothesis that is inconsistent with d For each hypothesis g in G that is not consistent with d remove g from G. Add to G all minimal specializations h of g such that h consistent with d Some member of S is more specific than h Remove from G any hypothesis that is less general than another hypothesis in G 20
CÓ THỂ BẠN MUỐN DOWNLOAD
-
Bài giảng Tin học cơ bản: Chuyên đề - Mạng máy tính (Chương 1: Mạng máy tính và khai thác thông tin trên mạng LAN)
39 p | 283 | 31
-
Bài giảng Máy học và mạng neural: Bài 4 - TS. Vũ Đức Lung
41 p | 145 | 30
-
Bài giảng Tin học văn phòng 2: Chương 1 - Hoàng Thanh Hòa
120 p | 174 | 22
-
Bài giảng Tin học cơ sở (Basics of Informatics) - Chương 4: Mạng máy tính và Internet
7 p | 57 | 15
-
Bài giảng Tin học đại cương: Chương 4 - ĐH Nông nghiệp Hà Nội
13 p | 166 | 15
-
Bài giảng Tin học cơ sở: Chương 1 - Tổng quan về máy tính
48 p | 117 | 14
-
Bài giảng Tin học đại cương: Chương 3 - Trường ĐH Ngân hàng TP.HCM
44 p | 39 | 10
-
Bài giảng Tin học đại cương - Chương 4: Mạng máy tính và internet
51 p | 63 | 10
-
Bài giảng Tin học đại cương: Chương 3 - Ths. Nguyễn Thị Khiêm Hòa
44 p | 101 | 8
-
Bài giảng Tin học đại cương: Chương 4 - Đại học Nông nghiệp Hà Nội
51 p | 112 | 7
-
Bài giảng Tin học cơ sở 1: Phần 1
110 p | 39 | 7
-
Bài giảng Tin học đại cương: Chương 5 - TS. Nguyễn Thị Bạch Tuyết
23 p | 76 | 7
-
Bài giảng Tin học đại cương: Chương 8 - ThS. Lê Văn Hùng
88 p | 86 | 5
-
Bài giảng Tin học văn phòng 2: Chương 1 - Võ Văn Thanh
118 p | 71 | 5
-
Bài giảng Tin học ứng dụng: Chương 3 - ThS. Hoàng Hải Xanh
80 p | 11 | 4
-
Bài giảng Tin học đại cương (Phần 1: Tin học căn bản): Chương 2 - Viện Công nghệ Thông tin & Truyền thông
130 p | 35 | 3
-
Bài giảng Tin học cơ sở: Chương 4 - Học viện Nông nghiệp Việt Nam (tt)
26 p | 65 | 2
-
Bài giảng Tin học cơ sở: Chương 4 - Học viện Nông nghiệp Việt Nam
4 p | 39 | 1
Chịu trách nhiệm nội dung:
Nguyễn Công Hà - Giám đốc Công ty TNHH TÀI LIỆU TRỰC TUYẾN VI NA
LIÊN HỆ
Địa chỉ: P402, 54A Nơ Trang Long, Phường 14, Q.Bình Thạnh, TP.HCM
Hotline: 093 303 0098
Email: support@tailieu.vn