• 沒有找到結果。

Introduction to Adaptive Boosting

N/A
N/A
Protected

Academic year: 2022

Share "Introduction to Adaptive Boosting"

Copied!
52
0
0

加載中.... (立即查看全文)

全文

(1)

Introduction to Adaptive Boosting

Introduction to Adaptive Boosting

Hsuan-Tien Lin

National Taiwan University

Machine Learning, Fall 2008

Hsuan-Tien Lin AdaBoost

(2)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

Apple Recognition Problem

Is this a picture of an apple?

We want to teach a class of 6 year olds.

Gather photos from NY Apple Asso. and Google Image.

Hsuan-Tien Lin AdaBoost

(3)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

Apple Recognition Problem

Is this a picture of an apple?

We want to teach a class of 6 year olds.

Gather photos from NY Apple Asso. and Google Image.

Hsuan-Tien Lin AdaBoost

(4)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

Apple Recognition Problem

Is this a picture of an apple?

We want to teach a class of 6 year olds.

Gather photos from NY Apple Asso. and Google Image.

Hsuan-Tien Lin AdaBoost

(5)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

Apple Recognition Problem

Is this a picture of an apple?

We want to teach a class of 6 year olds.

Gather photos from NY Apple Asso. and Google Image.

Hsuan-Tien Lin AdaBoost

(6)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

Apple Recognition Problem

Is this a picture of an apple?

We want to teach a class of 6 year olds.

Gather photos from NY Apple Asso. and Google Image.

Hsuan-Tien Lin AdaBoost

(7)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

Apple Recognition Problem

Is this a picture of an apple?

We want to teach a class of 6 year olds.

Gather photos from NY Apple Asso. and Google Image.

Hsuan-Tien Lin AdaBoost

(8)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

Apple Recognition Problem

Is this a picture of an apple?

We want to teach a class of 6 year olds.

Gather photos from NY Apple Asso. and Google Image.

Hsuan-Tien Lin AdaBoost

(9)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

Apple Recognition Problem

Is this a picture of an apple?

We want to teach a class of 6 year olds.

Gather photos from NY Apple Asso. and Google Image.

Hsuan-Tien Lin AdaBoost

(10)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

Apple Recognition Problem

Is this a picture of an apple?

We want to teach a class of 6 year olds.

Gather photos from NY Apple Asso. and Google Image.

Hsuan-Tien Lin AdaBoost

(11)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

Apple Recognition Problem

Is this a picture of an apple?

We want to teach a class of 6 year olds.

Gather photos from NY Apple Asso. and Google Image.

Hsuan-Tien Lin AdaBoost

(12)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

Apple Recognition Problem

Is this a picture of an apple?

We want to teach a class of 6 year olds.

Gather photos from NY Apple Asso. and Google Image.

Hsuan-Tien Lin AdaBoost

(13)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

Apple Recognition Problem

Is this a picture of an apple?

We want to teach a class of 6 year olds.

Gather photos from NY Apple Asso. and Google Image.

Hsuan-Tien Lin AdaBoost

(14)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

Apple Recognition Problem

Is this a picture of an apple?

We want to teach a class of 6 year olds.

Gather photos from NY Apple Asso. and Google Image.

Hsuan-Tien Lin AdaBoost

(15)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

Apple Recognition Problem

Is this a picture of an apple?

We want to teach a class of 6 year olds.

Gather photos from NY Apple Asso. and Google Image.

Hsuan-Tien Lin AdaBoost

(16)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

Apple Recognition Problem

Is this a picture of an apple?

We want to teach a class of 6 year olds.

Gather photos from NY Apple Asso. and Google Image.

Hsuan-Tien Lin AdaBoost

(17)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

Apple Recognition Problem

Is this a picture of an apple?

We want to teach a class of 6 year olds.

Gather photos from NY Apple Asso. and Google Image.

Hsuan-Tien Lin AdaBoost

(18)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

Apple Recognition Problem

Is this a picture of an apple?

