machine learning 참고 자료 2 learning definition learning is the improvement of performance in...

50
Machine Learning 참참 참참

Upload: elaine-toney

Post on 01-Apr-2015

218 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

Machine Learning 참고 자료

Page 2: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

2

Learning Definition

Learning is the improvement of performance in some environment through the acquisition of knowledge resulting from experience in that environment.

Page 3: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

3

Machine Learning: Tasks Supervised Learning

Learn fw from training set D={(x,y)} s.t.

Classification: y is discrete Regression: y is continuous

Unsupervised Learning Learn fw from D={(x)} s.t. Density Estimation Compression, Clustering

)()( xxw fyf

xxw )(f

Page 4: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

4

Machine Learning: Methods Symbolic Learning

Version Space Learning Neural Learning

Multilayer Perceptrons (MLPs) Evolutionary Learning

Genetic Algorithms Probabilistic Learning

Bayesian Networks (BNs) Other Machine Learning Methods

Decision Trees (DTs)

Page 5: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

5

Applications of Machine Learning Driving an autonomous vehicle

무인 자동차 운전 , 센서기반 제어 등에도 응용 Classifying new astronomical structures

천체 물체 분류 , Decision tree learning 기법 사용 Playing world-class Backgammon

실제 게임을 통해서 전략을 학습 , 탐색공간 문제에 응용

Page 6: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

6

A Definition of Learning: Well-posed Learning Problems

Definition 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.

A class of tasks T Experience E Performance measure P

Page 7: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

7

Checkers Problem (1/2)

말은 대각선으로만 움직일 수 있다 . 맞은편 끝까지 가기 전에는 앞으로만 진행할 수 있다 . 대각선에 상대편 말이 있을 경우 그 말을 없앨수 있다 . 게임은 한편 말이 모두 없어지면 끝난다 .

Page 8: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

8

Checkers Problem (2/2) homepage

http://www.geocities.com/Heartland/7134/Green/grprechecker.htm http://www.acfcheckers.com

Page 9: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

9

A Checkers Learning Problem Three Features: 학습문제의 정의

The class of tasks The measure of performance to be improved The source of experience

Example Task T: playing checkers Performance measure P: percent of games won against

opponent Training experience E: playing practice games against

itself

Page 10: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

10

Designing a Learning System Choosing the Training Experience Choosing the Target Function Choosing a Representation for the Target

Function Choosing a Function Approximation

Algorithm

Page 11: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

11

Choosing the Training Experience (1/2) Key Attributes

Direct/indirect feedback Direct feedback: checkers state and correct move Indirect feedback: move sequence and final

outcomes Degree of controlling the sequence of training

example Learner 가 학습 정보를 얻을 때 teacher 의 도움을

받는 정도

Page 12: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

12

Choosing the Training Experience (2/2)

Distribution of examples 시스템의 성능을 평가하는 테스트의 예제 분포를 잘

반영해야 함

Page 13: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

13

Choosing the Target Function (1/2) A function that chooses the best move M fo

r any B ChooseMove : B M Difficult to learn

It is useful to reduce the problem of improving performance P at task T to the problem of learning some particular target function.

Page 14: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

14

Choosing the Target Function (2/2) An evaluation function that assigns a

numerical score to any B V : B R

Page 15: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

15

Target Function for the Checkers Problem Algorithm

If b is a final state that is won, then V(b) = 100 ……. that is lost, then V(b)=-100 ……. that is drawn, then V(b)=0 If b is not a final state, then V(b)=V(b’), where

b’ is the best final board state

Page 16: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

16

Choosing a Representation for the Target Function Describing the function

Tables Rules Polynomial functions Neural nets

Trade-off in choice Expressive power Size of training data

^

V

Page 17: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

17

Linear Combination as Representation

(b) = w0 + w1x1 + w2x2 + w3x3 +w4x4 + w5x5 + w6x6

x1: # of black pieces on the board

x2: # of red pieces on the board

x3: # of black kings on the board

x4: # of red kings on the board

x5: # of black pieces threatened by red

x6: # of red pieces threatened by black

w1 - w6: weights

^

V

Page 18: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

18

Partial Design of a Checkers Learning Program Task T: playing checkers Performance measure P: Percent of games won in

the world tournament Training experience E: games played against itself Target function V: Board R Target function representation (b) = w0 + w1x1 + w2x2 + w3x3 + w4x4 + w5x5 + w6x6

^

V

Page 19: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

19

Choosing a Function Approximation Algorithm A training example is represented as an ordered pa

ir <b, Vtrain(b)> b: board state Vtrain(b): training value for b

Instance: “black has won the game (x2 = 0)

<<x1=3, x2=0, x3=1, x4=0, x5=0, x6=0>, +100>

Page 20: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

20

Choosing a Function Approximation Algorithm Estimating training values for intermediate

board states Vtrain(b) (Successor(b)) : current approximation to V Successor(b): the next board state

^

V^

V

Page 21: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

21

Adjusting the Weights (1/2) Choosing wi to best fit the training example

s Minimize the squared error

ampletrainingexbVb

train

train

bVbVE)(,

2))(')((

Page 22: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

22

Adjusting the Weights (2/2) LMS Weight Update Rule

For each training example <b, Vtrain(b)>

1. Use the current weights to calculate V’(b)

2. For each weight wi, update it as

itrainii xbVbVww ))()((^

Page 23: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

23

Sequence of Design ChoicesDetermine Type of Training Experience

Determine Target Function

Determine RepresentationOf Learned Function

Determine Learning Algorithm

Table of correct moves

Games against experts Games against

self

Board move

Board value

PolynomialLinear functionof six features

Arfiticial NN

Gradientdescent

Complete Design

LinearProgramming

Page 24: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

24

Perspectives in ML “Learning as search in a space of possible h

ypotheses” Representations for hypotheses

Linear functions Logical descriptions Decision trees Neural networks

Page 25: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

25

Perspectives in ML Learning methods are characterized by their

search strategies and by the underlying structure of the search spaces.

Page 26: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

26

Summary 기계학습은 다양한 응용분야에서 실용적

가치가 크다 . 많은 데이터로부터 규칙성을 발견하는 문제 (data

mining) 문제의 성격 규명이 어려워 효과적인 알고리즘을

개발할 지식이 없는 문제 영역 (human face recognition)

변화하는 환경에 동적으로 적응하여야 하는 문제 영역 (manufacturing process control)

Page 27: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

27

Summary 기계학습은 다양한 다른 학문 분야와 밀접히

관련된다 . 인공지능 , 확률통계 , 정보이론 , 계산이론 ,

심리학 , 신경과학 , 제어이론 , 철학 잘 정의된 학습 문제는 다음을 요구한다 .

문제 (task) 의 명확한 기술 , 성능평가 기준 , 훈련경험을 위한 사례

Page 28: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

28

Summary 기계학습 시스템의 설계 시에는 다음 사항을 고려

하여야 한다 . 훈련경험의 유형 선택 학습할 목표함수 목표함수에 대한 표현 훈련 예로부터 목표함수를 학습하기 위한 알고리즘

Page 29: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

29

Summary 학습은 가능한 가설 공간에서 주어진 훈련 예와

다른 배경지식을 가장 잘 반영하는 하나의 가설을 탐색하는 탐색이다 . 다양한 학습 방법은 서로 다른 가설공간의 형태와 이

공간 내에서 탐색을 수행하는 전략에 의해 규정 지어진다 .

Page 30: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

Neural Networks

Page 31: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

31

Biological motivation

Neuron receives signals from other neurons through its dendrites

Transmits signals generated by its cell body along the axon

Network of Neuron

Page 32: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

32

Neural Network Representations

The primitive unit(e.g. perceptron) N input signals weighted sum threshold function generate

an output

A learning process in the ANN Learning process involves choosing values for the weights w0, …,

wn

Learning rules How network weights are updated?

Page 33: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

33

Gradient descent and the delta rule

The delta rule Linear unit for which the output o is given by

Measure for the training error of a hypothesis

d : the set of traing examples td : the target output for training example d

od : the output of the linear unit for training example d We can characterize E as a function of

xwxo )(

w

Page 34: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

34

Gradient descent and the delta rule

Page 35: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

35

Gradient descent and the delta rule Derivation of the gradient descent rule

Direction of steepest descent along the error space

Derivative E with respect to each component of

The negative of this vector therefore gives the direction of steepest decrease )(wE

w

Page 36: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

36

Gradient descent and the delta rule Training rule for gradient descent

wi ← wi + wi where,

Efficient way of calculating the gradient

So,idd

Dddi xotw )(

Page 37: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

37

Gradient descent and the delta rule

If is too large, the gradient descent search runs the risk of overstepping the minimum

gradually reduce the value of

Page 38: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

38

Multilayer Networks Why multilayer network?

Single perceptrons can only express linear decision surfaces

So, add an extra(hidden) layer between the inputs and outputs

E.g.) the speech recognition task

Page 39: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

39

Multilayer Networks Sigmoid function

Page 40: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

40

E defined as a sum of the squared errors over all the output units k for all the training examples d.

Dd outputsk

kdkd otwE 2)(2

1)(

Error Function for BP

Page 41: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

41

BP Algorithm

Page 42: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

42

After a fixed number of iterations (epochs)

Once the error falls below some threshold Once the validation error meets some

criterion

Learning Until…

Page 43: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

Self Organizing Map

Page 44: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

44

Introduction Unsupervised Learning SOM (Self Organizing Map)

Visualization Abstraction

Page 45: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

45

SOM structures

Neighborhood

Input Layer

Output Layer

Page 46: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

46

Data to be clustered

Page 47: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

47

After 100 iterations

Page 48: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

48

After 500 iterations

Page 49: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

49

After 2000 iterations

Page 50: Machine Learning 참고 자료 2 Learning Definition Learning is the improvement of performance in some environment through the acquisition of knowledge resulting

50

After 10000 iterations