

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Machine Learning (CS 5350/CS 6350) 01 Mar 2007
We now return to supervised learning for a bit. However, we are interested in solving problems whose output has structure. We will begin with the simplest non-trival structure: sequences. There are lots of problems from langauge and biology that fit in this paradigm.
Sequence labeling is the following problem: we get a sequence of M inputs and want to produce a sequence of M labels. Training data will be N such input/output pairs.
Example: “The/det man/noun ate/verb a/det sandwith/noun with/prep mayo/noun” We get the sentence and want to produce the part of speech labels. We will usually talk about a label set Y of size L.
Several non-options:
We adopt a Markov model. This model makes two assumptions:
Number 2 is called a K-th order Markov assumption.
The generative model looks something like:
(a) Choose a label ym conditioned on {ym− 1 ,... , ym−K } (b) Generate input xm conditioned on ym
For simplicity we will stick with K = 1; the extension is straightforward.
For this, we need three ingredients:
Machine Learning (CS 5350/CS 6350) 2
Putting this all together, the joint probability of an input sequence x and state sequence y (both of length M ) is:
p(x, y | π, α, β) = πy 1 βy 1 ,x 1
m=
αym− 1 ,ym βym,xm
It becomes frustrating to have to separate out the first element all the time. So what we’ll do instead is define y 0 to be a state with a unique label z and define αz,· = π. Then, we get:
p(x, y | α, β) =
m=
αym− 1 ,ym βym,xm
m=
l
v
β^1 l,v[xm=v]
p
α^1 p,l[ym−^1 =p]
) 1 [ym=l]
Given data, we can estimate α and β exactly as in the naive Bayes classification model:
αˆp,l =
βˆl,v = # of times^ v^ has label^ l
We can generalize this to a simple naive Bayes model over emissions, rather than the “label emits word” part. I.e., if xm itself is a bunch of features, xm, 1 ,... , xm,D , then bel becomes a vector of length D instead of V , but everything else remains the same.
The key problem in such models is at test time: given a word sequence x, find the best label sequence y. This question is somewhat ill-posed: there are many possible interpretations of “best:”
m p(x, ym^ |^ α, β)
Typically people consider the first because it is “parsimonious.”
This problem is most easily considered by picturing a lattice of possible states, with connections between adjacent time steps.
We ask ourselves: what is the probability that the most likely path will pass through state l at time m? We store this as Am,l; leaving off conditioning on α and β, we have:
Am,l = max y1:m− 1 p(y1:m− 1 , x1:m− 1 , ym = l)
We can compute this probability recursively: