root/doc/latex/classbdm_1_1EKF.tex @ 261

Revision 261, 14.9 kB (checked in by smidl, 16 years ago)

doc

Line 
1\hypertarget{classbdm_1_1EKF}{
2\section{bdm::EKF$<$ sq\_\-T $>$ Class Template Reference}
3\label{classbdm_1_1EKF}\index{bdm::EKF@{bdm::EKF}}
4}
5Extended \hyperlink{classbdm_1_1Kalman}{Kalman} Filter. 
6
7
8{\tt \#include $<$libKF.h$>$}
9
10Inheritance diagram for bdm::EKF$<$ sq\_\-T $>$:\nopagebreak
11\begin{figure}[H]
12\begin{center}
13\leavevmode
14\includegraphics[width=117pt]{classbdm_1_1EKF__inherit__graph}
15\end{center}
16\end{figure}
17Collaboration diagram for bdm::EKF$<$ sq\_\-T $>$:\nopagebreak
18\begin{figure}[H]
19\begin{center}
20\leavevmode
21\includegraphics[width=400pt]{classbdm_1_1EKF__coll__graph}
22\end{center}
23\end{figure}
24\subsection*{Public Member Functions}
25\begin{CompactItemize}
26\item 
27\hypertarget{classbdm_1_1EKF_d087a8bb408d26ac4f5c542746b81059}{
28\hyperlink{classbdm_1_1EKF_d087a8bb408d26ac4f5c542746b81059}{EKF} (\hyperlink{classbdm_1_1RV}{RV} rvx, \hyperlink{classbdm_1_1RV}{RV} \hyperlink{classbdm_1_1Kalman_3fe475a1e920b20b63bb342c0e1571f7}{rvy}, \hyperlink{classbdm_1_1RV}{RV} \hyperlink{classbdm_1_1Kalman_149e27424fd1a7cc1c998ea088618a94}{rvu})}
29\label{classbdm_1_1EKF_d087a8bb408d26ac4f5c542746b81059}
30
31\begin{CompactList}\small\item\em Default constructor. \item\end{CompactList}\item 
32\hypertarget{classbdm_1_1EKF_00fec1a0a6a467eb83fb36c65eba7bcb}{
33void \hyperlink{classbdm_1_1EKF_00fec1a0a6a467eb83fb36c65eba7bcb}{set\_\-parameters} (\hyperlink{classbdm_1_1diffbifn}{diffbifn} $\ast$pfxu, \hyperlink{classbdm_1_1diffbifn}{diffbifn} $\ast$phxu, const sq\_\-T Q0, const sq\_\-T R0)}
34\label{classbdm_1_1EKF_00fec1a0a6a467eb83fb36c65eba7bcb}
35
36\begin{CompactList}\small\item\em Set nonlinear functions for mean values and covariance matrices. \item\end{CompactList}\item 
37\hypertarget{classbdm_1_1EKF_3fb182ecc29b10ca1163cecbf3bcccfa}{
38void \hyperlink{classbdm_1_1EKF_3fb182ecc29b10ca1163cecbf3bcccfa}{bayes} (const vec \&dt)}
39\label{classbdm_1_1EKF_3fb182ecc29b10ca1163cecbf3bcccfa}
40
41\begin{CompactList}\small\item\em Here dt = \mbox{[}yt;ut\mbox{]} of appropriate dimensions. \item\end{CompactList}\item 
42\hypertarget{classbdm_1_1Kalman_94eb8cc31731210089db0ba4e1a08a6c}{
43void \hyperlink{classbdm_1_1Kalman_94eb8cc31731210089db0ba4e1a08a6c}{set\_\-parameters} (const mat \&A0, const mat \&B0, const mat \&C0, const mat \&D0, const \hyperlink{classfsqmat}{fsqmat} \&R0, const \hyperlink{classfsqmat}{fsqmat} \&Q0)}
44\label{classbdm_1_1Kalman_94eb8cc31731210089db0ba4e1a08a6c}
45
46\begin{CompactList}\small\item\em Set parameters with check of relevance. \item\end{CompactList}\item 
47\hypertarget{classbdm_1_1Kalman_9264fc6b173ecb803d2684b883f32c68}{
48void \hyperlink{classbdm_1_1Kalman_9264fc6b173ecb803d2684b883f32c68}{set\_\-est} (const vec \&mu0, const \hyperlink{classfsqmat}{fsqmat} \&P0)}
49\label{classbdm_1_1Kalman_9264fc6b173ecb803d2684b883f32c68}
50
51\begin{CompactList}\small\item\em Set estimate values, used e.g. in initialization. \item\end{CompactList}\item 
52\hypertarget{classbdm_1_1Kalman_93b5936ba397f13c05f52885c545f42d}{
53const \hyperlink{classbdm_1_1epdf}{epdf} \& \hyperlink{classbdm_1_1Kalman_93b5936ba397f13c05f52885c545f42d}{\_\-epdf} () const }
54\label{classbdm_1_1Kalman_93b5936ba397f13c05f52885c545f42d}
55
56\begin{CompactList}\small\item\em access function \item\end{CompactList}\item 
57\hypertarget{classbdm_1_1Kalman_c34989b1e53c7d4ecdaea63a95ddbd77}{
58const \hyperlink{classbdm_1_1enorm}{enorm}$<$ \hyperlink{classfsqmat}{fsqmat} $>$ $\ast$ \hyperlink{classbdm_1_1Kalman_c34989b1e53c7d4ecdaea63a95ddbd77}{\_\-e} () const }
59\label{classbdm_1_1Kalman_c34989b1e53c7d4ecdaea63a95ddbd77}
60
61\begin{CompactList}\small\item\em Returns a pointer to the epdf representing posterior density on parameters. Use with care! \item\end{CompactList}\item 
62\hypertarget{classbdm_1_1Kalman_c788ec6e6c6f5f5861ae8a56d8ede277}{
63mat \& \hyperlink{classbdm_1_1Kalman_c788ec6e6c6f5f5861ae8a56d8ede277}{\_\-\_\-K} ()}
64\label{classbdm_1_1Kalman_c788ec6e6c6f5f5861ae8a56d8ede277}
65
66\begin{CompactList}\small\item\em access function \item\end{CompactList}\item 
67\hypertarget{classbdm_1_1Kalman_a250d1dbe7bba861dba2a324520cfa48}{
68vec \hyperlink{classbdm_1_1Kalman_a250d1dbe7bba861dba2a324520cfa48}{\_\-dP} ()}
69\label{classbdm_1_1Kalman_a250d1dbe7bba861dba2a324520cfa48}
70
71\begin{CompactList}\small\item\em access function \item\end{CompactList}\item 
72\hypertarget{classbdm_1_1BM_1dee3fddaf021e62d925289660a707dc}{
73virtual void \hyperlink{classbdm_1_1BM_1dee3fddaf021e62d925289660a707dc}{bayesB} (const mat \&Dt)}
74\label{classbdm_1_1BM_1dee3fddaf021e62d925289660a707dc}
75
76\begin{CompactList}\small\item\em Batch Bayes rule (columns of Dt are observations). \item\end{CompactList}\item 
77virtual double \hyperlink{classbdm_1_1BM_50257e0c1e5b5c73153ea6e716ad8ae0}{logpred} (const vec \&dt) const
78\item 
79\hypertarget{classbdm_1_1BM_0e8ebe61fb14990abe1254bd3dda5fae}{
80vec \hyperlink{classbdm_1_1BM_0e8ebe61fb14990abe1254bd3dda5fae}{logpred\_\-m} (const mat \&dt) const }
81\label{classbdm_1_1BM_0e8ebe61fb14990abe1254bd3dda5fae}
82
83\begin{CompactList}\small\item\em Matrix version of logpred. \item\end{CompactList}\item 
84\hypertarget{classbdm_1_1BM_710e7d69c0d8791fb41a7cd4683cca2c}{
85virtual \hyperlink{classbdm_1_1epdf}{epdf} $\ast$ \hyperlink{classbdm_1_1BM_710e7d69c0d8791fb41a7cd4683cca2c}{predictor} (const \hyperlink{classbdm_1_1RV}{RV} \&\hyperlink{classbdm_1_1BM_18d6db4af8ee42077741d9e3618153ca}{rv}) const }
86\label{classbdm_1_1BM_710e7d69c0d8791fb41a7cd4683cca2c}
87
88\begin{CompactList}\small\item\em Constructs a predictive density (marginal density on data). \item\end{CompactList}\item 
89\hypertarget{classbdm_1_1BM_40a3c891996391e3135518053a917793}{
90const \hyperlink{classbdm_1_1RV}{RV} \& \hyperlink{classbdm_1_1BM_40a3c891996391e3135518053a917793}{\_\-rv} () const }
91\label{classbdm_1_1BM_40a3c891996391e3135518053a917793}
92
93\begin{CompactList}\small\item\em access function \item\end{CompactList}\item 
94\hypertarget{classbdm_1_1BM_5be65d37dedfe33a3671e7065f523a70}{
95double \hyperlink{classbdm_1_1BM_5be65d37dedfe33a3671e7065f523a70}{\_\-ll} () const }
96\label{classbdm_1_1BM_5be65d37dedfe33a3671e7065f523a70}
97
98\begin{CompactList}\small\item\em access function \item\end{CompactList}\item 
99\hypertarget{classbdm_1_1BM_236b3abbcc93594fc97cd86d82c1a83f}{
100void \hyperlink{classbdm_1_1BM_236b3abbcc93594fc97cd86d82c1a83f}{set\_\-evalll} (bool evl0)}
101\label{classbdm_1_1BM_236b3abbcc93594fc97cd86d82c1a83f}
102
103\begin{CompactList}\small\item\em access function \item\end{CompactList}\item 
104virtual \hyperlink{classbdm_1_1BM}{BM} $\ast$ \hyperlink{classbdm_1_1BM_3efb3098172f1f67564a312fe732473e}{\_\-copy\_\-} (bool changerv=false)
105\end{CompactItemize}
106\subsection*{Protected Attributes}
107\begin{CompactItemize}
108\item 
109\hypertarget{classbdm_1_1Kalman_3fe475a1e920b20b63bb342c0e1571f7}{
110\hyperlink{classbdm_1_1RV}{RV} \hyperlink{classbdm_1_1Kalman_3fe475a1e920b20b63bb342c0e1571f7}{rvy}}
111\label{classbdm_1_1Kalman_3fe475a1e920b20b63bb342c0e1571f7}
112
113\begin{CompactList}\small\item\em Indetifier of output rv. \item\end{CompactList}\item 
114\hypertarget{classbdm_1_1Kalman_149e27424fd1a7cc1c998ea088618a94}{
115\hyperlink{classbdm_1_1RV}{RV} \hyperlink{classbdm_1_1Kalman_149e27424fd1a7cc1c998ea088618a94}{rvu}}
116\label{classbdm_1_1Kalman_149e27424fd1a7cc1c998ea088618a94}
117
118\begin{CompactList}\small\item\em Indetifier of exogeneous rv. \item\end{CompactList}\item 
119\hypertarget{classbdm_1_1Kalman_ba7699cdb3b1382a54d3e28b9b7517fa}{
120int \hyperlink{classbdm_1_1Kalman_ba7699cdb3b1382a54d3e28b9b7517fa}{dimx}}
121\label{classbdm_1_1Kalman_ba7699cdb3b1382a54d3e28b9b7517fa}
122
123\begin{CompactList}\small\item\em cache of rv.count() \item\end{CompactList}\item 
124\hypertarget{classbdm_1_1Kalman_d2c36ba01760bf207b985bf321b7817f}{
125int \hyperlink{classbdm_1_1Kalman_d2c36ba01760bf207b985bf321b7817f}{dimy}}
126\label{classbdm_1_1Kalman_d2c36ba01760bf207b985bf321b7817f}
127
128\begin{CompactList}\small\item\em cache of rvy.count() \item\end{CompactList}\item 
129\hypertarget{classbdm_1_1Kalman_c5136ef617f6ac0e426bea222755d92b}{
130int \hyperlink{classbdm_1_1Kalman_c5136ef617f6ac0e426bea222755d92b}{dimu}}
131\label{classbdm_1_1Kalman_c5136ef617f6ac0e426bea222755d92b}
132
133\begin{CompactList}\small\item\em cache of rvu.count() \item\end{CompactList}\item 
134\hypertarget{classbdm_1_1Kalman_0a2072e2090c10fac74ad30a023a4ace}{
135mat \hyperlink{classbdm_1_1Kalman_0a2072e2090c10fac74ad30a023a4ace}{A}}
136\label{classbdm_1_1Kalman_0a2072e2090c10fac74ad30a023a4ace}
137
138\begin{CompactList}\small\item\em Matrix A. \item\end{CompactList}\item 
139\hypertarget{classbdm_1_1Kalman_5977b2c81857948a35105f0e7840203c}{
140mat \hyperlink{classbdm_1_1Kalman_5977b2c81857948a35105f0e7840203c}{B}}
141\label{classbdm_1_1Kalman_5977b2c81857948a35105f0e7840203c}
142
143\begin{CompactList}\small\item\em Matrix B. \item\end{CompactList}\item 
144\hypertarget{classbdm_1_1Kalman_818eba63a23972786a4579ad30294177}{
145mat \hyperlink{classbdm_1_1Kalman_818eba63a23972786a4579ad30294177}{C}}
146\label{classbdm_1_1Kalman_818eba63a23972786a4579ad30294177}
147
148\begin{CompactList}\small\item\em Matrix C. \item\end{CompactList}\item 
149\hypertarget{classbdm_1_1Kalman_7b56ac423d0654b5755e4f852a870456}{
150mat \hyperlink{classbdm_1_1Kalman_7b56ac423d0654b5755e4f852a870456}{D}}
151\label{classbdm_1_1Kalman_7b56ac423d0654b5755e4f852a870456}
152
153\begin{CompactList}\small\item\em Matrix D. \item\end{CompactList}\item 
154\hypertarget{classbdm_1_1Kalman_70f8bf19e81b532c60fd3a7a152425ee}{
155\hyperlink{classfsqmat}{fsqmat} \hyperlink{classbdm_1_1Kalman_70f8bf19e81b532c60fd3a7a152425ee}{Q}}
156\label{classbdm_1_1Kalman_70f8bf19e81b532c60fd3a7a152425ee}
157
158\begin{CompactList}\small\item\em Matrix Q in square-root form. \item\end{CompactList}\item 
159\hypertarget{classbdm_1_1Kalman_475b088287cdfbba4dc60a3d027728b7}{
160\hyperlink{classfsqmat}{fsqmat} \hyperlink{classbdm_1_1Kalman_475b088287cdfbba4dc60a3d027728b7}{R}}
161\label{classbdm_1_1Kalman_475b088287cdfbba4dc60a3d027728b7}
162
163\begin{CompactList}\small\item\em Matrix R in square-root form. \item\end{CompactList}\item 
164\hypertarget{classbdm_1_1Kalman_383f329ff18bbe219254c8b3b916f40d}{
165\hyperlink{classbdm_1_1enorm}{enorm}$<$ \hyperlink{classfsqmat}{fsqmat} $>$ \hyperlink{classbdm_1_1Kalman_383f329ff18bbe219254c8b3b916f40d}{est}}
166\label{classbdm_1_1Kalman_383f329ff18bbe219254c8b3b916f40d}
167
168\begin{CompactList}\small\item\em posterior density on \$x\_\-t\$ \item\end{CompactList}\item 
169\hypertarget{classbdm_1_1Kalman_ba555c394c429f6831c9bbabfa2c944c}{
170\hyperlink{classbdm_1_1enorm}{enorm}$<$ \hyperlink{classfsqmat}{fsqmat} $>$ \hyperlink{classbdm_1_1Kalman_ba555c394c429f6831c9bbabfa2c944c}{fy}}
171\label{classbdm_1_1Kalman_ba555c394c429f6831c9bbabfa2c944c}
172
173\begin{CompactList}\small\item\em preditive density on \$y\_\-t\$ \item\end{CompactList}\item 
174\hypertarget{classbdm_1_1Kalman_bd69dfb802465f22dd84d73a180d5c92}{
175mat \hyperlink{classbdm_1_1Kalman_bd69dfb802465f22dd84d73a180d5c92}{\_\-K}}
176\label{classbdm_1_1Kalman_bd69dfb802465f22dd84d73a180d5c92}
177
178\begin{CompactList}\small\item\em placeholder for Kalman gain \item\end{CompactList}\item 
179\hypertarget{classbdm_1_1Kalman_c249d45258c8578b13858ad3e7b729b1}{
180vec \& \hyperlink{classbdm_1_1Kalman_c249d45258c8578b13858ad3e7b729b1}{\_\-yp}}
181\label{classbdm_1_1Kalman_c249d45258c8578b13858ad3e7b729b1}
182
183\begin{CompactList}\small\item\em cache of fy.mu \item\end{CompactList}\item 
184\hypertarget{classbdm_1_1Kalman_2dd268f2d7fbe6382cb8825a1114192a}{
185\hyperlink{classfsqmat}{fsqmat} \& \hyperlink{classbdm_1_1Kalman_2dd268f2d7fbe6382cb8825a1114192a}{\_\-Ry}}
186\label{classbdm_1_1Kalman_2dd268f2d7fbe6382cb8825a1114192a}
187
188\begin{CompactList}\small\item\em cache of fy.R \item\end{CompactList}\item 
189\hypertarget{classbdm_1_1Kalman_fa172078091e45561343fa513dd573b0}{
190vec \& \hyperlink{classbdm_1_1Kalman_fa172078091e45561343fa513dd573b0}{\_\-mu}}
191\label{classbdm_1_1Kalman_fa172078091e45561343fa513dd573b0}
192
193\begin{CompactList}\small\item\em cache of est.mu \item\end{CompactList}\item 
194\hypertarget{classbdm_1_1Kalman_00c27b0bf324f0018497921ca23c71ed}{
195\hyperlink{classfsqmat}{fsqmat} \& \hyperlink{classbdm_1_1Kalman_00c27b0bf324f0018497921ca23c71ed}{\_\-P}}
196\label{classbdm_1_1Kalman_00c27b0bf324f0018497921ca23c71ed}
197
198\begin{CompactList}\small\item\em cache of est.R \item\end{CompactList}\item 
199\hypertarget{classbdm_1_1BM_18d6db4af8ee42077741d9e3618153ca}{
200\hyperlink{classbdm_1_1RV}{RV} \hyperlink{classbdm_1_1BM_18d6db4af8ee42077741d9e3618153ca}{rv}}
201\label{classbdm_1_1BM_18d6db4af8ee42077741d9e3618153ca}
202
203\begin{CompactList}\small\item\em Random variable of the posterior. \item\end{CompactList}\item 
204\hypertarget{classbdm_1_1BM_4064b6559d962633e4372b12f4cd204a}{
205double \hyperlink{classbdm_1_1BM_4064b6559d962633e4372b12f4cd204a}{ll}}
206\label{classbdm_1_1BM_4064b6559d962633e4372b12f4cd204a}
207
208\begin{CompactList}\small\item\em Logarithm of marginalized data likelihood. \item\end{CompactList}\item 
209\hypertarget{classbdm_1_1BM_faff0ad12556fe7dc0e2807d4fd938ee}{
210bool \hyperlink{classbdm_1_1BM_faff0ad12556fe7dc0e2807d4fd938ee}{evalll}}
211\label{classbdm_1_1BM_faff0ad12556fe7dc0e2807d4fd938ee}
212
213\begin{CompactList}\small\item\em If true, the filter will compute likelihood of the data record and store it in {\tt ll} . Set to false if you want to save computational time. \item\end{CompactList}\end{CompactItemize}
214
215
216\subsection{Detailed Description}
217\subsubsection*{template$<$class sq\_\-T$>$ class bdm::EKF$<$ sq\_\-T $>$}
218
219Extended \hyperlink{classbdm_1_1Kalman}{Kalman} Filter.
220
221An approximation of the exact Bayesian filter with Gaussian noices and non-linear evolutions of their mean.
222
223\subsection{Member Function Documentation}
224\hypertarget{classbdm_1_1BM_50257e0c1e5b5c73153ea6e716ad8ae0}{
225\index{bdm::EKF@{bdm::EKF}!logpred@{logpred}}
226\index{logpred@{logpred}!bdm::EKF@{bdm::EKF}}
227\subsubsection[logpred]{\setlength{\rightskip}{0pt plus 5cm}virtual double bdm::BM::logpred (const vec \& {\em dt}) const\hspace{0.3cm}{\tt  \mbox{[}inline, virtual, inherited\mbox{]}}}}
228\label{classbdm_1_1BM_50257e0c1e5b5c73153ea6e716ad8ae0}
229
230
231Evaluates predictive log-likelihood of the given data record I.e. marginal likelihood of the data with the posterior integrated out.
232
233Reimplemented in \hyperlink{classbdm_1_1ARX_080a7e531e3aa06694112863b15bc6a4}{bdm::ARX}, \hyperlink{classbdm_1_1MixEF_da724da464a75e07521941e430929efa}{bdm::MixEF}, and \hyperlink{classbdm_1_1multiBM_e157b607c1e3fa91d42aeea44458e2bf}{bdm::multiBM}.
234
235Referenced by bdm::BM::logpred\_\-m().\hypertarget{classbdm_1_1BM_3efb3098172f1f67564a312fe732473e}{
236\index{bdm::EKF@{bdm::EKF}!\_\-copy\_\-@{\_\-copy\_\-}}
237\index{\_\-copy\_\-@{\_\-copy\_\-}!bdm::EKF@{bdm::EKF}}
238\subsubsection[\_\-copy\_\-]{\setlength{\rightskip}{0pt plus 5cm}virtual {\bf BM}$\ast$ bdm::BM::\_\-copy\_\- (bool {\em changerv} = {\tt false})\hspace{0.3cm}{\tt  \mbox{[}inline, virtual, inherited\mbox{]}}}}
239\label{classbdm_1_1BM_3efb3098172f1f67564a312fe732473e}
240
241
242Copy function required in vectors, Arrays of \hyperlink{classbdm_1_1BM}{BM} etc. Have to be DELETED manually! Prototype: BM$\ast$ \hyperlink{classbdm_1_1BM_3efb3098172f1f67564a312fe732473e}{\_\-copy\_\-()}\{\hyperlink{classbdm_1_1BM}{BM} Tmp$\ast$=new Tmp(this$\ast$); return Tmp; \} 
243
244Reimplemented in \hyperlink{classbdm_1_1ARX_20ff2de8d862f28de7da83444d65bcdb}{bdm::ARX}, and \hyperlink{classbdm_1_1BMEF_5912dbcf28ae711e30b08c2fa766a3e6}{bdm::BMEF}.
245
246The documentation for this class was generated from the following file:\begin{CompactItemize}
247\item 
248\hyperlink{libKF_8h}{libKF.h}\end{CompactItemize}
Note: See TracBrowser for help on using the browser.