Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
courses:rg:2013:memm [2013/03/27 16:56] vandemos |
courses:rg:2013:memm [2014/10/12 15:04] (current) popel |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Maximum Entropy Markov Models - Questions | + | ===== Maximum Entropy Markov Models - Questions ===== |
- | **1. Explain (roughly) how the new formula for α_t+1(s) is derived (i.e. formula 1 in the paper).** | + | 1. Explain (roughly) how the new formula for α_t+1(s) is derived (i.e. formula 1 in the paper). |
- | The formula is used for calculating the foward probabilities at each time step t, meaning it needs to use the forward probability calculated so far, the α_t(s' | + | |
- | It is important to note that these two formulas are not equal. The original formula belongs to a generative joint model, whereas the new model belongs to a conditional model. | + | 2. Section 2.1 states "we will split P(s|s',o) into |S| separately trained transition functions" |
- | **2. Section 2.1 states "we will split P(s|s', | + | 3. Let S= {V,N} (verb and non-verb) |
- | + | ||
- | This was the bonus question since the authors of the paper do not clearly state their reasons for splitting the functions. The only advantage we came up with during the discussion was the possibility for parallelization. One main disadvantage of this splitting is mentioned in section 2.6 of the paper: the O(|S|^2) transition parameters and data sparsity. | + | |
- | + | ||
- | Clearly we are not the only ones unsure about this splitting, as shown by the analysis of this very same paper by Hal and Piyush: [[http:// | + | |
- | + | ||
- | **3. Let S= {V,N} (verb and non-verb) | + | |
Training data = he/N can/V can/V a/N can/N | Training data = he/N can/V can/V a/N can/N | ||
// | // | ||
Line 19: | Line 12: | ||
b3 = current word is “a” and next word is “can” | b3 = current word is “a” and next word is “can” | ||
When implementing MEMM you need to define s_0, i.e. the previous state before the first token. It may be a special NULL, but for simplicity let’s define it as N. | When implementing MEMM you need to define s_0, i.e. the previous state before the first token. It may be a special NULL, but for simplicity let’s define it as N. | ||
- | a) What are the states (s) and observations (o) for this training data?** | + | a) What are the states (s) and observations (o) for this training data? |
- | States (s): {N,V} | + | |
- | Observations (o): {he, | + | |
- | + | ||
- | **b) Equation (2) defines features f_a based on // | + | |
- | There are three binary features and two types of states, so 6 f_a features in total. | + | |
- | + | ||
- | **c) Equation (3) defines constraints. How many such constraints do we have?** | + | |
- | There are six f_a features and two types of (previous) states, so 12 constraints in total. | + | |
- | + | ||
- | **d) List all the constraints involving feature b2, i.e. substitute (whenever possible) concrete numbers into Equation (3).** | + | |
- | For s'=N and a = <b2, N> | + | |
- | LHS: | + | |
- | (1/ | + | |
- | = (1/ | + | |
- | RHS: | + | |
- | (1/ | + | |
- | = (1/ | + | |
- | + | ||
- | For s'=N and a = <b2, V> | + | |
- | LHS: | + | |
- | (1/ | + | |
- | = (1/ | + | |
- | RHS: | + | |
- | (1/ | + | |
- | = (1/ | + | |
- | + | ||
- | For s'=V and a = <b2, N> | + | |
- | LHS: | + | |
- | (1/ | + | |
- | = (1/ | + | |
- | RHS: | + | |
- | (1/ | + | |
- | = 0 | + | |
- | + | ||
- | For s'=V and a = <b2, V> | + | |
- | LHS: | + | |
- | (1/ | + | |
- | = (1/ | + | |
- | RHS: | + | |
- | (1/ | + | |
- | = (1/ | + | |
- | **e) In step 3 of the GIS algorithm you need to compute < | + | b) Equation |
- | Since we start in iteration 0, the lambdas are all equal to 1. | + | |
- | P_N^{(0)}(N|can) | + | c) Equation |
- | = 1/norm * exp(f_< | + | |
- | = 1/norm * exp(0 + 0 + 1 + 0 + 0 + 0) | + | |
- | P_N^{(0)}(V|can) | + | d) List all the constraints involving feature |
- | = 1/norm * exp(f_< | + | |
- | = 1/norm * exp(0 + 0 + 0 + 1 + 0 + 0) | + | |
- | norm = 2e | + | e) In step 3 of the GIS algorithm you need to compute < |
**Hint** : You might be confused about the m_s' variable (and t_1, …, < | **Hint** : You might be confused about the m_s' variable (and t_1, …, < |