Objec racking: Using HMMs o esimae he geographical locaion of fish 02433 - Hidden Markov Models Marin Wæver Pedersen, Henrik Madsen Course week 13 MWP, compiled June 8, 2011
Objecive: Locae fish from agging daa. Marine fish are difficul o monior direcly in heir naural environmen for an exended period of ime. Insead, biologiss aach elecronic daa loggers o he fish o record properies of he environmen around he fish. Afer a specified ime he elecronic logger releases iself from he fish and floas o he surface o ransmi daa back o he lab via saellie. Then he goal is o esimae he geographical locaion of he fish from he received daa. Figure: Biologiss aaching a daa logger o he back of a souhern bluefin una near Ausralia. The ag ype is a pop-up saellie archival ag (PSAT). 2
Objecive: Locae fish from agging daa. An example of a daase recorded by a daa logger is shown below. Longiude (E o ) 160 140 120 Sea surface emperaure (C o ) 20 15 10 Aug Sep Oc Nov Dec Jan Time Top plo: Longiudinal coordinae of he fish as inferred from day-ligh recordings on he ag (i.e. using he day lengh and ime of sunrise and sunse). Boom plo: Whenever he fish was close o he sea surface he waer emperaure was recorded. 3
Laiude Objecive: Locae fish from agging daa. Oher available informaion: The locaion where he agged fish was released (green circle), and he locaion where he PSAT was released from he fish and floaed o he surface o ransmi daa (red circle). 18 o S 27 o S 36 o S 45 o S 54 o S 90 oo E 108 o E 126 o E Longiude 144 oo E 162 o E 180 o W 4
Objecive: Locae fish from agging daa. As we shall see laer he locaion of he fish (while a libery in he ocean wih he daa logger aached) can be esimaed using HMMs. This is done by discreizing he wo-dimensional space and applying he echnique described in he HMM lecure noes for course week 7. However, before we urn o he real daa analysis, we consider a brief example of one-dimensional objec racking wih simulaed daa. 5
Seup of he 1D example This example illusraes he siuaion where he locaion of an objec is moniored in he presence of observaion error. The goal is hen o esimae he rue locaion, C, of his objec from he noisy observaions, X. The one-dimensional movemens of he objec follow he process model C +1 = a(c, d, e ), (1) where C is he rue locaion a ime, d is a consan drif erm, and e represens random variaions in he movemen. The observaions arise via X = b(c, u ), (2) where u represens random noise in he monioring equipmen. Imporanly e and u are iid. and muually independen. Equaions (1) and (2) comprise a sae-space model. 6
Simulaing daa In generaing he synheic daa i is assumed ha he one-dimensional movemens of he objec follow a biased random walk model, i.e. ha where d = 1 and e N(0, 1). 20 The observaions arise via C +1 = C + d + e, where u N(0, 1). X = C + u, Synheic values for C and X are generaed for {1,..., T = 100}. 7
Plo of he simulaed daa 12 Simulaed daa 10 8 6 c 4 2 0 2 c x 4 0 10 20 30 40 50 60 70 80 90 100 Time 8
Se up an HMM for he problem Use he discreizaion echnique described in he HMM lecure noes for course week 7 o consruc an HMM. The HMM has he following properies: Number of ime-seps: T=100. Bounds of domain: [ 3.21, 11.42]. Discreizaion: number of saes: m = 20. Iniial disribuion: δ i = p(x 1 C 1 = i)/k, where K = m i=1 p(x1 C1 = i). 9
The HMM ingrediens Transiion probabiliy marix We have ha C +1 = C + d + e, e N(0, 1). So Γ has he elemens γ ij = Pr(C +1 Ω j C = i) = p C+1 C (c +1 C = i) dc +1, Ω j where p C+1 C (c +1 C = i) = 1 ( ) 1 exp (c+1 d i)2. 2π 2 Sae-dependen disribuion We have X = h(c, u ) = C + u, u N(0, 1). Therefore, p i (x ) = p(x C = i) = 1 exp ( 12 ) 2π (x i)2. 10
Transiion probabiliy marix, m=20 Colours indicae probabiliy values in he 20 20 marix. Probabiliy ransiion marix 2 4 6 8 10 12 14 16 18 20 5 10 15 20 0.55 0.5 0.45 0.4 0.35 0.3 0.25 0.2 0.15 0.1 0.05 11
Examples of sae-dependen disribuion Noe ha he values of he disribuion do no sum o one since i is no a probabiliy disribuion. Raher p(x C = i) viewed as a funcion of i is a likelihood disribuion. Lef figure: Observaion close o he rue sae. Righ figure: Observaion furher from he rue sae (larger observaion error). 0.4 0.35 sdd True sae Observaion 0.4 0.35 sdd True sae Observaion sae dependen disribuion 0.3 0.25 0.2 0.15 0.1 sae dependen disribuion 0.3 0.25 0.2 0.15 0.1 0.05 0.05 0 4 2 0 2 4 6 8 10 12 c 0 4 2 0 2 4 6 8 10 12 c = 47 = 16 12
Local decoding 12 Simulaed daa and resuls 10 8 6 c 4 2 0 c 2 x local decod. 4 0 10 20 30 40 50 60 70 80 90 100 Time 13
Real daa example: Fish racking Recall he daa recorded by he PSAT (slide 3) and he release and pop-up locaions (slide 4). Wih hese daa he goal is o use an HMM o esimae he locaion of agged fish, a souhern bluefin una. Process model The model for he movemens of he fish, i.e. he process model, is ( ) ( ) C (la) +1 C (la) ( ) C (lon) d (la) = +1 C (lon) + d (lon) + e, where e N(0, Σ e) is a bivariae Gaussian random variable. A simplifying assumpion is ha Σ e = σ 2 e I, where I is he ideniy marix. Compuing Γ for his wo-dimensional example is done analogously o he 1D simulaion case, where inegrals are now over 2D grid cells and no 1D inervals on he line. 14
Sae-dependen disribuions As shown in he figure on slide 3 we have wo ypes of daa available: X (T ) X (L) : Sea surface emperaure (SST). : Longiude esimaed from dayligh inensiy on board he ag. For hese daa he observaion model becomes ( ) ( ) X (T ) C (la) X (L) = h C (lon) + where u (T ) N(0, σ 2 T ) and u (L) N(0, σ 2 L). ( u (T ) u (L) ), The wo variances can be esimaed from independen daa and are herefore omied from he parameers o be esimaed wihin he HMM. 15
Laiude How he sae-dependen disribuion is calculaed Sea surface emperaure daa For example, say we have observed he following SST: x (T ) = 12.8 C. A he same ime we have a saellie image of he SST of he ocean (shown below), which links a spaial coordinae corresponding o he sae i o an expeced SST value h(i). 22 20 28 o S 32 o S 36 o S 40 o S 18 16 14 12 44 o S 110 o E 120 o E 130 o E Longiude 140 o E 150 o E 160 o E 10 8 16
Laiude How he sae-dependen disribuion is calculaed Sea surface emperaure daa By combining he saellie image wih he ( observed SST (x (T ) = 12.8 C) we can calculae p(x (T ) 1 C = i) = exp 1 (x (T ) 2πσ 2 2σ 2 h(i)) ), 2 where h(i) is T T he expeced SST from he saellie image relaed o sae i. The figure shows p(x (T ) C = i) for x (T ) = 12.8 C. 0.35 0.3 28 o S 32 o S 0.25 0.2 36 o S 40 o S 0.15 0.1 44 o S 110 o E 120 o E 130 o E Longiude 140 o E 150 o E 160 o E 0.05 17
Laiude How he sae-dependen disribuion is calculaed Longiude daa Say we have observed: x (L) = ( 138.35. We can hen calculae p(x (L) C = i) = 1 exp 1 (x (L) 2πσ 2 2σ 2 h(i)) ), 2 where h(i) ranslaes he L L sae i o a spaial longiudinal coordinae. The figure shows p(x (L) C = i) for x (L) = 138.35. 0.3 28 o S 32 o S 36 o S 40 o S 0.25 0.2 0.15 0.1 44 o S 110 o E 120 o E 130 o E Longiude 140 o E 150 o E 160 o E 0.05 18
Laiude How he sae-dependen disribuion is calculaed We can hen calculae he combined sae-dependen disribuion of he wo observaions a ime by muliplicaion: p(x (T ), x (L) C = i) = p(x (T ) C = i)p(x (L) C = i), by assuming independence of x (T ) and x (L). The figure shows p(x (T ), x (L) C = i) for x (T ) = 12.8 C and x (L) = 138.35. 0.14 0.12 28 o S 32 o S 36 o S 40 o S 0.1 0.08 0.06 0.04 44 o S 110 o E 120 o E 130 o E Longiude 140 o E 150 o E 160 o E 0.02 19
The HMM ingrediens The HMM which is fi o he daa has he following properies: m = 111 201 = 22311. T = 355, wih a ime sep of 12 hours. Three model parameers o be esimaed Θ = (σ 2 e, d (la), d (lon) ). Since m is very large i is required ha Γ is sored as a sparse marix o be able o efficienly fi he HMM. This saves boh memory and compuaion ime (provided ha Γ is in fac sparse, which i is in his example). The sae-dependen disribuion p(x (T ), x (L) C = i) is calculaed for all as shown on he previous slides. 20
Laiude Global decoding The HMM is fied by direc maximizaion of he likelihood. As for decoding of he hidden sae (he animal s locaion) i is imporan o use global decoding and NOT local decoding. This is because global decoding disallows impossible sae ransiions, such as movemens ha raverse land areas. The figure shows he globally decoded HMM, i.e. he enire sequence of hidden locaions. 28 o S 32 o S 36 o S 40 o S 44 o S 110 o E 120 o E 130 o E Longiude 140 o E 150 o E 160 o E 21
End of example 22