1{5 Sections 15, Chapter - University of Minnesotavision.psych.umn.edu › ... › courses › AI2...
Transcript of 1{5 Sections 15, Chapter - University of Minnesotavision.psych.umn.edu › ... › courses › AI2...
![Page 1: 1{5 Sections 15, Chapter - University of Minnesotavision.psych.umn.edu › ... › courses › AI2 › chapter15a.pdf · Ba y esian net w o rks} P a ... rticle ltering Chapter 15,](https://reader033.fdocuments.in/reader033/viewer/2022060402/5f0e6b927e708231d43f289d/html5/thumbnails/1.jpg)
Temporalprobabilitymodels
Chapter15,Sections1–5
Chapter15,Sections1–51
![Page 2: 1{5 Sections 15, Chapter - University of Minnesotavision.psych.umn.edu › ... › courses › AI2 › chapter15a.pdf · Ba y esian net w o rks} P a ... rticle ltering Chapter 15,](https://reader033.fdocuments.in/reader033/viewer/2022060402/5f0e6b927e708231d43f289d/html5/thumbnails/2.jpg)
Outline
♦Timeanduncertainty
♦Inference:filtering,prediction,smoothing
♦HiddenMarkovmodels
♦Kalmanfilters(abriefmention)
♦DynamicBayesiannetworks
♦Particlefiltering
Chapter15,Sections1–52
![Page 3: 1{5 Sections 15, Chapter - University of Minnesotavision.psych.umn.edu › ... › courses › AI2 › chapter15a.pdf · Ba y esian net w o rks} P a ... rticle ltering Chapter 15,](https://reader033.fdocuments.in/reader033/viewer/2022060402/5f0e6b927e708231d43f289d/html5/thumbnails/3.jpg)
Timeanduncertainty
Theworldchanges;weneedtotrackandpredictit
Diabetesmanagementvsvehiclediagnosis
Basicidea:copystateandevidencevariablesforeachtimestep
Xt=setofunobservablestatevariablesattimete.g.,BloodSugart,StomachContentst,etc.
Et=setofobservableevidencevariablesattimete.g.,MeasuredBloodSugart,PulseRatet,FoodEatent
Thisassumesdiscretetime;stepsizedependsonproblem
Notation:Xa:b=Xa,Xa+1,...,Xb−1,Xb
Chapter15,Sections1–53
![Page 4: 1{5 Sections 15, Chapter - University of Minnesotavision.psych.umn.edu › ... › courses › AI2 › chapter15a.pdf · Ba y esian net w o rks} P a ... rticle ltering Chapter 15,](https://reader033.fdocuments.in/reader033/viewer/2022060402/5f0e6b927e708231d43f289d/html5/thumbnails/4.jpg)
Markovprocesses(Markovchains)
ConstructaBayesnetfromthesevariables:parents?
Markovassumption:XtdependsonboundedsubsetofX0:t−1
First-orderMarkovprocess:P(Xt|X0:t−1)=P(Xt|Xt−1)Second-orderMarkovprocess:P(Xt|X0:t−1)=P(Xt|Xt−2,Xt−1)
Xt−1Xt Xt−2Xt+1Xt+2
Xt−1Xt Xt−2Xt+1Xt+2 First−order
Second−order
SensorMarkovassumption:P(Et|X0:t,E0:t−1)=P(Et|Xt)
Stationaryprocess:transitionmodelP(Xt|Xt−1)andsensormodelP(Et|Xt)fixedforallt
Chapter15,Sections1–54
![Page 5: 1{5 Sections 15, Chapter - University of Minnesotavision.psych.umn.edu › ... › courses › AI2 › chapter15a.pdf · Ba y esian net w o rks} P a ... rticle ltering Chapter 15,](https://reader033.fdocuments.in/reader033/viewer/2022060402/5f0e6b927e708231d43f289d/html5/thumbnails/5.jpg)
Example
t Rain
t Umbrella
Raint−1
Umbrellat−1
Raint+1
Umbrellat+1
Rt−1t P(R )
0.3 f0.7 t
t Rt P(U )
0.9 t0.2 f
First-orderMarkovassumptionnotexactlytrueinrealworld!
Possiblefixes:1.IncreaseorderofMarkovprocess2.Augmentstate,e.g.,addTempt,Pressuret
Example:robotmotion.AugmentpositionandvelocitywithBatteryt
Chapter15,Sections1–55
![Page 6: 1{5 Sections 15, Chapter - University of Minnesotavision.psych.umn.edu › ... › courses › AI2 › chapter15a.pdf · Ba y esian net w o rks} P a ... rticle ltering Chapter 15,](https://reader033.fdocuments.in/reader033/viewer/2022060402/5f0e6b927e708231d43f289d/html5/thumbnails/6.jpg)
Inferencetasks
Filtering:P(Xt|e1:t)beliefstate—inputtothedecisionprocessofarationalagent
Prediction:P(Xt+k|e1:t)fork>0evaluationofpossibleactionsequences;likefilteringwithouttheevidence
Smoothing:P(Xk|e1:t)for0≤k<tbetterestimateofpaststates,essentialforlearning
Mostlikelyexplanation:argmaxx1:tP(x1:t|e1:t)speechrecognition,decodingwithanoisychannel
Chapter15,Sections1–56
![Page 7: 1{5 Sections 15, Chapter - University of Minnesotavision.psych.umn.edu › ... › courses › AI2 › chapter15a.pdf · Ba y esian net w o rks} P a ... rticle ltering Chapter 15,](https://reader033.fdocuments.in/reader033/viewer/2022060402/5f0e6b927e708231d43f289d/html5/thumbnails/7.jpg)
Filtering
Aim:devisearecursivestateestimationalgorithm:
P(Xt+1|e1:t+1)=f(et+1,P(Xt|e1:t))
P(Xt+1|e1:t+1)=P(Xt+1|e1:t,et+1)
=αP(et+1|Xt+1,e1:t)P(Xt+1|e1:t)
=αP(et+1|Xt+1)P(Xt+1|e1:t)
I.e.,prediction+estimation.PredictionbysummingoutXt:
P(Xt+1|e1:t+1)=αP(et+1|Xt+1)ΣxtP(Xt+1|xt,e1:t)P(xt|e1:t)
=αP(et+1|Xt+1)ΣxtP(Xt+1|xt)P(xt|e1:t)
f1:t+1=Forward(f1:t,et+1)wheref1:t=P(Xt|e1:t)Timeandspaceconstant(independentoft)
Chapter15,Sections1–57
![Page 8: 1{5 Sections 15, Chapter - University of Minnesotavision.psych.umn.edu › ... › courses › AI2 › chapter15a.pdf · Ba y esian net w o rks} P a ... rticle ltering Chapter 15,](https://reader033.fdocuments.in/reader033/viewer/2022060402/5f0e6b927e708231d43f289d/html5/thumbnails/8.jpg)
Filteringexample
Rain1
Umbrella1
Rain2
Umbrella2
Rain0
0.8180.182
0.6270.373
0.8830.117
TrueFalse
0.5000.500
0.5000.500
Chapter15,Sections1–58
![Page 9: 1{5 Sections 15, Chapter - University of Minnesotavision.psych.umn.edu › ... › courses › AI2 › chapter15a.pdf · Ba y esian net w o rks} P a ... rticle ltering Chapter 15,](https://reader033.fdocuments.in/reader033/viewer/2022060402/5f0e6b927e708231d43f289d/html5/thumbnails/9.jpg)
Smoothing
X0X1
1 EEkt E
t X Xk
Divideevidencee1:tintoe1:k,ek+1:t:
P(Xk|e1:t)=P(Xk|e1:k,ek+1:t)
=αP(Xk|e1:k)P(ek+1:t|Xk,e1:k)
=αP(Xk|e1:k)P(ek+1:t|Xk)
=αf1:kbk+1:t
Backwardmessagecomputedbyabackwardsrecursion:
P(ek+1:t|Xk)=Σxk+1P(ek+1:t|Xk,xk+1)P(xk+1|Xk)
=Σxk+1P(ek+1:t|xk+1)P(xk+1|Xk)
=Σxk+1P(ek+1|xk+1)P(ek+2:t|xk+1)P(xk+1|Xk)
Chapter15,Sections1–59
![Page 10: 1{5 Sections 15, Chapter - University of Minnesotavision.psych.umn.edu › ... › courses › AI2 › chapter15a.pdf · Ba y esian net w o rks} P a ... rticle ltering Chapter 15,](https://reader033.fdocuments.in/reader033/viewer/2022060402/5f0e6b927e708231d43f289d/html5/thumbnails/10.jpg)
Smoothingexample
Rain1
Umbrella1
Rain2
Umbrella2
Rain0
TrueFalse
0.8180.182
0.6270.373
0.8830.117
0.5000.500
0.5000.500
1.0001.000
0.6900.410
0.8830.117
forward
backward
smoothed0.8830.117
Forward–backwardalgorithm:cacheforwardmessagesalongthewayTimelinearint(polytreeinference),spaceO(t|f|)
Chapter15,Sections1–510
![Page 11: 1{5 Sections 15, Chapter - University of Minnesotavision.psych.umn.edu › ... › courses › AI2 › chapter15a.pdf · Ba y esian net w o rks} P a ... rticle ltering Chapter 15,](https://reader033.fdocuments.in/reader033/viewer/2022060402/5f0e6b927e708231d43f289d/html5/thumbnails/11.jpg)
Mostlikelyexplanation
Mostlikelysequence6=sequenceofmostlikelystates!!!!
Mostlikelypathtoeachxt+1
=mostlikelypathtosomextplusonemorestep
max x1...xtP(x1,...,xt,Xt+1|e1:t+1)
=P(et+1|Xt+1)max xt
P(Xt+1|xt)max x1...xt−1
P(x1,...,xt−1,xt|e1:t)
Identicaltofiltering,exceptf1:treplacedby
m1:t=max x1...xt−1
P(x1,...,xt−1,Xt|e1:t),
I.e.,m1:t(i)givestheprobabilityofthemostlikelypathtostatei.Updatehassumreplacedbymax,givingtheViterbialgorithm:
m1:t+1=P(et+1|Xt+1)max xt(P(Xt+1|xt)m1:t)
Chapter15,Sections1–511
![Page 12: 1{5 Sections 15, Chapter - University of Minnesotavision.psych.umn.edu › ... › courses › AI2 › chapter15a.pdf · Ba y esian net w o rks} P a ... rticle ltering Chapter 15,](https://reader033.fdocuments.in/reader033/viewer/2022060402/5f0e6b927e708231d43f289d/html5/thumbnails/12.jpg)
Viterbiexample
Rain1Rain2Rain3Rain4Rain5
true
false
true
false
true
false
true
false
true
false
.8182.5155.0361.0334.0210
.1818.0491.1237.0173.0024
m1:1m1:5 m1:4 m1:3 m1:2
statespacepaths
mostlikelypaths
umbrellatruetrue true false true
Chapter15,Sections1–512
![Page 13: 1{5 Sections 15, Chapter - University of Minnesotavision.psych.umn.edu › ... › courses › AI2 › chapter15a.pdf · Ba y esian net w o rks} P a ... rticle ltering Chapter 15,](https://reader033.fdocuments.in/reader033/viewer/2022060402/5f0e6b927e708231d43f289d/html5/thumbnails/13.jpg)
HiddenMarkovmodels
Xtisasingle,discretevariable(usuallyEtistoo)DomainofXtis{1,...,S}
TransitionmatrixTij=P(Xt=j|Xt−1=i),e.g.,
0.70.30.30.7
SensormatrixOtforeachtimestep,diagonalelementsP(et|Xt=i)
e.g.,withU1=true,O1=
0.9000.2
Forwardandbackwardmessagesascolumnvectors:
f1:t+1=αOt+1T>f1:t
bk+1:t=TOk+1bk+2:t
Forward-backwardalgorithmneedstimeO(S2t)andspaceO(St)
Chapter15,Sections1–513
![Page 14: 1{5 Sections 15, Chapter - University of Minnesotavision.psych.umn.edu › ... › courses › AI2 › chapter15a.pdf · Ba y esian net w o rks} P a ... rticle ltering Chapter 15,](https://reader033.fdocuments.in/reader033/viewer/2022060402/5f0e6b927e708231d43f289d/html5/thumbnails/14.jpg)
Countrydancealgorithm
Canavoidstoringallforwardmessagesinsmoothingbyrunningforwardalgorithmbackwards:
f1:t+1=αOt+1T>f1:t
O−1
t+1f1:t+1=αT>f1:t
α′(T
>)−1
O−1
t+1f1:t+1=f1:t
Algorithm:forwardpasscomputesft,backwardpassdoesfi,bi
Chapter15,Sections1–514
![Page 15: 1{5 Sections 15, Chapter - University of Minnesotavision.psych.umn.edu › ... › courses › AI2 › chapter15a.pdf · Ba y esian net w o rks} P a ... rticle ltering Chapter 15,](https://reader033.fdocuments.in/reader033/viewer/2022060402/5f0e6b927e708231d43f289d/html5/thumbnails/15.jpg)
Countrydancealgorithm
Canavoidstoringallforwardmessagesinsmoothingbyrunningforwardalgorithmbackwards:
f1:t+1=αOt+1T>f1:t
O−1
t+1f1:t+1=αT>f1:t
α′(T
>)−1
O−1
t+1f1:t+1=f1:t
Algorithm:forwardpasscomputesft,backwardpassdoesfi,bi
Chapter15,Sections1–515
![Page 16: 1{5 Sections 15, Chapter - University of Minnesotavision.psych.umn.edu › ... › courses › AI2 › chapter15a.pdf · Ba y esian net w o rks} P a ... rticle ltering Chapter 15,](https://reader033.fdocuments.in/reader033/viewer/2022060402/5f0e6b927e708231d43f289d/html5/thumbnails/16.jpg)
Countrydancealgorithm
Canavoidstoringallforwardmessagesinsmoothingbyrunningforwardalgorithmbackwards:
f1:t+1=αOt+1T>f1:t
O−1
t+1f1:t+1=αT>f1:t
α′(T
>)−1
O−1
t+1f1:t+1=f1:t
Algorithm:forwardpasscomputesft,backwardpassdoesfi,bi
Chapter15,Sections1–516
![Page 17: 1{5 Sections 15, Chapter - University of Minnesotavision.psych.umn.edu › ... › courses › AI2 › chapter15a.pdf · Ba y esian net w o rks} P a ... rticle ltering Chapter 15,](https://reader033.fdocuments.in/reader033/viewer/2022060402/5f0e6b927e708231d43f289d/html5/thumbnails/17.jpg)
Countrydancealgorithm
Canavoidstoringallforwardmessagesinsmoothingbyrunningforwardalgorithmbackwards:
f1:t+1=αOt+1T>f1:t
O−1
t+1f1:t+1=αT>f1:t
α′(T
>)−1
O−1
t+1f1:t+1=f1:t
Algorithm:forwardpasscomputesft,backwardpassdoesfi,bi
Chapter15,Sections1–517
![Page 18: 1{5 Sections 15, Chapter - University of Minnesotavision.psych.umn.edu › ... › courses › AI2 › chapter15a.pdf · Ba y esian net w o rks} P a ... rticle ltering Chapter 15,](https://reader033.fdocuments.in/reader033/viewer/2022060402/5f0e6b927e708231d43f289d/html5/thumbnails/18.jpg)
Countrydancealgorithm
Canavoidstoringallforwardmessagesinsmoothingbyrunningforwardalgorithmbackwards:
f1:t+1=αOt+1T>f1:t
O−1
t+1f1:t+1=αT>f1:t
α′(T
>)−1
O−1
t+1f1:t+1=f1:t
Algorithm:forwardpasscomputesft,backwardpassdoesfi,bi
Chapter15,Sections1–518
![Page 19: 1{5 Sections 15, Chapter - University of Minnesotavision.psych.umn.edu › ... › courses › AI2 › chapter15a.pdf · Ba y esian net w o rks} P a ... rticle ltering Chapter 15,](https://reader033.fdocuments.in/reader033/viewer/2022060402/5f0e6b927e708231d43f289d/html5/thumbnails/19.jpg)
Countrydancealgorithm
Canavoidstoringallforwardmessagesinsmoothingbyrunningforwardalgorithmbackwards:
f1:t+1=αOt+1T>f1:t
O−1
t+1f1:t+1=αT>f1:t
α′(T
>)−1
O−1
t+1f1:t+1=f1:t
Algorithm:forwardpasscomputesft,backwardpassdoesfi,bi
Chapter15,Sections1–519
![Page 20: 1{5 Sections 15, Chapter - University of Minnesotavision.psych.umn.edu › ... › courses › AI2 › chapter15a.pdf · Ba y esian net w o rks} P a ... rticle ltering Chapter 15,](https://reader033.fdocuments.in/reader033/viewer/2022060402/5f0e6b927e708231d43f289d/html5/thumbnails/20.jpg)
Countrydancealgorithm
Canavoidstoringallforwardmessagesinsmoothingbyrunningforwardalgorithmbackwards:
f1:t+1=αOt+1T>f1:t
O−1
t+1f1:t+1=αT>f1:t
α′(T
>)−1
O−1
t+1f1:t+1=f1:t
Algorithm:forwardpasscomputesft,backwardpassdoesfi,bi
Chapter15,Sections1–520
![Page 21: 1{5 Sections 15, Chapter - University of Minnesotavision.psych.umn.edu › ... › courses › AI2 › chapter15a.pdf · Ba y esian net w o rks} P a ... rticle ltering Chapter 15,](https://reader033.fdocuments.in/reader033/viewer/2022060402/5f0e6b927e708231d43f289d/html5/thumbnails/21.jpg)
Countrydancealgorithm
Canavoidstoringallforwardmessagesinsmoothingbyrunningforwardalgorithmbackwards:
f1:t+1=αOt+1T>f1:t
O−1
t+1f1:t+1=αT>f1:t
α′(T
>)−1
O−1
t+1f1:t+1=f1:t
Algorithm:forwardpasscomputesft,backwardpassdoesfi,bi
Chapter15,Sections1–521
![Page 22: 1{5 Sections 15, Chapter - University of Minnesotavision.psych.umn.edu › ... › courses › AI2 › chapter15a.pdf · Ba y esian net w o rks} P a ... rticle ltering Chapter 15,](https://reader033.fdocuments.in/reader033/viewer/2022060402/5f0e6b927e708231d43f289d/html5/thumbnails/22.jpg)
Countrydancealgorithm
Canavoidstoringallforwardmessagesinsmoothingbyrunningforwardalgorithmbackwards:
f1:t+1=αOt+1T>f1:t
O−1
t+1f1:t+1=αT>f1:t
α′(T
>)−1
O−1
t+1f1:t+1=f1:t
Algorithm:forwardpasscomputesft,backwardpassdoesfi,bi
Chapter15,Sections1–522
![Page 23: 1{5 Sections 15, Chapter - University of Minnesotavision.psych.umn.edu › ... › courses › AI2 › chapter15a.pdf · Ba y esian net w o rks} P a ... rticle ltering Chapter 15,](https://reader033.fdocuments.in/reader033/viewer/2022060402/5f0e6b927e708231d43f289d/html5/thumbnails/23.jpg)
Countrydancealgorithm
Canavoidstoringallforwardmessagesinsmoothingbyrunningforwardalgorithmbackwards:
f1:t+1=αOt+1T>f1:t
O−1
t+1f1:t+1=αT>f1:t
α′(T
>)−1
O−1
t+1f1:t+1=f1:t
Algorithm:forwardpasscomputesft,backwardpassdoesfi,bi
Chapter15,Sections1–523
![Page 24: 1{5 Sections 15, Chapter - University of Minnesotavision.psych.umn.edu › ... › courses › AI2 › chapter15a.pdf · Ba y esian net w o rks} P a ... rticle ltering Chapter 15,](https://reader033.fdocuments.in/reader033/viewer/2022060402/5f0e6b927e708231d43f289d/html5/thumbnails/24.jpg)
Kalmanfilters
Modellingsystemsdescribedbyasetofcontinuousvariables,e.g.,trackingabirdflying—Xt=X,Y,Z,X,Y,Z.Airplanes,robots,ecosystems,economies,chemicalplants,planets,...
t Zt+1 Z
t Xt+1 X
t Xt+1 X
Gaussianprior,linearGaussiantransitionmodelandsensormodel
Chapter15,Sections1–524
![Page 25: 1{5 Sections 15, Chapter - University of Minnesotavision.psych.umn.edu › ... › courses › AI2 › chapter15a.pdf · Ba y esian net w o rks} P a ... rticle ltering Chapter 15,](https://reader033.fdocuments.in/reader033/viewer/2022060402/5f0e6b927e708231d43f289d/html5/thumbnails/25.jpg)
UpdatingGaussiandistributions
Predictionstep:ifP(Xt|e1:t)isGaussian,thenprediction
P(Xt+1|e1:t)=∫
xtP(Xt+1|xt)P(xt|e1:t)dxt
isGaussian.IfP(Xt+1|e1:t)isGaussian,thentheupdateddistribution
P(Xt+1|e1:t+1)=αP(et+1|Xt+1)P(Xt+1|e1:t)
isGaussian
HenceP(Xt|e1:t)ismultivariateGaussianN(µt,Σt)forallt
General(nonlinear,non-Gaussian)process:descriptionofposteriorgrowsunboundedlyast→∞
Chapter15,Sections1–525
![Page 26: 1{5 Sections 15, Chapter - University of Minnesotavision.psych.umn.edu › ... › courses › AI2 › chapter15a.pdf · Ba y esian net w o rks} P a ... rticle ltering Chapter 15,](https://reader033.fdocuments.in/reader033/viewer/2022060402/5f0e6b927e708231d43f289d/html5/thumbnails/26.jpg)
Simple1-Dexample
GaussianrandomwalkonX–axis,s.d.σx,sensors.d.σz
µt+1=(σ
2t+σ
2x)zt+1+σ
2zµt
σ2t+σ
2x+σ
2z
σ2
t+1=(σ
2t+σ
2x)σ
2z
σ2t+σ
2x+σ
2z
0
0.05
0.1
0.15
0.2
0.25
0.3
0.35
0.4
0.45
-8-6-4-202468
P(X)
X position
P(x0)
P(x1)
P(x1 | z1=2.5)
*z1
Chapter15,Sections1–526
![Page 27: 1{5 Sections 15, Chapter - University of Minnesotavision.psych.umn.edu › ... › courses › AI2 › chapter15a.pdf · Ba y esian net w o rks} P a ... rticle ltering Chapter 15,](https://reader033.fdocuments.in/reader033/viewer/2022060402/5f0e6b927e708231d43f289d/html5/thumbnails/27.jpg)
GeneralKalmanupdate
Transitionandsensormodels:
P(xt+1|xt)=N(Fxt,Σx)(xt+1)P(zt|xt)=N(Hxt,Σz)(zt)
Fisthematrixforthetransition;ΣxthetransitionnoisecovarianceHisthematrixforthesensors;Σzthesensornoisecovariance
Filtercomputesthefollowingupdate:
µt+1=Fµt+Kt+1(zt+1−HFµt)
Σt+1=(I−Kt+1)(FΣtF>
+Σx)
whereKt+1=(FΣtF>
+Σx)H>(H(FΣtF
>+Σx)H
>+Σz)
−1
istheKalmangainmatrix
ΣtandKtareindependentofobservationsequence,socomputeoffline
Chapter15,Sections1–527
![Page 28: 1{5 Sections 15, Chapter - University of Minnesotavision.psych.umn.edu › ... › courses › AI2 › chapter15a.pdf · Ba y esian net w o rks} P a ... rticle ltering Chapter 15,](https://reader033.fdocuments.in/reader033/viewer/2022060402/5f0e6b927e708231d43f289d/html5/thumbnails/28.jpg)
2-Dtrackingexample:filtering
81012141618202224266
7
8
9
10
11
12
X
Y
2D filtering
trueobservedfiltered
Chapter15,Sections1–528
![Page 29: 1{5 Sections 15, Chapter - University of Minnesotavision.psych.umn.edu › ... › courses › AI2 › chapter15a.pdf · Ba y esian net w o rks} P a ... rticle ltering Chapter 15,](https://reader033.fdocuments.in/reader033/viewer/2022060402/5f0e6b927e708231d43f289d/html5/thumbnails/29.jpg)
2-Dtrackingexample:smoothing
81012141618202224266
7
8
9
10
11
12
X
Y
2D smoothing
trueobservedsmoothed
Chapter15,Sections1–529
![Page 30: 1{5 Sections 15, Chapter - University of Minnesotavision.psych.umn.edu › ... › courses › AI2 › chapter15a.pdf · Ba y esian net w o rks} P a ... rticle ltering Chapter 15,](https://reader033.fdocuments.in/reader033/viewer/2022060402/5f0e6b927e708231d43f289d/html5/thumbnails/30.jpg)
Whereitbreaks
Cannotbeappliedifthetransitionmodelisnonlinear
ExtendedKalmanFiltermodelstransitionaslocallylineararoundxt=µt
Failsifsystemsislocallyunsmooth
Chapter15,Sections1–530
![Page 31: 1{5 Sections 15, Chapter - University of Minnesotavision.psych.umn.edu › ... › courses › AI2 › chapter15a.pdf · Ba y esian net w o rks} P a ... rticle ltering Chapter 15,](https://reader033.fdocuments.in/reader033/viewer/2022060402/5f0e6b927e708231d43f289d/html5/thumbnails/31.jpg)
DynamicBayesiannetworks
Xt,EtcontainarbitrarilymanyvariablesinareplicatedBayesnet
0.3 f0.7 t
0.9 t0.2 f
Rain0Rain1
Umbrella1
P(U ) 1 R1
P(R )1 R0
0.7
P(R )0
Z1
X1
X1 tXX0
X0
1 Battery Battery0
1 BMeter
Chapter15,Sections1–531
![Page 32: 1{5 Sections 15, Chapter - University of Minnesotavision.psych.umn.edu › ... › courses › AI2 › chapter15a.pdf · Ba y esian net w o rks} P a ... rticle ltering Chapter 15,](https://reader033.fdocuments.in/reader033/viewer/2022060402/5f0e6b927e708231d43f289d/html5/thumbnails/32.jpg)
DBNsvs.HMMs
EveryHMMisasingle-variableDBN;everydiscreteDBNisanHMM
XtXt+1
t Yt+1 Y
t Zt+1 Z
Sparsedependencies⇒exponentiallyfewerparameters;e.g.,20statevariables,threeparentseachDBNhas20×2
3=160parameters,HMMhas2
20×2
20≈10
12
Chapter15,Sections1–532
![Page 33: 1{5 Sections 15, Chapter - University of Minnesotavision.psych.umn.edu › ... › courses › AI2 › chapter15a.pdf · Ba y esian net w o rks} P a ... rticle ltering Chapter 15,](https://reader033.fdocuments.in/reader033/viewer/2022060402/5f0e6b927e708231d43f289d/html5/thumbnails/33.jpg)
DBNsvsKalmanfilters
EveryKalmanfiltermodelisaDBN,butfewDBNsareKFs;realworldrequiresnon-Gaussianposteriors
E.g.,wherearebinLadenandmykeys?What’sthebatterycharge?
Z1
X1
X1 tXX0
X0
1 Battery Battery0
1 BMeter
0 BMBroken1 BMBroken
-1
0
1
2
3
4
5
15202530
E(B
attery)
Time step
E(Battery|...5555005555...)
E(Battery|...5555000000...)
P(BMBroken|...5555000000...)
P(BMBroken|...5555005555...)
Chapter15,Sections1–533
![Page 34: 1{5 Sections 15, Chapter - University of Minnesotavision.psych.umn.edu › ... › courses › AI2 › chapter15a.pdf · Ba y esian net w o rks} P a ... rticle ltering Chapter 15,](https://reader033.fdocuments.in/reader033/viewer/2022060402/5f0e6b927e708231d43f289d/html5/thumbnails/34.jpg)
ExactinferenceinDBNs
Naivemethod:unrollthenetworkandrunanyexactalgorithm
0.3 f0.7 t
0.9 t0.2 f
Rain1
Umbrella1
P(U ) 1 R1
P(R )1 R0
Rain0
0.7
P(R )0
0.3 f0.7 t
0.9 t0.2 f
Rain1
Umbrella1
P(U ) 1 R1
P(R )1 R0
0.3 f0.7 t
0.9 t0.2 f
P(U ) 1 R1
P(R )1 R0
0.3 f0.7 t
0.9 t0.2 f
P(U ) 1 R1
P(R )1 R0
0.3 f0.7 t
0.9 t0.2 f
P(U ) 1 R1
P(R )1 R0
0.3 f0.7 t
0.9 t0.2 f
P(U ) 1 R1
P(R )1 R0
0.9 t0.2 f
P(U ) 1 R1
0.3 f0.7 t
P(R )1 R0
0.9 t0.2 f
P(U ) 1 R1
0.3 f0.7 t
P(R )1 R0
Rain0
0.7
P(R )0
Umbrella2
Rain3
Umbrella3
Rain4
Umbrella4
Rain5
Umbrella5
Rain6
Umbrella6
Rain7
Umbrella7
Rain2
Problem:inferencecostforeachupdategrowswitht
Rollupfiltering:addslicet+1,“sumout”slicetusingvariableelimination
LargestfactorisO(dn+1
),updatecostO(dn+2
)(cf.HMMupdatecostO(d
2n))
Chapter15,Sections1–534
![Page 35: 1{5 Sections 15, Chapter - University of Minnesotavision.psych.umn.edu › ... › courses › AI2 › chapter15a.pdf · Ba y esian net w o rks} P a ... rticle ltering Chapter 15,](https://reader033.fdocuments.in/reader033/viewer/2022060402/5f0e6b927e708231d43f289d/html5/thumbnails/35.jpg)
LikelihoodweightingforDBNs
Setofweightedsamplesapproximatesthebeliefstate
Rain1
Umbrella1
Rain0
Umbrella2
Rain3
Umbrella3
Rain4
Umbrella4
Rain5
Umbrella5
Rain2
LWsamplespaynoattentiontotheevidence!⇒fraction“agreeing”fallsexponentiallywitht⇒numberofsamplesrequiredgrowsexponentiallywitht
0
0.2
0.4
0.6
0.8
1
05101520253035404550
RM
S error
Time step
LW(10)LW(100)
LW(1000)LW(10000)
Chapter15,Sections1–535
![Page 36: 1{5 Sections 15, Chapter - University of Minnesotavision.psych.umn.edu › ... › courses › AI2 › chapter15a.pdf · Ba y esian net w o rks} P a ... rticle ltering Chapter 15,](https://reader033.fdocuments.in/reader033/viewer/2022060402/5f0e6b927e708231d43f289d/html5/thumbnails/36.jpg)
Particlefiltering
Basicidea:ensurethatthepopulationofsamples(“particles”)tracksthehigh-likelihoodregionsofthestate-space
Replicateparticlesproportionaltolikelihoodforet
true
false
(a) Propagate(b) Weight(c) Resample
RaintRaint+1 Raint+1 Raint+1
Widelyusedfortrackingnonlinearsystems,esp.invision
Alsousedforsimultaneouslocalizationandmappinginmobilerobots10
5-dimensionalstatespace
Chapter15,Sections1–536
![Page 37: 1{5 Sections 15, Chapter - University of Minnesotavision.psych.umn.edu › ... › courses › AI2 › chapter15a.pdf · Ba y esian net w o rks} P a ... rticle ltering Chapter 15,](https://reader033.fdocuments.in/reader033/viewer/2022060402/5f0e6b927e708231d43f289d/html5/thumbnails/37.jpg)
Particlefilteringcontd.
Assumeconsistentattimet:N(xt|e1:t)/N=P(xt|e1:t)
Propagateforward:populationsofxt+1are
N(xt+1|e1:t)=ΣxtP(xt+1|xt)N(xt|e1:t)
Weightsamplesbytheirlikelihoodforet+1:
W(xt+1|e1:t+1)=P(et+1|xt+1)N(xt+1|e1:t)
ResampletoobtainpopulationsproportionaltoW:
N(xt+1|e1:t+1)/N=αW(xt+1|e1:t+1)=αP(et+1|xt+1)N(xt+1|e1:t)
=αP(et+1|xt+1)ΣxtP(xt+1|xt)N(xt|e1:t)
=α′P(et+1|xt+1)ΣxtP(xt+1|xt)P(xt|e1:t)
=P(xt+1|e1:t+1)
Chapter15,Sections1–537
![Page 38: 1{5 Sections 15, Chapter - University of Minnesotavision.psych.umn.edu › ... › courses › AI2 › chapter15a.pdf · Ba y esian net w o rks} P a ... rticle ltering Chapter 15,](https://reader033.fdocuments.in/reader033/viewer/2022060402/5f0e6b927e708231d43f289d/html5/thumbnails/38.jpg)
Particlefilteringperformance
Approximationerrorofparticlefilteringremainsboundedovertime,atleastempirically—theoreticalanalysisisdifficult
0
0.2
0.4
0.6
0.8
1
05101520253035404550
Avg absolute error
Time step
LW(25)LW(100)
LW(1000)LW(10000)
ER/SOF(25)
Chapter15,Sections1–538
![Page 39: 1{5 Sections 15, Chapter - University of Minnesotavision.psych.umn.edu › ... › courses › AI2 › chapter15a.pdf · Ba y esian net w o rks} P a ... rticle ltering Chapter 15,](https://reader033.fdocuments.in/reader033/viewer/2022060402/5f0e6b927e708231d43f289d/html5/thumbnails/39.jpg)
Summary
Temporalmodelsusestateandsensorvariablesreplicatedovertime
Markovassumptionsandstationarityassumption,soweneed–transitionmodelP(Xt|Xt−1)–sensormodelP(Et|Xt)
Tasksarefiltering,prediction,smoothing,mostlikelysequence;alldonerecursivelywithconstantcostpertimestep
HiddenMarkovmodelshaveasinglediscretestatevariable;usedforspeechrecognition
Kalmanfiltersallownstatevariables,linearGaussian,O(n3)update
DynamicBayesnetssubsumeHMMs,Kalmanfilters;exactupdateintractable
ParticlefilteringisagoodapproximatefilteringalgorithmforDBNs
Chapter15,Sections1–539