root/doc/latex/classbdm_1_1KFcondQR.tex @ 261

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

doc

Line 
1\hypertarget{classbdm_1_1KFcondQR}{
2\section{bdm::KFcondQR Class Reference}
3\label{classbdm_1_1KFcondQR}\index{bdm::KFcondQR@{bdm::KFcondQR}}
4}
5\hyperlink{classbdm_1_1Kalman}{Kalman} Filter with conditional diagonal matrices R and Q. 
6
7
8{\tt \#include $<$libKF.h$>$}
9
10Inheritance diagram for bdm::KFcondQR:\nopagebreak
11\begin{figure}[H]
12\begin{center}
13\leavevmode
14\includegraphics[width=118pt]{classbdm_1_1KFcondQR__inherit__graph}
15\end{center}
16\end{figure}
17Collaboration diagram for bdm::KFcondQR:\nopagebreak
18\begin{figure}[H]
19\begin{center}
20\leavevmode
21\includegraphics[width=400pt]{classbdm_1_1KFcondQR__coll__graph}
22\end{center}
23\end{figure}
24\subsection*{Public Member Functions}
25\begin{CompactItemize}
26\item 
27\hypertarget{classbdm_1_1KFcondQR_50e138b0be3b5c443ed02fb74c6c4fe8}{
28\hyperlink{classbdm_1_1KFcondQR_50e138b0be3b5c443ed02fb74c6c4fe8}{KFcondQR} (\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}, \hyperlink{classbdm_1_1RV}{RV} rvRQ)}
29\label{classbdm_1_1KFcondQR_50e138b0be3b5c443ed02fb74c6c4fe8}
30
31\begin{CompactList}\small\item\em Default constructor. \item\end{CompactList}\item 
32\hypertarget{classbdm_1_1KFcondQR_0288d47032757774a525f196ac3da21d}{
33void \hyperlink{classbdm_1_1KFcondQR_0288d47032757774a525f196ac3da21d}{condition} (const vec \&RQ)}
34\label{classbdm_1_1KFcondQR_0288d47032757774a525f196ac3da21d}
35
36\begin{CompactList}\small\item\em Substitute {\tt val} for {\tt rvc}. \item\end{CompactList}\item 
37\hypertarget{classbdm_1_1Kalman_94eb8cc31731210089db0ba4e1a08a6c}{
38void \hyperlink{classbdm_1_1Kalman_94eb8cc31731210089db0ba4e1a08a6c}{set\_\-parameters} (const mat \&A0, const mat \&B0, const mat \&C0, const mat \&D0, const \hyperlink{classldmat}{ldmat} \&R0, const \hyperlink{classldmat}{ldmat} \&Q0)}
39\label{classbdm_1_1Kalman_94eb8cc31731210089db0ba4e1a08a6c}
40
41\begin{CompactList}\small\item\em Set parameters with check of relevance. \item\end{CompactList}\item 
42\hypertarget{classbdm_1_1Kalman_9264fc6b173ecb803d2684b883f32c68}{
43void \hyperlink{classbdm_1_1Kalman_9264fc6b173ecb803d2684b883f32c68}{set\_\-est} (const vec \&mu0, const \hyperlink{classldmat}{ldmat} \&P0)}
44\label{classbdm_1_1Kalman_9264fc6b173ecb803d2684b883f32c68}
45
46\begin{CompactList}\small\item\em Set estimate values, used e.g. in initialization. \item\end{CompactList}\item 
47\hypertarget{classbdm_1_1Kalman_4a39330c14eff8d13179e868a1d1aa8c}{
48void \hyperlink{classbdm_1_1Kalman_4a39330c14eff8d13179e868a1d1aa8c}{bayes} (const vec \&dt)}
49\label{classbdm_1_1Kalman_4a39330c14eff8d13179e868a1d1aa8c}
50
51\begin{CompactList}\small\item\em Here dt = \mbox{[}yt;ut\mbox{]} of appropriate dimensions. \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{classldmat}{ldmat} $>$ $\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\item 
106\hypertarget{classbdm_1_1BMcond_7506910f93250b44fea505ec4ffb19dc}{
107const \hyperlink{classbdm_1_1RV}{RV} \& \hyperlink{classbdm_1_1BMcond_7506910f93250b44fea505ec4ffb19dc}{\_\-rvc} () const }
108\label{classbdm_1_1BMcond_7506910f93250b44fea505ec4ffb19dc}
109
110\begin{CompactList}\small\item\em access function \item\end{CompactList}\end{CompactItemize}
111\subsection*{Protected Attributes}
112\begin{CompactItemize}
113\item 
114\hypertarget{classbdm_1_1Kalman_3fe475a1e920b20b63bb342c0e1571f7}{
115\hyperlink{classbdm_1_1RV}{RV} \hyperlink{classbdm_1_1Kalman_3fe475a1e920b20b63bb342c0e1571f7}{rvy}}
116\label{classbdm_1_1Kalman_3fe475a1e920b20b63bb342c0e1571f7}
117
118\begin{CompactList}\small\item\em Indetifier of output rv. \item\end{CompactList}\item 
119\hypertarget{classbdm_1_1Kalman_149e27424fd1a7cc1c998ea088618a94}{
120\hyperlink{classbdm_1_1RV}{RV} \hyperlink{classbdm_1_1Kalman_149e27424fd1a7cc1c998ea088618a94}{rvu}}
121\label{classbdm_1_1Kalman_149e27424fd1a7cc1c998ea088618a94}
122
123\begin{CompactList}\small\item\em Indetifier of exogeneous rv. \item\end{CompactList}\item 
124\hypertarget{classbdm_1_1Kalman_ba7699cdb3b1382a54d3e28b9b7517fa}{
125int \hyperlink{classbdm_1_1Kalman_ba7699cdb3b1382a54d3e28b9b7517fa}{dimx}}
126\label{classbdm_1_1Kalman_ba7699cdb3b1382a54d3e28b9b7517fa}
127
128\begin{CompactList}\small\item\em cache of rv.count() \item\end{CompactList}\item 
129\hypertarget{classbdm_1_1Kalman_d2c36ba01760bf207b985bf321b7817f}{
130int \hyperlink{classbdm_1_1Kalman_d2c36ba01760bf207b985bf321b7817f}{dimy}}
131\label{classbdm_1_1Kalman_d2c36ba01760bf207b985bf321b7817f}
132
133\begin{CompactList}\small\item\em cache of rvy.count() \item\end{CompactList}\item 
134\hypertarget{classbdm_1_1Kalman_c5136ef617f6ac0e426bea222755d92b}{
135int \hyperlink{classbdm_1_1Kalman_c5136ef617f6ac0e426bea222755d92b}{dimu}}
136\label{classbdm_1_1Kalman_c5136ef617f6ac0e426bea222755d92b}
137
138\begin{CompactList}\small\item\em cache of rvu.count() \item\end{CompactList}\item 
139\hypertarget{classbdm_1_1Kalman_0a2072e2090c10fac74ad30a023a4ace}{
140mat \hyperlink{classbdm_1_1Kalman_0a2072e2090c10fac74ad30a023a4ace}{A}}
141\label{classbdm_1_1Kalman_0a2072e2090c10fac74ad30a023a4ace}
142
143\begin{CompactList}\small\item\em Matrix A. \item\end{CompactList}\item 
144\hypertarget{classbdm_1_1Kalman_5977b2c81857948a35105f0e7840203c}{
145mat \hyperlink{classbdm_1_1Kalman_5977b2c81857948a35105f0e7840203c}{B}}
146\label{classbdm_1_1Kalman_5977b2c81857948a35105f0e7840203c}
147
148\begin{CompactList}\small\item\em Matrix B. \item\end{CompactList}\item 
149\hypertarget{classbdm_1_1Kalman_818eba63a23972786a4579ad30294177}{
150mat \hyperlink{classbdm_1_1Kalman_818eba63a23972786a4579ad30294177}{C}}
151\label{classbdm_1_1Kalman_818eba63a23972786a4579ad30294177}
152
153\begin{CompactList}\small\item\em Matrix C. \item\end{CompactList}\item 
154\hypertarget{classbdm_1_1Kalman_7b56ac423d0654b5755e4f852a870456}{
155mat \hyperlink{classbdm_1_1Kalman_7b56ac423d0654b5755e4f852a870456}{D}}
156\label{classbdm_1_1Kalman_7b56ac423d0654b5755e4f852a870456}
157
158\begin{CompactList}\small\item\em Matrix D. \item\end{CompactList}\item 
159\hypertarget{classbdm_1_1Kalman_70f8bf19e81b532c60fd3a7a152425ee}{
160\hyperlink{classldmat}{ldmat} \hyperlink{classbdm_1_1Kalman_70f8bf19e81b532c60fd3a7a152425ee}{Q}}
161\label{classbdm_1_1Kalman_70f8bf19e81b532c60fd3a7a152425ee}
162
163\begin{CompactList}\small\item\em Matrix Q in square-root form. \item\end{CompactList}\item 
164\hypertarget{classbdm_1_1Kalman_475b088287cdfbba4dc60a3d027728b7}{
165\hyperlink{classldmat}{ldmat} \hyperlink{classbdm_1_1Kalman_475b088287cdfbba4dc60a3d027728b7}{R}}
166\label{classbdm_1_1Kalman_475b088287cdfbba4dc60a3d027728b7}
167
168\begin{CompactList}\small\item\em Matrix R in square-root form. \item\end{CompactList}\item 
169\hypertarget{classbdm_1_1Kalman_383f329ff18bbe219254c8b3b916f40d}{
170\hyperlink{classbdm_1_1enorm}{enorm}$<$ \hyperlink{classldmat}{ldmat} $>$ \hyperlink{classbdm_1_1Kalman_383f329ff18bbe219254c8b3b916f40d}{est}}
171\label{classbdm_1_1Kalman_383f329ff18bbe219254c8b3b916f40d}
172
173\begin{CompactList}\small\item\em posterior density on \$x\_\-t\$ \item\end{CompactList}\item 
174\hypertarget{classbdm_1_1Kalman_ba555c394c429f6831c9bbabfa2c944c}{
175\hyperlink{classbdm_1_1enorm}{enorm}$<$ \hyperlink{classldmat}{ldmat} $>$ \hyperlink{classbdm_1_1Kalman_ba555c394c429f6831c9bbabfa2c944c}{fy}}
176\label{classbdm_1_1Kalman_ba555c394c429f6831c9bbabfa2c944c}
177
178\begin{CompactList}\small\item\em preditive density on \$y\_\-t\$ \item\end{CompactList}\item 
179\hypertarget{classbdm_1_1Kalman_bd69dfb802465f22dd84d73a180d5c92}{
180mat \hyperlink{classbdm_1_1Kalman_bd69dfb802465f22dd84d73a180d5c92}{\_\-K}}
181\label{classbdm_1_1Kalman_bd69dfb802465f22dd84d73a180d5c92}
182
183\begin{CompactList}\small\item\em placeholder for Kalman gain \item\end{CompactList}\item 
184\hypertarget{classbdm_1_1Kalman_c249d45258c8578b13858ad3e7b729b1}{
185vec \& \hyperlink{classbdm_1_1Kalman_c249d45258c8578b13858ad3e7b729b1}{\_\-yp}}
186\label{classbdm_1_1Kalman_c249d45258c8578b13858ad3e7b729b1}
187
188\begin{CompactList}\small\item\em cache of fy.mu \item\end{CompactList}\item 
189\hypertarget{classbdm_1_1Kalman_2dd268f2d7fbe6382cb8825a1114192a}{
190\hyperlink{classldmat}{ldmat} \& \hyperlink{classbdm_1_1Kalman_2dd268f2d7fbe6382cb8825a1114192a}{\_\-Ry}}
191\label{classbdm_1_1Kalman_2dd268f2d7fbe6382cb8825a1114192a}
192
193\begin{CompactList}\small\item\em cache of fy.R \item\end{CompactList}\item 
194\hypertarget{classbdm_1_1Kalman_fa172078091e45561343fa513dd573b0}{
195vec \& \hyperlink{classbdm_1_1Kalman_fa172078091e45561343fa513dd573b0}{\_\-mu}}
196\label{classbdm_1_1Kalman_fa172078091e45561343fa513dd573b0}
197
198\begin{CompactList}\small\item\em cache of est.mu \item\end{CompactList}\item 
199\hypertarget{classbdm_1_1Kalman_00c27b0bf324f0018497921ca23c71ed}{
200\hyperlink{classldmat}{ldmat} \& \hyperlink{classbdm_1_1Kalman_00c27b0bf324f0018497921ca23c71ed}{\_\-P}}
201\label{classbdm_1_1Kalman_00c27b0bf324f0018497921ca23c71ed}
202
203\begin{CompactList}\small\item\em cache of est.R \item\end{CompactList}\item 
204\hypertarget{classbdm_1_1BM_18d6db4af8ee42077741d9e3618153ca}{
205\hyperlink{classbdm_1_1RV}{RV} \hyperlink{classbdm_1_1BM_18d6db4af8ee42077741d9e3618153ca}{rv}}
206\label{classbdm_1_1BM_18d6db4af8ee42077741d9e3618153ca}
207
208\begin{CompactList}\small\item\em Random variable of the posterior. \item\end{CompactList}\item 
209\hypertarget{classbdm_1_1BM_4064b6559d962633e4372b12f4cd204a}{
210double \hyperlink{classbdm_1_1BM_4064b6559d962633e4372b12f4cd204a}{ll}}
211\label{classbdm_1_1BM_4064b6559d962633e4372b12f4cd204a}
212
213\begin{CompactList}\small\item\em Logarithm of marginalized data likelihood. \item\end{CompactList}\item 
214\hypertarget{classbdm_1_1BM_faff0ad12556fe7dc0e2807d4fd938ee}{
215bool \hyperlink{classbdm_1_1BM_faff0ad12556fe7dc0e2807d4fd938ee}{evalll}}
216\label{classbdm_1_1BM_faff0ad12556fe7dc0e2807d4fd938ee}
217
218\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}\item 
219\hypertarget{classbdm_1_1BMcond_9a12750776d977408aada06a70093297}{
220\hyperlink{classbdm_1_1RV}{RV} \hyperlink{classbdm_1_1BMcond_9a12750776d977408aada06a70093297}{rvc}}
221\label{classbdm_1_1BMcond_9a12750776d977408aada06a70093297}
222
223\begin{CompactList}\small\item\em Identificator of the conditioning variable. \item\end{CompactList}\end{CompactItemize}
224
225
226\subsection{Detailed Description}
227\hyperlink{classbdm_1_1Kalman}{Kalman} Filter with conditional diagonal matrices R and Q.
228
229\subsection{Member Function Documentation}
230\hypertarget{classbdm_1_1BM_50257e0c1e5b5c73153ea6e716ad8ae0}{
231\index{bdm::KFcondQR@{bdm::KFcondQR}!logpred@{logpred}}
232\index{logpred@{logpred}!bdm::KFcondQR@{bdm::KFcondQR}}
233\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{]}}}}
234\label{classbdm_1_1BM_50257e0c1e5b5c73153ea6e716ad8ae0}
235
236
237Evaluates predictive log-likelihood of the given data record I.e. marginal likelihood of the data with the posterior integrated out.
238
239Reimplemented in \hyperlink{classbdm_1_1ARX_080a7e531e3aa06694112863b15bc6a4}{bdm::ARX}, \hyperlink{classbdm_1_1MixEF_da724da464a75e07521941e430929efa}{bdm::MixEF}, and \hyperlink{classbdm_1_1multiBM_e157b607c1e3fa91d42aeea44458e2bf}{bdm::multiBM}.
240
241Referenced by bdm::BM::logpred\_\-m().\hypertarget{classbdm_1_1BM_3efb3098172f1f67564a312fe732473e}{
242\index{bdm::KFcondQR@{bdm::KFcondQR}!\_\-copy\_\-@{\_\-copy\_\-}}
243\index{\_\-copy\_\-@{\_\-copy\_\-}!bdm::KFcondQR@{bdm::KFcondQR}}
244\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{]}}}}
245\label{classbdm_1_1BM_3efb3098172f1f67564a312fe732473e}
246
247
248Copy 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; \} 
249
250Reimplemented in \hyperlink{classbdm_1_1ARX_20ff2de8d862f28de7da83444d65bcdb}{bdm::ARX}, and \hyperlink{classbdm_1_1BMEF_5912dbcf28ae711e30b08c2fa766a3e6}{bdm::BMEF}.
251
252The documentation for this class was generated from the following files:\begin{CompactItemize}
253\item 
254\hyperlink{libKF_8h}{libKF.h}\item 
255libKF.cpp\end{CompactItemize}
Note: See TracBrowser for help on using the browser.