kalman filtering and friends: inference in time series...
TRANSCRIPT
![Page 1: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/1.jpg)
Kalmanfilteringandfriends:Inferenceintimeseriesmodels
HerkevanHoofslidesmostlybyMichaelRubinstein
![Page 2: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/2.jpg)
Problemoverview• Goal– Estimatemostprobablestateattimekusingmeasurementuptotimek’
k’<k:predictionk’=k:filteringk’>k:smoothing
• Input– (Noisy)Sensormeasurements– Knownorlearnedsystemmodel(seelastlecture)
• Manyproblemsrequireestimationofthestateofsystemsthatchangeovertimeusingnoisymeasurementsonthesystem
![Page 3: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/3.jpg)
Applications• Ballistics• Robotics– Robotlocalization
• Trackinghands/cars/…• Econometrics– Stockprediction
• Navigation
• Manymore…
![Page 4: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/4.jpg)
Example:noisylocalization
https://img.clipartfest.com
Positionatt=0
Measurementatt=1
t=2
t=3t=4
t=5
t=6
![Page 5: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/5.jpg)
Example:noisylocalization
https://img.clipartfest.com
Positionatt=0
Measurementatt=1
t=2
t=3t=4
t=5
Smoothing:wherewasIinthepast
t=6
![Page 6: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/6.jpg)
Example:noisylocalization
https://img.clipartfest.com
Positionatt=0
Measurementatt=1
t=2
t=3t=4
t=5
t=6
Smoothing:wherewasIinthepast
Filtering:whereamInow
![Page 7: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/7.jpg)
Example:noisylocalization
https://img.clipartfest.com
Positionatt=0
Measurementatt=1
t=2
t=3t=4
t=5
t=6
Smoothing:wherewasIinthepast
Filtering:whereamInow
Prediction:wherewillIbeinthefuture
![Page 8: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/8.jpg)
Today’slecture• Fundamentals• Formalizingtimeseriesmodels• Recursivefiltering
• Twocaseswithoptimalsolutions• LinearGaussianmodels• Discretesystems
• Suboptimalsolutions
![Page 9: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/9.jpg)
StochasticProcesses
• Stochasticprocess– Collectionofrandomvariablesindexedbysomeset– Ie.R.V.𝑥" foreveryelement𝑖 inindexset
• Timeseriesmodeling– Sequenceofrandomstates/variables– Measurementsavailableatdiscretetimes– Modeledasstochasticprocessindexedbyℕ
![Page 10: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/10.jpg)
StochasticProcesses
• Stochasticprocess– Collectionofrandomvariablesindexedbysomeset– Ie.R.V.𝑥" foreveryelement𝑖 inindexset
• Timeseriesmodeling– Sequenceofrandomstates/variables– Measurementsavailableatdiscretetimes– Modeledasstochasticprocessindexedbyℕ
𝑥$ (locationatt=1)
𝑝(𝑥$)
![Page 11: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/11.jpg)
StochasticProcesses
• Stochasticprocess– Collectionofrandomvariablesindexedbysomeset– Ie.R.V.𝑥" foreveryelement𝑖 inindexset
• Timeseriesmodeling– Sequenceofrandomstates/variables– Measurementsavailableatdiscretetimes– Modeledasstochasticprocessindexedbyℕ
𝑝(𝑥$)
𝑝(𝑥()
𝑝(𝑥))
![Page 12: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/12.jpg)
(First-order)Markovprocess
• TheMarkovproperty– thelikelihoodofafuturestatedependsonpresentstateonly
• Markovchain– AstochasticprocesswithMarkovproperty
k-1 k k+1 timexk-1 xk xk+1 States
![Page 13: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/13.jpg)
HiddenMarkovModel(HMM)
• thestateisnotdirectlyvisible,butoutputdependentonthestateisvisible
k-1 k k+1 timexk-1 xk xk+1 States
(hidden)
zk-1 zk zk+1 Measurements(observed)
![Page 14: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/14.jpg)
Statespace
• Thestatevectorcontainsallavailableinformationtodescribetheinvestigatedsystem– usuallymultidimensional:
• Themeasurementvectorrepresentsobservationsrelatedtothestatevector– Generally(butnotnecessarily)oflowerdimensionthanthestatevector
![Page 15: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/15.jpg)
Statespace
• Tracking: Econometrics:• Monetaryflow• Interestrates• Inflation• …
![Page 16: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/16.jpg)
HiddenMarkovModel(HMM)
• thestateisnotdirectlyvisible,butoutputdependentonthestateisvisible
k-1 k k+1 timexk-1 xk xk+1 States
(hidden)
zk-1 zk zk+1 Measurements(observed)
![Page 17: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/17.jpg)
DynamicSystem
Stateequation:statevectorattimeinstantkstatetransitionfunction,i.i.dprocessnoise
Observationequation:observationsattimeinstantkobservationfunction,i.i.dmeasurementnoise
k-1 k k+1xk-1 xk xk+1
zk-1 zk zk+1Stochasticdiffusion
![Page 18: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/18.jpg)
Asimpledynamicsystem• (4-dimensionalstatespace)• Constantvelocitymotion:
• Onlypositionisobserved:
![Page 19: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/19.jpg)
Gaussiandistribution
μ
YacovHel-Or
![Page 20: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/20.jpg)
Today’slecture• Fundamentals• Formalizingtimeseriesmodels• Recursivefiltering
• Twocaseswithoptimalsolutions• LinearGaussianmodels• Discretesystems
• Suboptimalsolutions
![Page 21: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/21.jpg)
Recursivefilters• Formanyproblems,estimateisrequiredeachtimeanewmeasurementarrives
• Batch processing– Requiresall availabledata
• Sequential processing– Newdataisprocesseduponarrival– Neednotstorethecompletedataset– Neednotreprocessalldataforeachnewmeasurement
– Assumenoout-of-sequencemeasurements(solutionsforthisexistaswell…)
![Page 22: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/22.jpg)
Bayesianfilter• Constructtheposteriorprobabilitydensityfunctionofthestatebasedonallavailableinformation
• Byknowingtheposteriormanykindsofestimatesfor canbederived– mean(expectation),mode,median,…– Canalsogiveestimationoftheaccuracy(e.g.covariance)
ThomasBayes
Samplespace
Posterior
![Page 23: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/23.jpg)
RecursiveBayesfilters
• Given:– Systemmodelsinprobabilisticforms
(knownstatisticsofvk,wk)– Initialstate alsoknownastheprior–Measurements
Markovianprocess
Measurementsconditionallyindependentgivenstate
𝑧$, … , 𝑧-
![Page 24: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/24.jpg)
RecursiveBayesfilters• Predictionstep(a-priori)
– Usesthesystemmodeltopredictforward– Deforms/translates/spreadsstatepdfduetorandomnoise
• Updatestep(a-posteriori)
– Updatethepredictioninlightofnewdata– Tightensthestatepdf
![Page 25: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/25.jpg)
Priorvsposterior?
• Itcanseemoddtoregard𝑝 𝑥- 𝑧$:-/$ asprior• Compare
to
• Inupdatewith𝑧-,itisaworkingprior
𝑃(𝑥-|𝑧-, 𝑧$:-/$ ) =𝑝 𝑧- 𝑥-, 𝑧$:-/$ 𝑃(𝑥-|𝑧$:-/$)
𝑝(𝑧-|𝑧$:-/$)
posteriorlikelihood prior
evidence
𝑃(𝑥-|𝑧-, 𝑧$:-/$) =𝑝 𝑧- 𝑥-, 𝑧$:-/$ 𝑃(𝑥-|𝑧$:-/$)
𝑝(𝑧-|𝑧$:-/$)
![Page 26: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/26.jpg)
Generalprediction-updateframework
• Assume isgivenattimek-1• Prediction:
• UsingChapman-Kolmogorovidentity+Markovproperty
(1)
PreviousposteriorSystemmodel
![Page 27: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/27.jpg)
Generalprediction-updateframework
• Updatestep
Where
(2)
Measurementmodel
Currentprior
Normalizationconstant
![Page 28: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/28.jpg)
Generatingestimates
• Knowledgeof enablestocomputeoptimalestimatewithrespecttoanycriterion.e.g.–Minimummean-squareerror(MMSE)
–Maximuma-posteriori
![Page 29: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/29.jpg)
Generalprediction-updateframework
➔So(1)and(2)giveoptimalsolutionfortherecursiveestimationproblem!
• Unfortunately…onlyconceptualsolution– integralsareintractable…– Cannotrepresentarbitrarypdfs!
• However,optimalsolutiondoes existforseveralrestrictivecases
![Page 30: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/30.jpg)
Today’slecture• Fundamentals• Formalizingtimeseriesmodels• Recursivefiltering
• Twocaseswithoptimalsolutions• LinearGaussianmodels• Discretesystems
• Suboptimalsolutions
![Page 31: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/31.jpg)
Restrictivecase#1
• PosteriorateachtimestepisGaussian– Completelydescribedbymeanandcovariance
• If isGaussianitcanbeshownthatisalsoGaussianprovidedthat:
– areGaussian– arelinear
![Page 32: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/32.jpg)
Restrictivecase#1
• WhyLinear?
YacovHel-Or
![Page 33: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/33.jpg)
Restrictivecase#1
• WhyLinear?
YacovHel-Or
![Page 34: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/34.jpg)
Restrictivecase#1
• Linearsystemwithadditivenoise
• Simpleexampleagain
/$
/$
![Page 35: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/35.jpg)
TheKalmanfilter
• Substitutinginto(1)and(2)yieldsthepredictandupdateequations
RudolfE.Kalman
![Page 36: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/36.jpg)
TheKalmanfilter
Predict:
Update:
![Page 37: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/37.jpg)
Intuitionvia1Dexample
• Lostatsea– Night– Noideaoflocation– Forsimplicity– let’sassume1D
– Notmoving
*ExampleandplotsbyMaybeck,“Stochasticmodels,estimationandcontrol,volume1”
![Page 38: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/38.jpg)
Example– cont’d
• Timet1:StarSighting– Denotez(t1)=z1
• Uncertainty(inaccuracies,humanerror,etc)– Denoteσ1(normal)
• Canestablishtheconditionalprobabilityofx(t1)givenmeasurementz1
![Page 39: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/39.jpg)
Example– cont’d
• Probabilityforanylocation,basedonmeasurement• ForGaussiandensity– 68.3%within±σ1• Bestestimateofposition:Mean/Mode/Median
![Page 40: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/40.jpg)
Example– cont’d
• Timet2:friend(moretrained)– x(t2)=z2,σ(t2)=σ2– Sinceshehashigherskill:σ2<σ1
![Page 41: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/41.jpg)
Example– cont’d
• f(x(t2)|z1,z2)alsoGaussian
![Page 42: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/42.jpg)
Example– cont’d
• σ lessthanbothσ1andσ2• σ1=σ2:average• σ1>σ2:moreweighttoz2• Rewrite:
![Page 43: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/43.jpg)
Example– cont’d
• TheKalmanupdaterule:
BestPredictionpriortoz2(apriori)
OptimalWeighting(KalmanGain)
Residual
BestestimateGivenz2
(aposteriori)
![Page 44: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/44.jpg)
TheKalmanfilter
Predict:
Update:Generallyincreases
variance
Generallydecreasesvariance
![Page 45: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/45.jpg)
Kalmangain
• Smallmeasurementerror,𝐻 invertible:
• Smallpredictionerror:
![Page 46: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/46.jpg)
TheKalmanfilter• Pros (comparedtoe.g.particlefilter)– Optimalclosed-formsolutiontothetrackingproblem(undertheassumptions)• Noalgorithmcandobetterinalinear-Gaussianenvironment!
– All‘logical’estimationscollapsetoauniquesolution– Simpletoimplement– Fasttoexecute
• Cons– Ifeitherthesystemormeasurementmodelisnon-linearà theposteriorwillbenon-Gaussian
Smoothingpossiblewithabackwardmessage
(cf HMMs,lecture10)
![Page 47: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/47.jpg)
Restrictivecase#2
• Thestatespace(domain)isdiscreteandfinite• Assumethestatespaceattimek-1consistsofstates
• Let betheconditionalprobabilityofthestateattimek-1,givenmeasurementsuptok-1
![Page 48: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/48.jpg)
TheGrid-basedfilter
• Theposteriorpdfatk-1canbeexpressedassumofdeltafunctions
• Again,substitutioninto(1)and(2)yieldsthepredictandupdateequations
EquivalenttobeliefmonitoringinHMMs
(Lecture10)
![Page 49: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/49.jpg)
TheGrid-basedfilter• Prediction
• Newpriorisalsoweightedsumofdeltafunctions• Newpriorweightsarereweightingofoldposteriorweightsusingstatetransition
probabilities
(1)
![Page 50: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/50.jpg)
TheGrid-basedfilter• Update
• Posteriorweightsarereweightingofpriorweightsusinglikelihoods(+normalization)
(2)
![Page 51: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/51.jpg)
TheGrid-basedfilter
• Pros:– assumedknown,butnoconstraintontheir(discrete)shapes
– Easyextensiontovaryingnumberofstates– Optimalsolutionforthediscrete-finiteenvironment!
• Cons:– Curseofdimensionality
• Inefficientifthestatespaceislarge– Staticallyconsidersall possiblehypotheses
Smoothingpossiblewithabackwardmessage
(cf HMMs,lecture10)
![Page 52: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/52.jpg)
Today’slecture• Fundamentals• Formalizingtimeseriesmodels• Recursivefiltering
• Twocaseswithoptimalsolutions• LinearGaussianmodels• Discretesystems
• Suboptimalsolutions
![Page 53: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/53.jpg)
Suboptimalsolutions• Inmanycasestheseassumptionsdonothold– Practicalenvironmentsarenonlinear,non-Gaussian,continuous
➔Approximationsarenecessary…
– ExtendedKalmanfilter(EKF)– Approximategrid-basedmethods– Multiple-modelestimators– UnscentedKalmanfilter(UKF)– Particlefilters(PF)– …
Analyticapproximations
Samplingapproaches
Numericalmethods
Gaussian-sumfilters
![Page 54: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/54.jpg)
TheextendedKalmanfilter
• Theidea:locallinearizationofthedynamicsystemmightbesufficientdescriptionofthenonlinearity
• Themodel:nonlinearsystemwithadditivenoise
![Page 55: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/55.jpg)
TheextendedKalmanfilter
• f,hareapproximatedusingafirst-orderTaylorseriesexpansion(evalatstateestimations)
Predict:
Update:
![Page 56: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/56.jpg)
TheextendedKalmanfilter
![Page 57: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/57.jpg)
TheextendedKalmanfilter• Pros– Goodapproximationwhenmodelsarenear-linear– Efficienttocalculate(defactomethodfornavigationsystemsandGPS)
• Cons– Onlyapproximation(optimalitynotproven)– StillasingleGaussianapproximations
• Nonlinearityà non-Gaussianity(e.g.bimodal)– Ifwehavemultimodalhypothesis,andchooseincorrectly– canbedifficulttorecover
– Inapplicablewhenf,h discontinuous
![Page 58: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/58.jpg)
TheunscentedKalman filter
• CangivemoreaccuratelyapproximatesposteriorYacovHel-Or
![Page 59: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/59.jpg)
Challenges• Detectionspecific– Full/partialocclusions– Falsepositives/falsenegatives– Entering/leavingthescene
• Efficiency• Multiplemodelsandswitchingdynamics• Multipletargets• …
![Page 60: Kalman filtering and friends: Inference in time series modelsdprecup/courses/ML/Lectures/ml-lecture17.pdf · Kalman filtering and friends: Inference in time series models Herke van](https://reader034.vdocuments.mx/reader034/viewer/2022042111/5e8c28bcc98289453a14f87b/html5/thumbnails/60.jpg)
Conclusion• Inferenceintimeseriesmodels:• Past:smoothing• Present:filtering• Future:prediction
• RecursiveBayesfilteroptimal• Computableintwocases• LinearGaussiansystems:Kalman filter• Discretesystems:Gridfilter
• Approximatesolutionsforothersystems