We want to teach a class of 6 year olds.

Gather photos from NY Apple Asso. and Google Image.

Hsuan-Tien Lin AdaBoost

(19)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

Apple Recognition Problem

Is this a picture of an apple?

We want to teach a class of 6 year olds.

Gather photos from NY Apple Asso. and Google Image.

Hsuan-Tien Lin AdaBoost

(20)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

Apple Recognition Problem

Is this a picture of an apple?

We want to teach a class of 6 year olds.

Gather photos from NY Apple Asso. and Google Image.

Hsuan-Tien Lin AdaBoost

(21)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

Apple Recognition Problem

Is this a picture of an apple?

We want to teach a class of 6 year olds.

Gather photos from NY Apple Asso. and Google Image.

Hsuan-Tien Lin AdaBoost

(22)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

Apple Recognition Problem

Is this a picture of an apple?

We want to teach a class of 6 year olds.

Gather photos from NY Apple Asso. and Google Image.

Hsuan-Tien Lin AdaBoost

(23)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

Our Fruit Class Begins

Teacher: How would you describe an apple? Michael?

Michael: I think apples are circular.

(Class): Apples are circular.

Hsuan-Tien Lin AdaBoost

(24)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

Our Fruit Class Begins

Teacher: How would you describe an apple? Michael?

Michael: I think apples are circular.

(Class): Apples are circular.

Hsuan-Tien Lin AdaBoost

(25)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

Our Fruit Class Begins

Teacher: How would you describe an apple? Michael?

Michael: I think apples are circular.

(Class): Apples are circular.

Hsuan-Tien Lin AdaBoost

(26)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

Our Fruit Class Continues

Teacher: Being circular is a good feature for the apples. However, if you only say circular, you could make several mistakes.

What else can we say for an apple? Tina?

Tina: It looks like apples are red.

(Class): Apples are somewhat circular and somewhat red.

Hsuan-Tien Lin AdaBoost

(27)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

Our Fruit Class Continues

Teacher: Being circular is a good feature for the apples. However, if you only say circular, you could make several mistakes.

What else can we say for an apple? Tina?

Tina: It looks like apples are red.

(Class): Apples are somewhat circular and somewhat red.

Hsuan-Tien Lin AdaBoost

(28)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

Our Fruit Class Continues

Teacher: Being circular is a good feature for the apples. However, if you only say circular, you could make several mistakes.

What else can we say for an apple? Tina?

Tina: It looks like apples are red.

(Class): Apples are somewhat circular and somewhat red.

Hsuan-Tien Lin AdaBoost

(29)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

Our Fruit Class Continues

Teacher: Yes. Many apples are red. However, you could still make mistakes based on circular and red. Do you have any other suggestions, Joey?

Joey: Apples could also be green.

(Class): Apples are somewhat circular and somewhat red and possibly green.

Hsuan-Tien Lin AdaBoost

(30)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

Our Fruit Class Continues

Teacher: Yes. Many apples are red. However, you could still make mistakes based on circular and red. Do you have any other suggestions, Joey?

Joey: Apples could also be green.

(Class): Apples are somewhat circular and somewhat red and possibly green.

Hsuan-Tien Lin AdaBoost

(31)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

Our Fruit Class Continues

Teacher: Yes. Many apples are red. However, you could still make mistakes based on circular and red. Do you have any other suggestions, Joey?

Joey: Apples could also be green.

(Class): Apples are somewhat circular and somewhat red and possibly green.

Hsuan-Tien Lin AdaBoost

(32)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

Our Fruit Class Continues

Teacher: Yes. It seems that apples might be circular, red, green. But you may confuse them with tomatoes or peaches, right?

Any more suggestions, Jessica?

Jessica: Apples have stems at the top.

(Class): Apples are somewhat circular, somewhat red, possibly green, and may have stems at the top.

Hsuan-Tien Lin AdaBoost

(33)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

Our Fruit Class Continues

Teacher: Yes. It seems that apples might be circular, red, green. But you may confuse them with tomatoes or peaches, right?

