root/doc/latex/classbdm_1_1KalmanCh.tex @ 261

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

doc

Line 
1\hypertarget{classbdm_1_1KalmanCh}{
2\section{bdm::KalmanCh Class Reference}
3\label{classbdm_1_1KalmanCh}\index{bdm::KalmanCh@{bdm::KalmanCh}}
4}
5\hyperlink{classbdm_1_1Kalman}{Kalman} filter in square root form. 
6
7
8{\tt \#include $<$libKF.h$>$}
9
10Inheritance diagram for bdm::KalmanCh:\nopagebreak
11\begin{figure}[H]
12\begin{center}
13\leavevmode
14\includegraphics[height=400pt]{classbdm_1_1KalmanCh__inherit__graph}
15\end{center}
16\end{figure}
17Collaboration diagram for bdm::KalmanCh:\nopagebreak
18\begin{figure}[H]
19\begin{center}
20\leavevmode
21\includegraphics[width=400pt]{classbdm_1_1KalmanCh__coll__graph}
22\end{center}
23\end{figure}
24\subsection*{Public Member Functions}
25\begin{CompactItemize}
26\item 
27\hypertarget{classbdm_1_1KalmanCh_5c50fb48d2c7fb6d31e2061f32ecc230}{
28\hyperlink{classbdm_1_1KalmanCh_5c50fb48d2c7fb6d31e2061f32ecc230}{KalmanCh} (\hyperlink{classbdm_1_1RV}{RV} rvx0, \hyperlink{classbdm_1_1RV}{RV} rvy0, \hyperlink{classbdm_1_1RV}{RV} rvu0)}
29\label{classbdm_1_1KalmanCh_5c50fb48d2c7fb6d31e2061f32ecc230}
30
31\begin{CompactList}\small\item\em Default constructor. \item\end{CompactList}\item 
32\hypertarget{classbdm_1_1KalmanCh_ab3a87ba1831e53f193a9dfbaf56a879}{
33void \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)}
34\label{classbdm_1_1KalmanCh_ab3a87ba1831e53f193a9dfbaf56a879}
35
36\begin{CompactList}\small\item\em Set parameters with check of relevance. \item\end{CompactList}\item 
37\hypertarget{classbdm_1_1KalmanCh_f559387dd38bd6002be490cc62987290}{
38void \hyperlink{classbdm_1_1KalmanCh_f559387dd38bd6002be490cc62987290}{set\_\-est} (const vec \&mu0, const \hyperlink{classchmat}{chmat} \&P0)}
39\label{classbdm_1_1KalmanCh_f559387dd38bd6002be490cc62987290}
40
41\begin{CompactList}\small\item\em Set estimate values, used e.g. in initialization. \item\end{CompactList}\item 
42void \hyperlink{classbdm_1_1KalmanCh_b41fe5540548100b08e1684c3be767b6}{bayes} (const vec \&dt)
43\begin{CompactList}\small\item\em Here dt = \mbox{[}yt;ut\mbox{]} of appropriate dimensions. \item\end{CompactList}\item 
44\hypertarget{classbdm_1_1Kalman_93b5936ba397f13c05f52885c545f42d}{
45const \hyperlink{classbdm_1_1epdf}{epdf} \& \hyperlink{classbdm_1_1Kalman_93b5936ba397f13c05f52885c545f42d}{\_\-epdf} () const }
46\label{classbdm_1_1Kalman_93b5936ba397f13c05f52885c545f42d}
47
48\begin{CompactList}\small\item\em access function \item\end{CompactList}\item 
49\hypertarget{classbdm_1_1Kalman_c34989b1e53c7d4ecdaea63a95ddbd77}{
50const \hyperlink{classbdm_1_1enorm}{enorm}$<$ \hyperlink{classchmat}{chmat} $>$ $\ast$ \hyperlink{classbdm_1_1Kalman_c34989b1e53c7d4ecdaea63a95ddbd77}{\_\-e} () const }
51\label{classbdm_1_1Kalman_c34989b1e53c7d4ecdaea63a95ddbd77}
52
53\begin{CompactList}\small\item\em Returns a pointer to the epdf representing posterior density on parameters. Use with care! \item\end{CompactList}\item 
54\hypertarget{classbdm_1_1Kalman_c788ec6e6c6f5f5861ae8a56d8ede277}{
55mat \& \hyperlink{classbdm_1_1Kalman_c788ec6e6c6f5f5861ae8a56d8ede277}{\_\-\_\-K} ()}
56\label{classbdm_1_1Kalman_c788ec6e6c6f5f5861ae8a56d8ede277}
57
58\begin{CompactList}\small\item\em access function \item\end{CompactList}\item 
59\hypertarget{classbdm_1_1Kalman_a250d1dbe7bba861dba2a324520cfa48}{
60vec \hyperlink{classbdm_1_1Kalman_a250d1dbe7bba861dba2a324520cfa48}{\_\-dP} ()}
61\label{classbdm_1_1Kalman_a250d1dbe7bba861dba2a324520cfa48}
62
63\begin{CompactList}\small\item\em access function \item\end{CompactList}\item 
64\hypertarget{classbdm_1_1BM_1dee3fddaf021e62d925289660a707dc}{
65virtual void \hyperlink{classbdm_1_1BM_1dee3fddaf021e62d925289660a707dc}{bayesB} (const mat \&Dt)}
66\label{classbdm_1_1BM_1dee3fddaf021e62d925289660a707dc}
67
68\begin{CompactList}\small\item\em Batch Bayes rule (columns of Dt are observations). \item\end{CompactList}\item 
69virtual double \hyperlink{classbdm_1_1BM_50257e0c1e5b5c73153ea6e716ad8ae0}{logpred} (const vec \&dt) const
70\item 
71\hypertarget{classbdm_1_1BM_0e8ebe61fb14990abe1254bd3dda5fae}{
72vec \hyperlink{classbdm_1_1BM_0e8ebe61fb14990abe1254bd3dda5fae}{logpred\_\-m} (const mat \&dt) const }
73\label{classbdm_1_1BM_0e8ebe61fb14990abe1254bd3dda5fae}
74
75\begin{CompactList}\small\item\em Matrix version of logpred. \item\end{CompactList}\item 
76\hypertarget{classbdm_1_1BM_710e7d69c0d8791fb41a7cd4683cca2c}{
77virtual \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 }
78\label{classbdm_1_1BM_710e7d69c0d8791fb41a7cd4683cca2c}
79
80\begin{CompactList}\small\item\em Constructs a predictive density (marginal density on data). \item\end{CompactList}\item 
81\hypertarget{classbdm_1_1BM_40a3c891996391e3135518053a917793}{
82const \hyperlink{classbdm_1_1RV}{RV} \& \hyperlink{classbdm_1_1BM_40a3c891996391e3135518053a917793}{\_\-rv} () const }
83\label{classbdm_1_1BM_40a3c891996391e3135518053a917793}
84
85\begin{CompactList}\small\item\em access function \item\end{CompactList}\item 
86\hypertarget{classbdm_1_1BM_5be65d37dedfe33a3671e7065f523a70}{
87double \hyperlink{classbdm_1_1BM_5be65d37dedfe33a3671e7065f523a70}{\_\-ll} () const }
88\label{classbdm_1_1BM_5be65d37dedfe33a3671e7065f523a70}
89
90\begin{CompactList}\small\item\em access function \item\end{CompactList}\item 
91\hypertarget{classbdm_1_1BM_236b3abbcc93594fc97cd86d82c1a83f}{
92void \hyperlink{classbdm_1_1BM_236b3abbcc93594fc97cd86d82c1a83f}{set\_\-evalll} (bool evl0)}
93\label{classbdm_1_1BM_236b3abbcc93594fc97cd86d82c1a83f}
94
95\begin{CompactList}\small\item\em access function \item\end{CompactList}\item 
96virtual \hyperlink{classbdm_1_1BM}{BM} $\ast$ \hyperlink{classbdm_1_1BM_3efb3098172f1f67564a312fe732473e}{\_\-copy\_\-} (bool changerv=false)
97\end{CompactItemize}
98\subsection*{Protected Attributes}
99\begin{CompactItemize}
100\item 
101\hypertarget{classbdm_1_1KalmanCh_48611c8582706cfa62e832be0972e75d}{
102mat \hyperlink{classbdm_1_1KalmanCh_48611c8582706cfa62e832be0972e75d}{preA}}
103\label{classbdm_1_1KalmanCh_48611c8582706cfa62e832be0972e75d}
104
105\begin{CompactList}\small\item\em pre array (triangular matrix) \item\end{CompactList}\item 
106\hypertarget{classbdm_1_1KalmanCh_bcbd68f51d4b57246e7784ca5900171f}{
107mat \hyperlink{classbdm_1_1KalmanCh_bcbd68f51d4b57246e7784ca5900171f}{postA}}
108\label{classbdm_1_1KalmanCh_bcbd68f51d4b57246e7784ca5900171f}
109
110\begin{CompactList}\small\item\em post array (triangular matrix) \item\end{CompactList}\item 
111\hypertarget{classbdm_1_1Kalman_3fe475a1e920b20b63bb342c0e1571f7}{
112\hyperlink{classbdm_1_1RV}{RV} \hyperlink{classbdm_1_1Kalman_3fe475a1e920b20b63bb342c0e1571f7}{rvy}}
113\label{classbdm_1_1Kalman_3fe475a1e920b20b63bb342c0e1571f7}
114
115\begin{CompactList}\small\item\em Indetifier of output rv. \item\end{CompactList}\item 
116\hypertarget{classbdm_1_1Kalman_149e27424fd1a7cc1c998ea088618a94}{
117\hyperlink{classbdm_1_1RV}{RV} \hyperlink{classbdm_1_1Kalman_149e27424fd1a7cc1c998ea088618a94}{rvu}}
118\label{classbdm_1_1Kalman_149e27424fd1a7cc1c998ea088618a94}
119
120\begin{CompactList}\small\item\em Indetifier of exogeneous rv. \item\end{CompactList}\item 
121\hypertarget{classbdm_1_1Kalman_ba7699cdb3b1382a54d3e28b9b7517fa}{
122int \hyperlink{classbdm_1_1Kalman_ba7699cdb3b1382a54d3e28b9b7517fa}{dimx}}
123\label{classbdm_1_1Kalman_ba7699cdb3b1382a54d3e28b9b7517fa}
124
125\begin{CompactList}\small\item\em cache of rv.count() \item\end{CompactList}\item 
126\hypertarget{classbdm_1_1Kalman_d2c36ba01760bf207b985bf321b7817f}{
127int \hyperlink{classbdm_1_1Kalman_d2c36ba01760bf207b985bf321b7817f}{dimy}}
128\label{classbdm_1_1Kalman_d2c36ba01760bf207b985bf321b7817f}
129
130\begin{CompactList}\small\item\em cache of rvy.count() \item\end{CompactList}\item 
131\hypertarget{classbdm_1_1Kalman_c5136ef617f6ac0e426bea222755d92b}{
132int \hyperlink{classbdm_1_1Kalman_c5136ef617f6ac0e426bea222755d92b}{dimu}}
133\label{classbdm_1_1Kalman_c5136ef617f6ac0e426bea222755d92b}
134
135\begin{CompactList}\small\item\em cache of rvu.count() \item\end{CompactList}\item 
136\hypertarget{classbdm_1_1Kalman_0a2072e2090c10fac74ad30a023a4ace}{
137mat \hyperlink{classbdm_1_1Kalman_0a2072e2090c10fac74ad30a023a4ace}{A}}
138\label{classbdm_1_1Kalman_0a2072e2090c10fac74ad30a023a4ace}
139
140\begin{CompactList}\small\item\em Matrix A. \item\end{CompactList}\item 
141\hypertarget{classbdm_1_1Kalman_5977b2c81857948a35105f0e7840203c}{
142mat \hyperlink{classbdm_1_1Kalman_5977b2c81857948a35105f0e7840203c}{B}}
143\label{classbdm_1_1Kalman_5977b2c81857948a35105f0e7840203c}
144
145\begin{CompactList}\small\item\em Matrix B. \item\end{CompactList}\item 
146\hypertarget{classbdm_1_1Kalman_818eba63a23972786a4579ad30294177}{
147mat \hyperlink{classbdm_1_1Kalman_818eba63a23972786a4579ad30294177}{C}}
148\label{classbdm_1_1Kalman_818eba63a23972786a4579ad30294177}
149
150\begin{CompactList}\small\item\em Matrix C. \item\end{CompactList}\item 
151\hypertarget{classbdm_1_1Kalman_7b56ac423d0654b5755e4f852a870456}{
152mat \hyperlink{classbdm_1_1Kalman_7b56ac423d0654b5755e4f852a870456}{D}}
153\label{classbdm_1_1Kalman_7b56ac423d0654b5755e4f852a870456}
154
155\begin{CompactList}\small\item\em Matrix D. \item\end{CompactList}\item 
156\hypertarget{classbdm_1_1Kalman_70f8bf19e81b532c60fd3a7a152425ee}{
157\hyperlink{classchmat}{chmat} \hyperlink{classbdm_1_1Kalman_70f8bf19e81b532c60fd3a7a152425ee}{Q}}
158\label{classbdm_1_1Kalman_70f8bf19e81b532c60fd3a7a152425ee}
159
160\begin{CompactList}\small\item\em Matrix Q in square-root form. \item\end{CompactList}\item 
161\hypertarget{classbdm_1_1Kalman_475b088287cdfbba4dc60a3d027728b7}{
162\hyperlink{classchmat}{chmat} \hyperlink{classbdm_1_1Kalman_475b088287cdfbba4dc60a3d027728b7}{R}}
163\label{classbdm_1_1Kalman_475b088287cdfbba4dc60a3d027728b7}
164
165\begin{CompactList}\small\item\em Matrix R in square-root form. \item\end{CompactList}\item 
166\hypertarget{classbdm_1_1Kalman_383f329ff18bbe219254c8b3b916f40d}{
167\hyperlink{classbdm_1_1enorm}{enorm}$<$ \hyperlink{classchmat}{chmat} $>$ \hyperlink{classbdm_1_1Kalman_383f329ff18bbe219254c8b3b916f40d}{est}}
168\label{classbdm_1_1Kalman_383f329ff18bbe219254c8b3b916f40d}
169
170\begin{CompactList}\small\item\em posterior density on \$x\_\-t\$ \item\end{CompactList}\item 
171\hypertarget{classbdm_1_1Kalman_ba555c394c429f6831c9bbabfa2c944c}{
172\hyperlink{classbdm_1_1enorm}{enorm}$<$ \hyperlink{classchmat}{chmat} $>$ \hyperlink{classbdm_1_1Kalman_ba555c394c429f6831c9bbabfa2c944c}{fy}}
173\label{classbdm_1_1Kalman_ba555c394c429f6831c9bbabfa2c944c}
174
175\begin{CompactList}\small\item\em preditive density on \$y\_\-t\$ \item\end{CompactList}\item 
176\hypertarget{classbdm_1_1Kalman_bd69dfb802465f22dd84d73a180d5c92}{
177mat \hyperlink{classbdm_1_1Kalman_bd69dfb802465f22dd84d73a180d5c92}{\_\-K}}
178\label{classbdm_1_1Kalman_bd69dfb802465f22dd84d73a180d5c92}
179
180\begin{CompactList}\small\item\em placeholder for Kalman gain \item\end{CompactList}\item 
181\hypertarget{classbdm_1_1Kalman_c249d45258c8578b13858ad3e7b729b1}{
182vec \& \hyperlink{classbdm_1_1Kalman_c249d45258c8578b13858ad3e7b729b1}{\_\-yp}}
183\label{classbdm_1_1Kalman_c249d45258c8578b13858ad3e7b729b1}
184
185\begin{CompactList}\small\item\em cache of fy.mu \item\end{CompactList}\item 
186\hypertarget{classbdm_1_1Kalman_2dd268f2d7fbe6382cb8825a1114192a}{
187\hyperlink{classchmat}{chmat} \& \hyperlink{classbdm_1_1Kalman_2dd268f2d7fbe6382cb8825a1114192a}{\_\-Ry}}
188\label{classbdm_1_1Kalman_2dd268f2d7fbe6382cb8825a1114192a}
189
190\begin{CompactList}\small\item\em cache of fy.R \item\end{CompactList}\item 
191\hypertarget{classbdm_1_1Kalman_fa172078091e45561343fa513dd573b0}{
192vec \& \hyperlink{classbdm_1_1Kalman_fa172078091e45561343fa513dd573b0}{\_\-mu}}
193\label{classbdm_1_1Kalman_fa172078091e45561343fa513dd573b0}
194
195\begin{CompactList}\small\item\em cache of est.mu \item\end{CompactList}\item 
196\hypertarget{classbdm_1_1Kalman_00c27b0bf324f0018497921ca23c71ed}{
197\hyperlink{classchmat}{chmat} \& \hyperlink{classbdm_1_1Kalman_00c27b0bf324f0018497921ca23c71ed}{\_\-P}}
198\label{classbdm_1_1Kalman_00c27b0bf324f0018497921ca23c71ed}
199
200\begin{CompactList}\small\item\em cache of est.R \item\end{CompactList}\item 
201\hypertarget{classbdm_1_1BM_18d6db4af8ee42077741d9e3618153ca}{
202\hyperlink{classbdm_1_1RV}{RV} \hyperlink{classbdm_1_1BM_18d6db4af8ee42077741d9e3618153ca}{rv}}
203\label{classbdm_1_1BM_18d6db4af8ee42077741d9e3618153ca}
204
205\begin{CompactList}\small\item\em Random variable of the posterior. \item\end{CompactList}\item 
206\hypertarget{classbdm_1_1BM_4064b6559d962633e4372b12f4cd204a}{
207double \hyperlink{classbdm_1_1BM_4064b6559d962633e4372b12f4cd204a}{ll}}
208\label{classbdm_1_1BM_4064b6559d962633e4372b12f4cd204a}
209
210\begin{CompactList}\small\item\em Logarithm of marginalized data likelihood. \item\end{CompactList}\item 
211\hypertarget{classbdm_1_1BM_faff0ad12556fe7dc0e2807d4fd938ee}{
212bool \hyperlink{classbdm_1_1BM_faff0ad12556fe7dc0e2807d4fd938ee}{evalll}}
213\label{classbdm_1_1BM_faff0ad12556fe7dc0e2807d4fd938ee}
214
215\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}
216
217
218\subsection{Detailed Description}
219\hyperlink{classbdm_1_1Kalman}{Kalman} filter in square root form.
220
221\subsection{Member Function Documentation}
222\hypertarget{classbdm_1_1KalmanCh_b41fe5540548100b08e1684c3be767b6}{
223\index{bdm::KalmanCh@{bdm::KalmanCh}!bayes@{bayes}}
224\index{bayes@{bayes}!bdm::KalmanCh@{bdm::KalmanCh}}
225\subsubsection[bayes]{\setlength{\rightskip}{0pt plus 5cm}void bdm::KalmanCh::bayes (const vec \& {\em dt})\hspace{0.3cm}{\tt  \mbox{[}virtual\mbox{]}}}}
226\label{classbdm_1_1KalmanCh_b41fe5540548100b08e1684c3be767b6}
227
228
229Here dt = \mbox{[}yt;ut\mbox{]} of appropriate dimensions.
230
231The following equality hold::\[ \left[\begin{array}{cc} R^{0.5}\\ P_{t|t-1}^{0.5}C' & P_{t|t-1}^{0.5}CA'\\ & Q^{0.5}\end{array}\right]<\mathrm{orth.oper.}>=\left[\begin{array}{cc} R_{y}^{0.5} & KA'\\ & P_{t+1|t}^{0.5}\\ \\\end{array}\right]\]
232
233Thus this object evaluates only predictors! Not filtering densities.
234
235Reimplemented from \hyperlink{classbdm_1_1Kalman_4a39330c14eff8d13179e868a1d1aa8c}{bdm::Kalman$<$ chmat $>$}.
236
237Reimplemented in \hyperlink{classbdm_1_1EKFCh_4c8609c37290b158f88a31dae4047225}{bdm::EKFCh}.
238
239References chmat::\_\-Ch(), bdm::Kalman$<$ chmat $>$::\_\-K, bdm::Kalman$<$ chmat $>$::\_\-mu, bdm::Kalman$<$ chmat $>$::\_\-P, bdm::Kalman$<$ chmat $>$::\_\-Ry, bdm::Kalman$<$ chmat $>$::\_\-yp, bdm::Kalman$<$ chmat $>$::A, bdm::Kalman$<$ chmat $>$::B, bdm::Kalman$<$ chmat $>$::C, bdm::Kalman$<$ chmat $>$::D, bdm::Kalman$<$ chmat $>$::dimu, bdm::Kalman$<$ chmat $>$::dimx, bdm::Kalman$<$ chmat $>$::dimy, bdm::BM::evalll, bdm::eEF::evallog(), bdm::Kalman$<$ chmat $>$::fy, bdm::BM::ll, postA, and preA.\hypertarget{classbdm_1_1BM_50257e0c1e5b5c73153ea6e716ad8ae0}{
240\index{bdm::KalmanCh@{bdm::KalmanCh}!logpred@{logpred}}
241\index{logpred@{logpred}!bdm::KalmanCh@{bdm::KalmanCh}}
242\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{]}}}}
243\label{classbdm_1_1BM_50257e0c1e5b5c73153ea6e716ad8ae0}
244
245
246Evaluates predictive log-likelihood of the given data record I.e. marginal likelihood of the data with the posterior integrated out.
247
248Reimplemented in \hyperlink{classbdm_1_1ARX_080a7e531e3aa06694112863b15bc6a4}{bdm::ARX}, \hyperlink{classbdm_1_1MixEF_da724da464a75e07521941e430929efa}{bdm::MixEF}, and \hyperlink{classbdm_1_1multiBM_e157b607c1e3fa91d42aeea44458e2bf}{bdm::multiBM}.
249
250Referenced by bdm::BM::logpred\_\-m().\hypertarget{classbdm_1_1BM_3efb3098172f1f67564a312fe732473e}{
251\index{bdm::KalmanCh@{bdm::KalmanCh}!\_\-copy\_\-@{\_\-copy\_\-}}
252\index{\_\-copy\_\-@{\_\-copy\_\-}!bdm::KalmanCh@{bdm::KalmanCh}}
253\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{]}}}}
254\label{classbdm_1_1BM_3efb3098172f1f67564a312fe732473e}
255
256
257Copy 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; \} 
258
259Reimplemented in \hyperlink{classbdm_1_1ARX_20ff2de8d862f28de7da83444d65bcdb}{bdm::ARX}, and \hyperlink{classbdm_1_1BMEF_5912dbcf28ae711e30b08c2fa766a3e6}{bdm::BMEF}.
260
261The documentation for this class was generated from the following files:\begin{CompactItemize}
262\item 
263\hyperlink{libKF_8h}{libKF.h}\item 
264libKF.cpp\end{CompactItemize}
Note: See TracBrowser for help on using the browser.