root/doc/latex/classbdm_1_1EKFCh.tex @ 280

Revision 280, 16.0 kB (checked in by smidl, 16 years ago)

progress...

Line 
1\hypertarget{classbdm_1_1EKFCh}{
2\section{bdm::EKFCh Class Reference}
3\label{classbdm_1_1EKFCh}\index{bdm::EKFCh@{bdm::EKFCh}}
4}
5{\tt \#include $<$libKF.h$>$}
6
7Inheritance diagram for bdm::EKFCh::\begin{figure}[H]
8\begin{center}
9\leavevmode
10\includegraphics[height=3.26531cm]{classbdm_1_1EKFCh}
11\end{center}
12\end{figure}
13
14
15\subsection{Detailed Description}
16Extended \hyperlink{classbdm_1_1Kalman}{Kalman} Filter in Square root.
17
18An approximation of the exact Bayesian filter with Gaussian noices and non-linear evolutions of their mean. \subsection*{Public Member Functions}
19\begin{CompactItemize}
20\item 
21\hypertarget{classbdm_1_1EKFCh_50f9fbffad721f35e5ccb75d0f6b842a}{
22void \hyperlink{classbdm_1_1EKFCh_50f9fbffad721f35e5ccb75d0f6b842a}{set\_\-parameters} (\hyperlink{classbdm_1_1diffbifn}{diffbifn} $\ast$\hyperlink{classbdm_1_1EKFCh_e1e895f994398a55bc425551fc275ba3}{pfxu}, \hyperlink{classbdm_1_1diffbifn}{diffbifn} $\ast$\hyperlink{classbdm_1_1EKFCh_6b34c69641826322467b704e8252f317}{phxu}, const \hyperlink{classchmat}{chmat} Q0, const \hyperlink{classchmat}{chmat} R0)}
23\label{classbdm_1_1EKFCh_50f9fbffad721f35e5ccb75d0f6b842a}
24
25\begin{CompactList}\small\item\em Set nonlinear functions for mean values and covariance matrices. \item\end{CompactList}\item 
26\hypertarget{classbdm_1_1EKFCh_4c8609c37290b158f88a31dae4047225}{
27void \hyperlink{classbdm_1_1EKFCh_4c8609c37290b158f88a31dae4047225}{bayes} (const vec \&dt)}
28\label{classbdm_1_1EKFCh_4c8609c37290b158f88a31dae4047225}
29
30\begin{CompactList}\small\item\em Here dt = \mbox{[}yt;ut\mbox{]} of appropriate dimensions. \item\end{CompactList}\item 
31\hypertarget{classbdm_1_1KalmanCh_20a4d4c664e8ac8a3f1bb7b0d11c6d87}{
32void \hyperlink{classbdm_1_1KalmanCh_20a4d4c664e8ac8a3f1bb7b0d11c6d87}{set\_\-parameters} (const mat \&A0, const mat \&B0, const mat \&C0, const mat \&D0, const \hyperlink{classchmat}{chmat} \&Q0, const \hyperlink{classchmat}{chmat} \&R0)}
33\label{classbdm_1_1KalmanCh_20a4d4c664e8ac8a3f1bb7b0d11c6d87}
34
35\begin{CompactList}\small\item\em Set parameters with check of relevance. \item\end{CompactList}\item 
36\hypertarget{classbdm_1_1KalmanCh_6e169272657ed101f3d128b49c59b890}{
37void \textbf{set\_\-statistics} (const vec \&mu0, const \hyperlink{classchmat}{chmat} \&P0)}
38\label{classbdm_1_1KalmanCh_6e169272657ed101f3d128b49c59b890}
39
40\item 
41\hypertarget{classbdm_1_1Kalman_9264fc6b173ecb803d2684b883f32c68}{
42void \hyperlink{classbdm_1_1Kalman_9264fc6b173ecb803d2684b883f32c68}{set\_\-est} (const vec \&mu0, const \hyperlink{classchmat}{chmat} \&P0)}
43\label{classbdm_1_1Kalman_9264fc6b173ecb803d2684b883f32c68}
44
45\begin{CompactList}\small\item\em Set estimate values, used e.g. in initialization. \item\end{CompactList}\item 
46\hypertarget{classbdm_1_1Kalman_f75e487ff6c129d7012d702030f8c890}{
47const \hyperlink{classbdm_1_1epdf}{epdf} \& \hyperlink{classbdm_1_1Kalman_f75e487ff6c129d7012d702030f8c890}{posterior} () const }
48\label{classbdm_1_1Kalman_f75e487ff6c129d7012d702030f8c890}
49
50\begin{CompactList}\small\item\em access function \item\end{CompactList}\item 
51\hypertarget{classbdm_1_1Kalman_c34989b1e53c7d4ecdaea63a95ddbd77}{
52const \hyperlink{classbdm_1_1enorm}{enorm}$<$ \hyperlink{classchmat}{chmat} $>$ $\ast$ \textbf{\_\-e} () const }
53\label{classbdm_1_1Kalman_c34989b1e53c7d4ecdaea63a95ddbd77}
54
55\item 
56\hypertarget{classbdm_1_1Kalman_c788ec6e6c6f5f5861ae8a56d8ede277}{
57mat \& \hyperlink{classbdm_1_1Kalman_c788ec6e6c6f5f5861ae8a56d8ede277}{\_\-\_\-K} ()}
58\label{classbdm_1_1Kalman_c788ec6e6c6f5f5861ae8a56d8ede277}
59
60\begin{CompactList}\small\item\em access function \item\end{CompactList}\item 
61\hypertarget{classbdm_1_1Kalman_a250d1dbe7bba861dba2a324520cfa48}{
62vec \hyperlink{classbdm_1_1Kalman_a250d1dbe7bba861dba2a324520cfa48}{\_\-dP} ()}
63\label{classbdm_1_1Kalman_a250d1dbe7bba861dba2a324520cfa48}
64
65\begin{CompactList}\small\item\em access function \item\end{CompactList}\end{CompactItemize}
66\begin{Indent}{\bf Constructors}\par
67\begin{CompactItemize}
68\item 
69virtual \hyperlink{classbdm_1_1BM}{BM} $\ast$ \hyperlink{classbdm_1_1BM_c0f027ff91d8459937c6f60ff8e553ff}{\_\-copy\_\-} ()
70\end{CompactItemize}
71\end{Indent}
72\begin{Indent}{\bf Mathematical operations}\par
73\begin{CompactItemize}
74\item 
75\hypertarget{classbdm_1_1BM_1dee3fddaf021e62d925289660a707dc}{
76virtual void \hyperlink{classbdm_1_1BM_1dee3fddaf021e62d925289660a707dc}{bayesB} (const mat \&Dt)}
77\label{classbdm_1_1BM_1dee3fddaf021e62d925289660a707dc}
78
79\begin{CompactList}\small\item\em Batch Bayes rule (columns of Dt are observations). \item\end{CompactList}\item 
80virtual double \hyperlink{classbdm_1_1BM_50257e0c1e5b5c73153ea6e716ad8ae0}{logpred} (const vec \&dt) const
81\item 
82\hypertarget{classbdm_1_1BM_0e8ebe61fb14990abe1254bd3dda5fae}{
83vec \hyperlink{classbdm_1_1BM_0e8ebe61fb14990abe1254bd3dda5fae}{logpred\_\-m} (const mat \&dt) const }
84\label{classbdm_1_1BM_0e8ebe61fb14990abe1254bd3dda5fae}
85
86\begin{CompactList}\small\item\em Matrix version of logpred. \item\end{CompactList}\item 
87\hypertarget{classbdm_1_1BM_688d7a2aced1e06aa1c468d73a9e5eba}{
88virtual \hyperlink{classbdm_1_1epdf}{epdf} $\ast$ \hyperlink{classbdm_1_1BM_688d7a2aced1e06aa1c468d73a9e5eba}{epredictor} () const }
89\label{classbdm_1_1BM_688d7a2aced1e06aa1c468d73a9e5eba}
90
91\begin{CompactList}\small\item\em Constructs a predictive density $ f(d_{t+1} |d_{t}, \ldots d_{0}) $. \item\end{CompactList}\item 
92\hypertarget{classbdm_1_1BM_598b25e3f3d96a5bc00a5faeb5b3c912}{
93virtual \hyperlink{classbdm_1_1mpdf}{mpdf} $\ast$ \hyperlink{classbdm_1_1BM_598b25e3f3d96a5bc00a5faeb5b3c912}{predictor} () const }
94\label{classbdm_1_1BM_598b25e3f3d96a5bc00a5faeb5b3c912}
95
96\begin{CompactList}\small\item\em Constructs a conditional density 1-step ahead predictor. \item\end{CompactList}\end{CompactItemize}
97\end{Indent}
98\begin{Indent}{\bf Access to attributes}\par
99\begin{CompactItemize}
100\item 
101\hypertarget{classbdm_1_1BM_ff2d8755ba0b3def927d31305c03b09c}{
102const \hyperlink{classbdm_1_1RV}{RV} \& \textbf{\_\-drv} () const }
103\label{classbdm_1_1BM_ff2d8755ba0b3def927d31305c03b09c}
104
105\item 
106\hypertarget{classbdm_1_1BM_f135ae6dce7e9f30c9f88229c7930b96}{
107void \textbf{set\_\-drv} (const \hyperlink{classbdm_1_1RV}{RV} \&rv)}
108\label{classbdm_1_1BM_f135ae6dce7e9f30c9f88229c7930b96}
109
110\item 
111\hypertarget{classbdm_1_1BM_b38d92f17620813ad872d86e01a26e5e}{
112void \textbf{set\_\-rv} (const \hyperlink{classbdm_1_1RV}{RV} \&rv)}
113\label{classbdm_1_1BM_b38d92f17620813ad872d86e01a26e5e}
114
115\item 
116\hypertarget{classbdm_1_1BM_5be65d37dedfe33a3671e7065f523a70}{
117double \textbf{\_\-ll} () const }
118\label{classbdm_1_1BM_5be65d37dedfe33a3671e7065f523a70}
119
120\item 
121\hypertarget{classbdm_1_1BM_236b3abbcc93594fc97cd86d82c1a83f}{
122void \textbf{set\_\-evalll} (bool evl0)}
123\label{classbdm_1_1BM_236b3abbcc93594fc97cd86d82c1a83f}
124
125\end{CompactItemize}
126\end{Indent}
127\subsection*{Protected Attributes}
128\begin{CompactItemize}
129\item 
130\hypertarget{classbdm_1_1EKFCh_e1e895f994398a55bc425551fc275ba3}{
131\hyperlink{classbdm_1_1diffbifn}{diffbifn} $\ast$ \hyperlink{classbdm_1_1EKFCh_e1e895f994398a55bc425551fc275ba3}{pfxu}}
132\label{classbdm_1_1EKFCh_e1e895f994398a55bc425551fc275ba3}
133
134\begin{CompactList}\small\item\em Internal Model f(x,u). \item\end{CompactList}\item 
135\hypertarget{classbdm_1_1EKFCh_6b34c69641826322467b704e8252f317}{
136\hyperlink{classbdm_1_1diffbifn}{diffbifn} $\ast$ \hyperlink{classbdm_1_1EKFCh_6b34c69641826322467b704e8252f317}{phxu}}
137\label{classbdm_1_1EKFCh_6b34c69641826322467b704e8252f317}
138
139\begin{CompactList}\small\item\em Observation Model h(x,u). \item\end{CompactList}\item 
140\hypertarget{classbdm_1_1KalmanCh_48611c8582706cfa62e832be0972e75d}{
141mat \hyperlink{classbdm_1_1KalmanCh_48611c8582706cfa62e832be0972e75d}{preA}}
142\label{classbdm_1_1KalmanCh_48611c8582706cfa62e832be0972e75d}
143
144\begin{CompactList}\small\item\em pre array (triangular matrix) \item\end{CompactList}\item 
145\hypertarget{classbdm_1_1KalmanCh_bcbd68f51d4b57246e7784ca5900171f}{
146mat \hyperlink{classbdm_1_1KalmanCh_bcbd68f51d4b57246e7784ca5900171f}{postA}}
147\label{classbdm_1_1KalmanCh_bcbd68f51d4b57246e7784ca5900171f}
148
149\begin{CompactList}\small\item\em post array (triangular matrix) \item\end{CompactList}\item 
150\hypertarget{classbdm_1_1Kalman_3fe475a1e920b20b63bb342c0e1571f7}{
151\hyperlink{classbdm_1_1RV}{RV} \hyperlink{classbdm_1_1Kalman_3fe475a1e920b20b63bb342c0e1571f7}{rvy}}
152\label{classbdm_1_1Kalman_3fe475a1e920b20b63bb342c0e1571f7}
153
154\begin{CompactList}\small\item\em Indetifier of output rv. \item\end{CompactList}\item 
155\hypertarget{classbdm_1_1Kalman_149e27424fd1a7cc1c998ea088618a94}{
156\hyperlink{classbdm_1_1RV}{RV} \hyperlink{classbdm_1_1Kalman_149e27424fd1a7cc1c998ea088618a94}{rvu}}
157\label{classbdm_1_1Kalman_149e27424fd1a7cc1c998ea088618a94}
158
159\begin{CompactList}\small\item\em Indetifier of exogeneous rv. \item\end{CompactList}\item 
160\hypertarget{classbdm_1_1Kalman_ba7699cdb3b1382a54d3e28b9b7517fa}{
161int \hyperlink{classbdm_1_1Kalman_ba7699cdb3b1382a54d3e28b9b7517fa}{dimx}}
162\label{classbdm_1_1Kalman_ba7699cdb3b1382a54d3e28b9b7517fa}
163
164\begin{CompactList}\small\item\em cache of rv.count() \item\end{CompactList}\item 
165\hypertarget{classbdm_1_1Kalman_d2c36ba01760bf207b985bf321b7817f}{
166int \hyperlink{classbdm_1_1Kalman_d2c36ba01760bf207b985bf321b7817f}{dimy}}
167\label{classbdm_1_1Kalman_d2c36ba01760bf207b985bf321b7817f}
168
169\begin{CompactList}\small\item\em cache of rvy.count() \item\end{CompactList}\item 
170\hypertarget{classbdm_1_1Kalman_c5136ef617f6ac0e426bea222755d92b}{
171int \hyperlink{classbdm_1_1Kalman_c5136ef617f6ac0e426bea222755d92b}{dimu}}
172\label{classbdm_1_1Kalman_c5136ef617f6ac0e426bea222755d92b}
173
174\begin{CompactList}\small\item\em cache of rvu.count() \item\end{CompactList}\item 
175\hypertarget{classbdm_1_1Kalman_0a2072e2090c10fac74ad30a023a4ace}{
176mat \hyperlink{classbdm_1_1Kalman_0a2072e2090c10fac74ad30a023a4ace}{A}}
177\label{classbdm_1_1Kalman_0a2072e2090c10fac74ad30a023a4ace}
178
179\begin{CompactList}\small\item\em Matrix A. \item\end{CompactList}\item 
180\hypertarget{classbdm_1_1Kalman_5977b2c81857948a35105f0e7840203c}{
181mat \hyperlink{classbdm_1_1Kalman_5977b2c81857948a35105f0e7840203c}{B}}
182\label{classbdm_1_1Kalman_5977b2c81857948a35105f0e7840203c}
183
184\begin{CompactList}\small\item\em Matrix B. \item\end{CompactList}\item 
185\hypertarget{classbdm_1_1Kalman_818eba63a23972786a4579ad30294177}{
186mat \hyperlink{classbdm_1_1Kalman_818eba63a23972786a4579ad30294177}{C}}
187\label{classbdm_1_1Kalman_818eba63a23972786a4579ad30294177}
188
189\begin{CompactList}\small\item\em Matrix C. \item\end{CompactList}\item 
190\hypertarget{classbdm_1_1Kalman_7b56ac423d0654b5755e4f852a870456}{
191mat \hyperlink{classbdm_1_1Kalman_7b56ac423d0654b5755e4f852a870456}{D}}
192\label{classbdm_1_1Kalman_7b56ac423d0654b5755e4f852a870456}
193
194\begin{CompactList}\small\item\em Matrix D. \item\end{CompactList}\item 
195\hypertarget{classbdm_1_1Kalman_70f8bf19e81b532c60fd3a7a152425ee}{
196\hyperlink{classchmat}{chmat} \hyperlink{classbdm_1_1Kalman_70f8bf19e81b532c60fd3a7a152425ee}{Q}}
197\label{classbdm_1_1Kalman_70f8bf19e81b532c60fd3a7a152425ee}
198
199\begin{CompactList}\small\item\em Matrix Q in square-root form. \item\end{CompactList}\item 
200\hypertarget{classbdm_1_1Kalman_475b088287cdfbba4dc60a3d027728b7}{
201\hyperlink{classchmat}{chmat} \hyperlink{classbdm_1_1Kalman_475b088287cdfbba4dc60a3d027728b7}{R}}
202\label{classbdm_1_1Kalman_475b088287cdfbba4dc60a3d027728b7}
203
204\begin{CompactList}\small\item\em Matrix R in square-root form. \item\end{CompactList}\item 
205\hypertarget{classbdm_1_1Kalman_383f329ff18bbe219254c8b3b916f40d}{
206\hyperlink{classbdm_1_1enorm}{enorm}$<$ \hyperlink{classchmat}{chmat} $>$ \hyperlink{classbdm_1_1Kalman_383f329ff18bbe219254c8b3b916f40d}{est}}
207\label{classbdm_1_1Kalman_383f329ff18bbe219254c8b3b916f40d}
208
209\begin{CompactList}\small\item\em posterior density on \$x\_\-t\$ \item\end{CompactList}\item 
210\hypertarget{classbdm_1_1Kalman_ba555c394c429f6831c9bbabfa2c944c}{
211\hyperlink{classbdm_1_1enorm}{enorm}$<$ \hyperlink{classchmat}{chmat} $>$ \hyperlink{classbdm_1_1Kalman_ba555c394c429f6831c9bbabfa2c944c}{fy}}
212\label{classbdm_1_1Kalman_ba555c394c429f6831c9bbabfa2c944c}
213
214\begin{CompactList}\small\item\em preditive density on \$y\_\-t\$ \item\end{CompactList}\item 
215\hypertarget{classbdm_1_1Kalman_bd69dfb802465f22dd84d73a180d5c92}{
216mat \hyperlink{classbdm_1_1Kalman_bd69dfb802465f22dd84d73a180d5c92}{\_\-K}}
217\label{classbdm_1_1Kalman_bd69dfb802465f22dd84d73a180d5c92}
218
219\begin{CompactList}\small\item\em placeholder for Kalman gain \item\end{CompactList}\item 
220\hypertarget{classbdm_1_1Kalman_c249d45258c8578b13858ad3e7b729b1}{
221vec \& \hyperlink{classbdm_1_1Kalman_c249d45258c8578b13858ad3e7b729b1}{\_\-yp}}
222\label{classbdm_1_1Kalman_c249d45258c8578b13858ad3e7b729b1}
223
224\begin{CompactList}\small\item\em cache of fy.mu \item\end{CompactList}\item 
225\hypertarget{classbdm_1_1Kalman_2dd268f2d7fbe6382cb8825a1114192a}{
226\hyperlink{classchmat}{chmat} \& \hyperlink{classbdm_1_1Kalman_2dd268f2d7fbe6382cb8825a1114192a}{\_\-Ry}}
227\label{classbdm_1_1Kalman_2dd268f2d7fbe6382cb8825a1114192a}
228
229\begin{CompactList}\small\item\em cache of fy.R \item\end{CompactList}\item 
230\hypertarget{classbdm_1_1Kalman_fa172078091e45561343fa513dd573b0}{
231vec \& \hyperlink{classbdm_1_1Kalman_fa172078091e45561343fa513dd573b0}{\_\-mu}}
232\label{classbdm_1_1Kalman_fa172078091e45561343fa513dd573b0}
233
234\begin{CompactList}\small\item\em cache of est.mu \item\end{CompactList}\item 
235\hypertarget{classbdm_1_1Kalman_00c27b0bf324f0018497921ca23c71ed}{
236\hyperlink{classchmat}{chmat} \& \hyperlink{classbdm_1_1Kalman_00c27b0bf324f0018497921ca23c71ed}{\_\-P}}
237\label{classbdm_1_1Kalman_00c27b0bf324f0018497921ca23c71ed}
238
239\begin{CompactList}\small\item\em cache of est.R \item\end{CompactList}\item 
240\hypertarget{classbdm_1_1BM_c400357e37d27a4834b2b1d9211009ed}{
241\hyperlink{classbdm_1_1RV}{RV} \hyperlink{classbdm_1_1BM_c400357e37d27a4834b2b1d9211009ed}{drv}}
242\label{classbdm_1_1BM_c400357e37d27a4834b2b1d9211009ed}
243
244\begin{CompactList}\small\item\em Random variable of the data (optional). \item\end{CompactList}\item 
245\hypertarget{classbdm_1_1BM_4064b6559d962633e4372b12f4cd204a}{
246double \hyperlink{classbdm_1_1BM_4064b6559d962633e4372b12f4cd204a}{ll}}
247\label{classbdm_1_1BM_4064b6559d962633e4372b12f4cd204a}
248
249\begin{CompactList}\small\item\em Logarithm of marginalized data likelihood. \item\end{CompactList}\item 
250\hypertarget{classbdm_1_1BM_faff0ad12556fe7dc0e2807d4fd938ee}{
251bool \hyperlink{classbdm_1_1BM_faff0ad12556fe7dc0e2807d4fd938ee}{evalll}}
252\label{classbdm_1_1BM_faff0ad12556fe7dc0e2807d4fd938ee}
253
254\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}
255
256
257\subsection{Member Function Documentation}
258\hypertarget{classbdm_1_1BM_c0f027ff91d8459937c6f60ff8e553ff}{
259\index{bdm::EKFCh@{bdm::EKFCh}!\_\-copy\_\-@{\_\-copy\_\-}}
260\index{\_\-copy\_\-@{\_\-copy\_\-}!bdm::EKFCh@{bdm::EKFCh}}
261\subsubsection[\_\-copy\_\-]{\setlength{\rightskip}{0pt plus 5cm}virtual {\bf BM}$\ast$ bdm::BM::\_\-copy\_\- ()\hspace{0.3cm}{\tt  \mbox{[}inline, virtual, inherited\mbox{]}}}}
262\label{classbdm_1_1BM_c0f027ff91d8459937c6f60ff8e553ff}
263
264
265Copy function required in vectors, Arrays of \hyperlink{classbdm_1_1BM}{BM} etc. Have to be DELETED manually! Prototype:
266
267\begin{Code}\begin{verbatim} BM* _copy_(){return new BM(*this);} 
268\end{verbatim}
269\end{Code}
270
271 
272
273Reimplemented in \hyperlink{classbdm_1_1ARX_60c40b5c6abc4c7e464b4ccae64a5a61}{bdm::ARX}.\hypertarget{classbdm_1_1BM_50257e0c1e5b5c73153ea6e716ad8ae0}{
274\index{bdm::EKFCh@{bdm::EKFCh}!logpred@{logpred}}
275\index{logpred@{logpred}!bdm::EKFCh@{bdm::EKFCh}}
276\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{]}}}}
277\label{classbdm_1_1BM_50257e0c1e5b5c73153ea6e716ad8ae0}
278
279
280Evaluates predictive log-likelihood of the given data record I.e. marginal likelihood of the data with the posterior integrated out.
281
282Reimplemented in \hyperlink{classbdm_1_1ARX_080a7e531e3aa06694112863b15bc6a4}{bdm::ARX}, \hyperlink{classbdm_1_1MixEF_da724da464a75e07521941e430929efa}{bdm::MixEF}, and \hyperlink{classbdm_1_1multiBM_e157b607c1e3fa91d42aeea44458e2bf}{bdm::multiBM}.
283
284Referenced by bdm::BM::logpred\_\-m().
285
286The documentation for this class was generated from the following files:\begin{CompactItemize}
287\item 
288\hyperlink{libKF_8h}{libKF.h}\item 
289libKF.cpp\end{CompactItemize}
Note: See TracBrowser for help on using the browser.