Any more suggestions, Jessica?

Jessica: Apples have stems at the top.

(Class): Apples are somewhat circular, somewhat red, possibly green, and may have stems at the top.

Hsuan-Tien Lin AdaBoost

(34)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

Our Fruit Class Continues

Teacher: Yes. It seems that apples might be circular, red, green. But you may confuse them with tomatoes or peaches, right?

Any more suggestions, Jessica?

Jessica: Apples have stems at the top.

(Class): Apples are somewhat circular, somewhat red, possibly green, and may have stems at the top.

Hsuan-Tien Lin AdaBoost

(35)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

Put Intuition to Practice

Intuition

Combine simple rules to approximate complex function.

Emphasize incorrect data to focus on valuable information.

AdaBoost Algorithm (Freund and Schapire 1997) Input: training examples Z = {(xn,yn)}Nn=1. For t = 1, 2, · · · , T ,

Learn a simple rule ht from emphasized training examples.

Get the confidence αt of such rule

Emphasize the training examples that do not agree with ht. Output: combined function H(x ) = sign

PT

t=1αtht(x )

Hsuan-Tien Lin AdaBoost

(36)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

Put Intuition to Practice

Intuition

Combine simple rules to approximate complex function.

Emphasize incorrect data to focus on valuable information.

AdaBoost Algorithm (Freund and Schapire 1997) Input: training examples Z = {(xn,yn)}Nn=1. For t = 1, 2, · · · , T ,

Learn a simple rule ht from emphasized training examples.

Get the confidence αt of such rule

Emphasize the training examples that do not agree with ht. Output: combined function H(x ) = sign

PT

t=1αtht(x )

Hsuan-Tien Lin AdaBoost

(37)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

Put Intuition to Practice

Intuition

Combine simple rules to approximate complex function.

Emphasize incorrect data to focus on valuable information.

AdaBoost Algorithm (Freund and Schapire 1997) Input: training examples Z = {(xn,yn)}Nn=1. For t = 1, 2, · · · , T ,

Learn a simple rule ht from emphasized training examples.

Get the confidence αt of such rule

Emphasize the training examples that do not agree with ht. Output: combined function H(x ) = sign

PT

t=1αtht(x )

Hsuan-Tien Lin AdaBoost

(38)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

Put Intuition to Practice

Intuition

Combine simple rules to approximate complex function.

Emphasize incorrect data to focus on valuable information.

AdaBoost Algorithm (Freund and Schapire 1997) Input: training examples Z = {(xn,yn)}Nn=1. For t = 1, 2, · · · , T ,

Learn a simple rule ht from emphasized training examples.

Get the confidence αt of such rule

Emphasize the training examples that do not agree with ht. Output: combined function H(x ) = sign

PT

t=1αtht(x )

Hsuan-Tien Lin AdaBoost

(39)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

Put Intuition to Practice

Intuition

Combine simple rules to approximate complex function.

Emphasize incorrect data to focus on valuable information.

AdaBoost Algorithm (Freund and Schapire 1997) Input: training examples Z = {(xn,yn)}Nn=1. For t = 1, 2, · · · , T ,

Learn a simple rule ht from emphasized training examples.

Get the confidence αt of such rule

Emphasize the training examples that do not agree with ht. Output: combined function H(x ) = sign

PT

t=1αtht(x )

Hsuan-Tien Lin AdaBoost

(40)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

Put Intuition to Practice

Intuition

Combine simple rules to approximate complex function.

Emphasize incorrect data to focus on valuable information.

AdaBoost Algorithm (Freund and Schapire 1997) Input: training examples Z = {(xn,yn)}Nn=1. For t = 1, 2, · · · , T ,

Learn a simple rule ht from emphasized training examples.

Get the confidence αt of such rule

Emphasize the training examples that do not agree with ht. Output: combined function H(x ) = sign

PT

t=1αtht(x )

Hsuan-Tien Lin AdaBoost

(41)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

Some More Details

