root/doc/latex/classbdm_1_1EKFCh.tex @ 270

Revision 270, 15.8 kB (checked in by smidl, 16 years ago)

Changes in the very root classes!
* rv and rvc are no longer compulsory,
* samplecond does not return ll
* BM has drv

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