Trí tuệ nhân tạo chapter11 machine learning

71 10 0
Trí tuệ nhân tạo   chapter11 machine learning

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Machine Learning Chapter 11 CuuDuongThanCong.com https://fb.com/tailieudientucntt Machine Learning •  What is learning? Cao Hoang Tru CSE Faculty - HCMUT CuuDuongThanCong.com 15 November 2011 https://fb.com/tailieudientucntt Machine Learning •  What is learning? •  “That is what learning is You suddenly understand something you've understood all your life, but in a new way.” (Doris Lessing – 2007 Nobel Prize in Literature) Cao Hoang Tru CSE Faculty - HCMUT CuuDuongThanCong.com 15 November 2011 https://fb.com/tailieudientucntt Machine Learning •  Arthur Samuel (1959): "Field of study that gives computers the ability to learn without being explicitly programmed” •  Tom Mitchell (1997): "A computer program is said to learn from experience E with respect to some class of tasks T and performance measure P, if its performance at tasks in T, as measured by P, improves with experience E” Cao Hoang Tru CSE Faculty - HCMUT CuuDuongThanCong.com 15 November 2011 https://fb.com/tailieudientucntt Machine Learning •  How to construct programs that automatically improve with experience Cao Hoang Tru CSE Faculty - HCMUT CuuDuongThanCong.com 15 November 2011 https://fb.com/tailieudientucntt Machine Learning •  How to construct programs that automatically improve with experience •  Learning problem: –  Task T –  Performance measure P –  Training experience E Cao Hoang Tru CSE Faculty - HCMUT CuuDuongThanCong.com 15 November 2011 https://fb.com/tailieudientucntt Machine Learning •  Chess game: –  Task T: playing chess games –  Performance measure P: percent of games won against opponents –  Training experience E: playing practice games againts itself Cao Hoang Tru CSE Faculty - HCMUT CuuDuongThanCong.com 15 November 2011 https://fb.com/tailieudientucntt Machine Learning •  Handwriting recognition: –  Task T: recognizing and classifying handwritten words –  Performance measure P: percent of words correctly classified –  Training experience E: handwritten words with given classifications Cao Hoang Tru CSE Faculty - HCMUT CuuDuongThanCong.com 15 November 2011 https://fb.com/tailieudientucntt Example Experience Example GRAY? MAMMAL? LARGE? VEGETARIAN? WILD? Elephant + + + + + + + + + - + + + + - + + - (Mouse) - + + + + - (Giraffe) + - + - + - (Dinosaur) + + + + - + Prediction + + + - + ? + - + - + ? + + + - - ? Cao Hoang Tru CSE Faculty - HCMUT CuuDuongThanCong.com 15 November 2011 https://fb.com/tailieudientucntt Example Experience Example Sky AirTemp Sunny Warm Normal Strong Warm Same Yes Sunny Warm High Strong Warm Same Yes Rainy Cold High Strong Warm Change No Sunny Warm High Strong Cool Change Yes Low Weak Prediction Humidity Wind Water Forecast EnjoySport Rainy Cold High Strong Warm Change ? Sunny Warm Normal Strong Warm Same ? Sunny Warm Low Strong Cool Same ? Cao Hoang Tru CSE Faculty - HCMUT CuuDuongThanCong.com 10 15 November 2011 https://fb.com/tailieudientucntt Decision Trees Humidity Normal High Sky Yes Sunny Yes No Sky AirTemp Humidity Sunny Warm Sunny Rainy AirTemp No Wind Water Forecast Normal Strong Warm Same Yes Warm High Strong Warm Same Yes Rainy Cold High Strong Warm Change No Sunny Warm High Strong Cool Change Yes Cloudy Warm High Weak Cool Same Yes Cloudy Cold High Weak Cool Same No 57 May 3, 2014 CuuDuongThanCong.com Cloudy Enjoy Warm Cold Yes Cao Hoang Tru CSE Faculty - HCMUT https://fb.com/tailieudientucntt No Decision Trees A1 = v1 + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - A2 = v2 58 May 3, 2014 CuuDuongThanCong.com Cao Hoang Tru CSE Faculty - HCMUT https://fb.com/tailieudientucntt Homogenity of Examples •  Entropy(S) = - p+log2p+ - p-log2p- 0.5 59 May 3, 2014 CuuDuongThanCong.com Cao Hoang Tru CSE Faculty - HCMUT https://fb.com/tailieudientucntt Homogenity of Examples •  Entropy(S) = ∑i=1,c- pilog2pi 60 May 3, 2014 CuuDuongThanCong.com impurity measure Cao Hoang Tru CSE Faculty - HCMUT https://fb.com/tailieudientucntt Information Gain •  Gain(S, A) = Entropy(S) - ∑v∈Values(A)(|Sv|/|S|).Entropy(Sv) A Sv1 Sv2 61 May 3, 2014 CuuDuongThanCong.com Cao Hoang Tru CSE Faculty - HCMUT https://fb.com/tailieudientucntt Example •  Entropy(S) = - p+log2p+ - p-log2p- = - (4/6)log2(4/6) - (2/6)log2(2/6) = 0.389 + 0.528 = 0.917 •  Gain(S, Sky) = Entropy(S) - ∑v∈{Sunny, Rainy, Cloudy}(|Sv|/|S|)Entropy(Sv) = Entropy(S) - [(3/6).Entropy(SSunny) + (1/6).Entropy(SRainy) + (2/6).Entropy(SCloudy)] = Entropy(S) - (2/6).Entropy(SCloudy) = Entropy(S) - (2/6)[- (1/2)log2(1/2) - (1/2)log2(1/2)] = 0.917 - 0.333 = 0.584 62 May 3, 2014 CuuDuongThanCong.com Cao Hoang Tru CSE Faculty - HCMUT https://fb.com/tailieudientucntt Example •  Entropy(S) = - p+log2p+ - p-log2p- = - (4/6)log2(4/6) - (2/6)log2(2/6) = 0.389 + 0.528 = 0.917 •  Gain(S, Water) = Entropy(S) - ∑v∈{Warm, Cool}(|Sv|/|S|)Entropy(Sv) = Entropy(S) - [(3/6).Entropy(SWarm) + (3/6).Entropy(SCool)] = Entropy(S) - (3/6).2.[- (2/3)log2(2/3) - (1/3)log2(1/3)] = Entropy(S) - 0.389 - 0.528 =0 63 May 3, 2014 CuuDuongThanCong.com Cao Hoang Tru CSE Faculty - HCMUT https://fb.com/tailieudientucntt Example Sky Sunny Yes Rainy No Cloudy ? •  Gain(SCloudy, AirTemp) = Entropy(SCloudy) - ∑v∈{Warm, Cold}(|Sv|/|S|)Entropy(Sv) =1 •  Gain(SCloudy, Humidity) = Entropy(SCloudy) - ∑v∈{Normal, High}(|Sv|/|S|)Entropy(Sv) =0 64 May 3, 2014 CuuDuongThanCong.com Cao Hoang Tru CSE Faculty - HCMUT https://fb.com/tailieudientucntt Inductive Bias •  Hypothesis space: complete! 65 May 3, 2014 CuuDuongThanCong.com Cao Hoang Tru CSE Faculty - HCMUT https://fb.com/tailieudientucntt Inductive Bias •  Hypothesis space: complete! •  Shorter trees are preferred over larger trees •  Prefer the simplest hypothesis that fits the data 66 May 3, 2014 CuuDuongThanCong.com Cao Hoang Tru CSE Faculty - HCMUT https://fb.com/tailieudientucntt Inductive Bias •  Decision Tree algorithm: searches incompletely thru a complete hypothesis space ⇒ Preference bias •  Cadidate-Elimination searches completely thru an incomplete hypothesis space ⇒ Restriction bias 67 May 3, 2014 CuuDuongThanCong.com Cao Hoang Tru CSE Faculty - HCMUT https://fb.com/tailieudientucntt Overfitting •  h∈H is said to overfit the training data if there exists h’∈H, such that h has smaller error than h’ over the training examples, but h’ has a smaller error than h over the entire distribution of instances 68 May 3, 2014 CuuDuongThanCong.com Cao Hoang Tru CSE Faculty - HCMUT https://fb.com/tailieudientucntt Overfitting •  h∈H is said to overfit the training data if there exists h’∈H, such that h has smaller error than h’ over the training examples, but h’ has a smaller error than h over the entire distribution of instances: –  There is noise in the data –  The number of training examples is too small to produce a representative sample of the target concept 69 May 3, 2014 CuuDuongThanCong.com Cao Hoang Tru CSE Faculty - HCMUT https://fb.com/tailieudientucntt Overfitting Lỗi tập kiểm tra tập huấn luyện học h học h’ 70 May 3, 2014 CuuDuongThanCong.com Thời gian hoïc Cao Hoang Tru CSE Faculty - HCMUT https://fb.com/tailieudientucntt Homework Exercises 3-1→3.4 (Chapter 3, ML textbook) 71 May 3, 2014 CuuDuongThanCong.com Cao Hoang Tru CSE Faculty - HCMUT https://fb.com/tailieudientucntt .. .Machine Learning •  What is learning? Cao Hoang Tru CSE Faculty - HCMUT CuuDuongThanCong.com 15 November 2011 https://fb.com/tailieudientucntt Machine Learning •  What is learning? ... https://fb.com/tailieudientucntt Machine Learning •  What is learning? Cao Hoang Tru CSE Faculty - HCMUT CuuDuongThanCong.com 12 15 November 2011 https://fb.com/tailieudientucntt Machine Learning •  What is learning? Experience... https://fb.com/tailieudientucntt Machine Learning •  Learning is an (endless) generalization or induction process Cao Hoang Tru CSE Faculty - HCMUT CuuDuongThanCong.com 14 15 November 2011 https://fb.com/tailieudientucntt Machine

Ngày đăng: 15/12/2021, 16:37

Tài liệu cùng người dùng

Tài liệu liên quan