AdaBoost Algorithm

Input: training examples Z = {(xn,yn)}Nn=1. For t = 1, 2, · · · , T ,

Learn a simple rule ht from emphasized training examples.

How? Choose a ht ∈ H with minimum emphasized error.

Get the confidence αt of such rule

How? An ht with lower error should get higher αt.

Emphasize the training examples that do not agree with ht. How? Maintain an emphasis value unper example.

Output: combined function H(x ) = sign PT

t=1αtht(x ) Let’s see some demos.

Hsuan-Tien Lin AdaBoost

(42)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

Some More Details

AdaBoost Algorithm

Input: training examples Z = {(xn,yn)}Nn=1. For t = 1, 2, · · · , T ,

Learn a simple rule ht from emphasized training examples.

How? Choose a ht ∈ H with minimum emphasized error.

Get the confidence αt of such rule

How? An ht with lower error should get higher αt.

Emphasize the training examples that do not agree with ht. How? Maintain an emphasis value unper example.

Output: combined function H(x ) = sign PT

t=1αtht(x ) Let’s see some demos.

Hsuan-Tien Lin AdaBoost

(43)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

Some More Details

AdaBoost Algorithm

Input: training examples Z = {(xn,yn)}Nn=1. For t = 1, 2, · · · , T ,

Learn a simple rule ht from emphasized training examples.

How? Choose a ht ∈ H with minimum emphasized error.

Get the confidence αt of such rule

How? An ht with lower error should get higher αt.

Emphasize the training examples that do not agree with ht. How? Maintain an emphasis value unper example.

Output: combined function H(x ) = sign PT

t=1αtht(x ) Let’s see some demos.

Hsuan-Tien Lin AdaBoost

(44)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

Some More Details

AdaBoost Algorithm

Input: training examples Z = {(xn,yn)}Nn=1. For t = 1, 2, · · · , T ,

Learn a simple rule ht from emphasized training examples.

How? Choose a ht ∈ H with minimum emphasized error.

Get the confidence αt of such rule

How? An ht with lower error should get higher αt.

Emphasize the training examples that do not agree with ht. How? Maintain an emphasis value unper example.

Output: combined function H(x ) = sign PT

t=1αtht(x ) Let’s see some demos.

Hsuan-Tien Lin AdaBoost

(45)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

Some More Details

AdaBoost Algorithm

Input: training examples Z = {(xn,yn)}Nn=1. For t = 1, 2, · · · , T ,

Learn a simple rule ht from emphasized training examples.

How? Choose a ht ∈ H with minimum emphasized error.

Get the confidence αt of such rule

How? An ht with lower error should get higher αt.

Emphasize the training examples that do not agree with ht. How? Maintain an emphasis value unper example.

Output: combined function H(x ) = sign PT

t=1αtht(x ) Let’s see some demos.

Hsuan-Tien Lin AdaBoost

(46)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

Some More Details

AdaBoost Algorithm

Input: training examples Z = {(xn,yn)}Nn=1. For t = 1, 2, · · · , T ,

Learn a simple rule ht from emphasized training examples.

How? Choose a ht ∈ H with minimum emphasized error.

Get the confidence αt of such rule

How? An ht with lower error should get higher αt.

Emphasize the training examples that do not agree with ht. How? Maintain an emphasis value unper example.

Output: combined function H(x ) = sign PT

t=1αtht(x ) Let’s see some demos.

Hsuan-Tien Lin AdaBoost

(47)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

Some More Details

AdaBoost Algorithm

Input: training examples Z = {(xn,yn)}Nn=1. For t = 1, 2, · · · , T ,

Learn a simple rule ht from emphasized training examples.

How? Choose a ht ∈ H with minimum emphasized error.

Get the confidence αt of such rule

How? An ht with lower error should get higher αt.

Emphasize the training examples that do not agree with ht. How? Maintain an emphasis value unper example.

Output: combined function H(x ) = sign PT

t=1αtht(x ) Let’s see some demos.

