root/doc/latex/classbdm_1_1KFcondQR.tex @ 270

Revision 270, 14.9 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

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