Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – [email protected]...

61

Transcript of Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – [email protected]...

Page 1: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.
Page 2: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

Homework 1 Reminder

Due date: 21.11.2011 (till 23:59) Submission:

[email protected]– Write the names of students in your team– Send only one e-mail

Page 3: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

Midterm 1 Reminder

Date: 24.11.211 14:30 – 16:20 Place: 1029, 2009

Page 4: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

Hidden Markov Models

Hidden Markow Models:– A hidden Markov model (HMM) is a statistical

model,– in which the system being modeled is

assumed to be a Markov process (Memoryless process: its future and past are independent ),

– with hidden states.

Page 5: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

Hidden Markov Models

Hidden Markow Models:– Has a set of states each of which has limited

number of transitions and emissions,– Each transition between states has an

assisgned probability,– Each model strarts from start state and ends

in end state,

Page 6: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

Hidden Markov Models

Hidden Markow Models parameters:– A set of finite number of states, Si,– The transition probability from state Si to Sj, aij,– The emission probability density of a symbol ω– in state Si

Page 7: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

Hidden Markov Models

Hidden Markow Models parameters:– Firstly discuss:

Morkov Models, Markov Assumption

Page 8: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

Hidden Markov Models

Markow Models and Assumption (cont.):– To understand HMMs:

Talk about weather, Assume there are three types of weather:

– Sunny,

– Rainy,

– Foggy.

Assume weather does not change during the day (if it is sunny it will sunny all the day)

Page 9: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

Hidden Markov Models

Markow Models and Assumption (cont.): Weather prediction is about the what would be the weather tomorrow,– Based on the observations on the past.

Page 10: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

Hidden Markov Models

Markow Models and Assumption (cont.): Weather at day n is

– qn depends on the known weathers of the past days (qn-1, qn-2,…)

},,{ foggyrainysunnyqn

Page 11: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

Hidden Markov Models

Markow Models and Assumption (cont.): We want to find that:

– means given the past weathers what is the probability of any possible weather of today.

Page 12: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

Hidden Markov Models

Markow Models and Assumption (cont.): For example:

if we knew the weather for last three days was:

the probability that tomorrow would be is:

P(q4 = | q3 = , q2 = , q1 = )

Page 13: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

Hidden Markov Models

Markow Models and Assumption (cont.):– For example:

this probability could be infered from the statistics of past observations

the problem: the larger n is, the more observations we must collect.

– for example: if n = 6 we need 3(6-1) = 243 past observations.

Page 14: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

Hidden Markov Models

Markow Models and Assumption (cont.):– Therefore, make a simplifying assumption Markov

assumption: For sequence:

the weather of tomorrow only depends on today (first order Markov model)

Page 15: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

Hidden Markov Models

Markow Models and Assumption (cont.): Examples:

The probabilities table:

Page 16: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

Hidden Markov Models

Markow Models and Assumption (cont.): Examples:

HMM:

Page 17: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

Hidden Markov Models

Markow Models and Assumption (cont.): Examples:

Given that day the weather is sunny, what is the probability that tomorrow is sunny and the next day is rainy ?

Markov assumption

Page 18: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

Hidden Markov Models

Markow Models and Assumption (cont.): Examples:

If the weather yesterday was rainy and today is foggy what is the probability that tomorrow it will be sunny?

Page 19: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

Hidden Markov Models

Markow Models and Assumption (cont.):– Examples:

If the weather yesterday was rainy and today is foggy what is the probability that tomorrow it will be sunny?

Markov assumption

Page 20: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

Hidden Markov Models

Hidden Markov Models (HMMs):– What is HMM:

Suppose that you are locked in a room for several days, you try to predict the weather outside, The only piece of evidence you have is whether the

person who comes into the room bringing your daily meal is carrying an umbrella or not.

Page 21: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

Hidden Markov Models

Hidden Markov Models (HMMs):– What is HMM (cont.):

assume probabilities as seen in the table:

Page 22: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

Hidden Markov Models

Hidden Markov Models (HMMs):– What is HMM (cont.):

Now the actual weather is hidden from you. You can not directly see what is the weather.

Page 23: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

Hidden Markov Models

Hidden Markov Models (HMMs):– What is HMM (cont.):

Finding the probability of a certain weather

is based on the observations xi:

},,{ foggyrainysunnyqn

Page 24: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

Hidden Markov Models

Hidden Markov Models (HMMs):– What is HMM (cont.):

Using Bayes rule:

For n days:

Page 25: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

Hidden Markov Models

Hidden Markov Models (HMMs):– What is HMM (cont.):

We can omit So:

With Markov assumptions:

Page 26: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

Hidden Markov Models

Hidden Markov Models (HMMs):– Examples:

Suppose the day you were locked in it was sunny. The next day, the caretaker carried an umbrella into the room.

You would like to know, what the weather was like on this second day.

Page 27: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

Hidden Markov Models

Hidden Markov Models (HMMs):– Examples:

Calculate 3 probabilities:

Page 28: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

Hidden Markov Models

Hidden Markov Models (HMMs):– Examples:

Consider the event with highest value. It is most likely to happen.

Page 29: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

Hidden Markov Models

Hidden Markov Models (HMMs):– Another Examples:

Suppose you do not know how the weather was when your were locked in. The following three days the caretaker always comes without an umbrella. Calculate the likelihood for the weather on these three days to have been

Page 30: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

Hidden Markov Models

Hidden Markov Models (HMMs):– Another Examples:

As you do not know how the weather is on the first day, you assume the 3 weather situations are equi-probable on this day and the prior probability for sun on day one is therefore

Page 31: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

Hidden Markov Models

Hidden Markov Models (HMMs):– Another Examples:

Assumption:

Page 32: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

Hidden Markov Models

Hidden Markov Models:– Another Examples:

Page 33: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

33Discrete Markov Processes

(Markov Chains)

Page 34: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

34

First-Order Markov Models

Page 35: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

35

First-Order Markov Models

Page 36: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

36

First-Order Markov Models

Page 37: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

37First-Order Markov Model

Examples

Page 38: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

38First-Order Markov Model

Examples

Page 39: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

39First-Order Markov Model

Examples

Page 40: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

40

First-Order Markov Models

Page 41: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

41

First-Order Markov Models

Page 42: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

42

First-Order Markov Models

Page 43: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

43

First-Order Markov Models

Page 44: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

44

First-Order HMM Examples

Page 45: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

45

First-Order HMM Examples

Page 46: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

46

First-Order HMM Examples

Page 47: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

47

First-Order HMM Examples

Page 48: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

48Three Fundamental Problems for

HMMs

Page 49: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

49

HMM Evaluation Problem

Page 50: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

50

HMM Evaluation Problem

Page 51: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

51

HMM Evaluation Problem

Page 52: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

52

HMM Evaluation Problem

Page 53: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

53

HMM Evaluation Problem

Page 54: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

54

HMM Decoding Problem

Page 55: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

55

HMM Decoding Problem

Page 56: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

56

HMM Decoding Problem

Page 57: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

57

HMM Learning Problem

Page 58: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

58

HMM Learning Problem

Page 59: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

59

HMM Learning Problem

Page 60: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

60

HMM Learning Problem

Page 61: Homework 1 Reminder Due date: 21.11.2011 (till 23:59) Submission: – ukaya@atilim.edu.tr ukaya@atilim.edu.tr – Write the names of students in your team.

References

R.O. Duda, P.E. Hart, and D.G. Stork, Pattern Classification, New York: John Wiley, 2001. Selim Aksoy, “Pattern Recognition Course Materials”, Bilkent University, 2011.