Hsuan-Tien Lin AdaBoost

(48)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

Some More Details

AdaBoost Algorithm

Input: training examples Z = {(xn,yn)}Nn=1. For t = 1, 2, · · · , T ,

Learn a simple rule ht from emphasized training examples.

How? Choose a ht ∈ H with minimum emphasized error.

Get the confidence αt of such rule

How? An ht with lower error should get higher αt.

Emphasize the training examples that do not agree with ht. How? Maintain an emphasis value unper example.

Output: combined function H(x ) = sign PT

t=1αtht(x ) Let’s see some demos.

Hsuan-Tien Lin AdaBoost

(49)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

The Final Version

Input: Z = {(xn,yn)}Nn=1.Set un= N1 for all n.

For t = 1, 2, · · · , T ,

Learn a simple rule ht such that ht solves

minh N

X

n=1

un· I[yn6= h(xn)].

Compute the error t =PN

n=1 un

PN

m=1um · I[yn6= h(xn)]and the confidence

αt =1

2ln1 − t

t

Emphasize the training examples that do not agree with ht: un=un· exp

−αtynht(xn) . Output: combined function H(x ) = sign

PT

t=1αtht(x )

Hsuan-Tien Lin AdaBoost

(50)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

The Final Version

Input: Z = {(xn,yn)}Nn=1.Set un= N1 for all n.

For t = 1, 2, · · · , T ,

Learn a simple rule ht such that ht solves

minh N

X

n=1

un· I[yn6= h(xn)].

Compute the error t =PN n=1 un

PN

m=1um · I[yn6= h(xn)]and the confidence

αt =1

2ln1 − t

t

Emphasize the training examples that do not agree with ht: un=un· exp

−αtynht(xn) . Output: combined function H(x ) = sign

PT

t=1αtht(x )

Hsuan-Tien Lin AdaBoost

(51)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

The Final Version

Input: Z = {(xn,yn)}Nn=1.Set un= N1 for all n.

For t = 1, 2, · · · , T ,

Learn a simple rule ht such that ht solves

minh N

X

n=1

un· I[yn6= h(xn)].

Compute the error t =PN n=1 un

PN

m=1um · I[yn6= h(xn)]and the confidence

αt =1

2ln1 − t

t

Emphasize the training examples that do not agree with ht: un=un· exp

−αtynht(xn) . Output: combined function H(x ) = sign

PT

t=1αtht(x )

Hsuan-Tien Lin AdaBoost

(52)

Introduction to Adaptive Boosting Intuition

Adaptive Boosting (AdaBoost)

The Final Version

Input: Z = {(xn,yn)}Nn=1.Set un= N1 for all n.

For t = 1, 2, · · · , T ,

Learn a simple rule ht such that ht solves

minh N

X

n=1

un· I[yn6= h(xn)].

Compute the error t =PN n=1 un

PN

m=1um · I[yn6= h(xn)]and the confidence

αt =1

2ln1 − t

t

Emphasize the training examples that do not agree with ht: un=un· exp

−αtynht(xn) . Output: combined function H(x ) = sign

PT

t=1αtht(x )

Hsuan-Tien Lin AdaBoost

參考文獻

相關文件

Machine Learning for Modern Artificial Intelligence.. Hsuan-Tien

(Another example of close harmony is the four-bar unaccompanied vocal introduction to “Paperback Writer”, a somewhat later Beatles song.) Overall, Lennon’s and McCartney’s

Hsuan-Tien Lin (NTU CSIE) Machine Learning Basics

Lecture 5: Training versus Testing Hsuan-Tien Lin (林 軒田) htlin@csie.ntu.edu.tw?. Department of

Hsuan-Tien Lin (NTU CSIE) Machine Learning Techniques 3/24.:. Deep Learning Deep

instance method binding: dynamic, depending on run-time

• view from reference: one compatible reference can point to many advanced contents. • view from method: one compatible method “contract”, many different

• manipulating object status (partially done: instance variable assignments).. • deleting objects —[TODO 3]