root/doc/latex/classbdm_1_1KFcondR.tex @ 271

Revision 271, 15.1 kB (checked in by smidl, 16 years ago)

Next major revision

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