1 | \hypertarget{classbdm_1_1MPF}{ |
---|
2 | \section{bdm::MPF$<$ BM\_\-T $>$ Class Template Reference} |
---|
3 | \label{classbdm_1_1MPF}\index{bdm::MPF@{bdm::MPF}} |
---|
4 | } |
---|
5 | {\tt \#include $<$libPF.h$>$} |
---|
6 | |
---|
7 | Inheritance diagram for bdm::MPF$<$ BM\_\-T $>$:\nopagebreak |
---|
8 | \begin{figure}[H] |
---|
9 | \begin{center} |
---|
10 | \leavevmode |
---|
11 | \includegraphics[width=77pt]{classbdm_1_1MPF__inherit__graph} |
---|
12 | \end{center} |
---|
13 | \end{figure} |
---|
14 | |
---|
15 | |
---|
16 | \subsection{Detailed Description} |
---|
17 | \subsubsection*{template$<$class BM\_\-T$>$ class bdm::MPF$<$ BM\_\-T $>$} |
---|
18 | |
---|
19 | Marginalized Particle filter. |
---|
20 | |
---|
21 | Trivial version: proposal = parameter evolution, observation model is not used. (it is assumed to be part of \hyperlink{classbdm_1_1BM}{BM}). \subsection*{Public Member Functions} |
---|
22 | \begin{CompactItemize} |
---|
23 | \item |
---|
24 | \hypertarget{classbdm_1_1MPF_e2a00c2399599c3613ab632fc36a1f79}{ |
---|
25 | \hyperlink{classbdm_1_1MPF_e2a00c2399599c3613ab632fc36a1f79}{MPF} (const \hyperlink{classbdm_1_1RV}{RV} \&rvlin, const \hyperlink{classbdm_1_1RV}{RV} \&rvpf, \hyperlink{classbdm_1_1mpdf}{mpdf} \&par0, \hyperlink{classbdm_1_1mpdf}{mpdf} \&obs0, int \hyperlink{classbdm_1_1PF_eeafaf9b8ad75fe62ee9fd6369e3f7fe}{n}, const BM\_\-T \&BMcond0)} |
---|
26 | \label{classbdm_1_1MPF_e2a00c2399599c3613ab632fc36a1f79} |
---|
27 | |
---|
28 | \begin{CompactList}\small\item\em Default constructor. \item\end{CompactList}\item |
---|
29 | void \hyperlink{classbdm_1_1MPF_286d040770d08bd7ff416cea617b1b14}{bayes} (const vec \&dt) |
---|
30 | \begin{CompactList}\small\item\em Incremental Bayes rule. \item\end{CompactList}\item |
---|
31 | \hypertarget{classbdm_1_1MPF_2da4cbf7645da52ad5630ada411e3f9f}{ |
---|
32 | const \hyperlink{classbdm_1_1epdf}{epdf} \& \textbf{\_\-epdf} () const } |
---|
33 | \label{classbdm_1_1MPF_2da4cbf7645da52ad5630ada411e3f9f} |
---|
34 | |
---|
35 | \item |
---|
36 | \hypertarget{classbdm_1_1MPF_1401874aa88a7a3f2593070646779af2}{ |
---|
37 | const \hyperlink{classbdm_1_1epdf}{epdf} $\ast$ \textbf{\_\-e} () const } |
---|
38 | \label{classbdm_1_1MPF_1401874aa88a7a3f2593070646779af2} |
---|
39 | |
---|
40 | \item |
---|
41 | \hypertarget{classbdm_1_1MPF_dcecdaf2acbbee51acf3018a70989a7e}{ |
---|
42 | void \hyperlink{classbdm_1_1MPF_dcecdaf2acbbee51acf3018a70989a7e}{set\_\-est} (const \hyperlink{classbdm_1_1epdf}{epdf} \&epdf0)} |
---|
43 | \label{classbdm_1_1MPF_dcecdaf2acbbee51acf3018a70989a7e} |
---|
44 | |
---|
45 | \begin{CompactList}\small\item\em Set postrior of {\tt rvc} to samples from epdf0. Statistics of Bms are not re-computed! Use only for initialization! \item\end{CompactList}\item |
---|
46 | \hypertarget{classbdm_1_1MPF_82b5a34d9ed0e78452f98d2ecbf1e93c}{ |
---|
47 | \hyperlink{classbdm_1_1BM}{BM} $\ast$ \hyperlink{classbdm_1_1MPF_82b5a34d9ed0e78452f98d2ecbf1e93c}{\_\-BM} (int i)} |
---|
48 | \label{classbdm_1_1MPF_82b5a34d9ed0e78452f98d2ecbf1e93c} |
---|
49 | |
---|
50 | \begin{CompactList}\small\item\em Access function. \item\end{CompactList}\item |
---|
51 | \hypertarget{classbdm_1_1PF_78a9f6809827be1d9bfe215d03b1c6ed}{ |
---|
52 | vec $\ast$ \hyperlink{classbdm_1_1PF_78a9f6809827be1d9bfe215d03b1c6ed}{\_\-\_\-w} ()} |
---|
53 | \label{classbdm_1_1PF_78a9f6809827be1d9bfe215d03b1c6ed} |
---|
54 | |
---|
55 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\end{CompactItemize} |
---|
56 | \begin{Indent}{\bf Constructors}\par |
---|
57 | \begin{CompactItemize} |
---|
58 | \item |
---|
59 | virtual \hyperlink{classbdm_1_1BM}{BM} $\ast$ \hyperlink{classbdm_1_1BM_c0f027ff91d8459937c6f60ff8e553ff}{\_\-copy\_\-} () |
---|
60 | \end{CompactItemize} |
---|
61 | \end{Indent} |
---|
62 | \begin{Indent}{\bf Mathematical operations}\par |
---|
63 | \begin{CompactItemize} |
---|
64 | \item |
---|
65 | \hypertarget{classbdm_1_1BM_1dee3fddaf021e62d925289660a707dc}{ |
---|
66 | virtual void \hyperlink{classbdm_1_1BM_1dee3fddaf021e62d925289660a707dc}{bayesB} (const mat \&Dt)} |
---|
67 | \label{classbdm_1_1BM_1dee3fddaf021e62d925289660a707dc} |
---|
68 | |
---|
69 | \begin{CompactList}\small\item\em Batch Bayes rule (columns of Dt are observations). \item\end{CompactList}\item |
---|
70 | virtual double \hyperlink{classbdm_1_1BM_50257e0c1e5b5c73153ea6e716ad8ae0}{logpred} (const vec \&dt) const |
---|
71 | \item |
---|
72 | \hypertarget{classbdm_1_1BM_0e8ebe61fb14990abe1254bd3dda5fae}{ |
---|
73 | vec \hyperlink{classbdm_1_1BM_0e8ebe61fb14990abe1254bd3dda5fae}{logpred\_\-m} (const mat \&dt) const } |
---|
74 | \label{classbdm_1_1BM_0e8ebe61fb14990abe1254bd3dda5fae} |
---|
75 | |
---|
76 | \begin{CompactList}\small\item\em Matrix version of logpred. \item\end{CompactList}\item |
---|
77 | \hypertarget{classbdm_1_1BM_688d7a2aced1e06aa1c468d73a9e5eba}{ |
---|
78 | virtual \hyperlink{classbdm_1_1epdf}{epdf} $\ast$ \hyperlink{classbdm_1_1BM_688d7a2aced1e06aa1c468d73a9e5eba}{epredictor} () const } |
---|
79 | \label{classbdm_1_1BM_688d7a2aced1e06aa1c468d73a9e5eba} |
---|
80 | |
---|
81 | \begin{CompactList}\small\item\em Constructs a predictive density $ f(d_{t+1} |d_{t}, \ldots d_{0}) $. \item\end{CompactList}\item |
---|
82 | \hypertarget{classbdm_1_1BM_598b25e3f3d96a5bc00a5faeb5b3c912}{ |
---|
83 | virtual \hyperlink{classbdm_1_1mpdf}{mpdf} $\ast$ \hyperlink{classbdm_1_1BM_598b25e3f3d96a5bc00a5faeb5b3c912}{predictor} () const } |
---|
84 | \label{classbdm_1_1BM_598b25e3f3d96a5bc00a5faeb5b3c912} |
---|
85 | |
---|
86 | \begin{CompactList}\small\item\em Constructs a conditional density 1-step ahead predictor. \item\end{CompactList}\end{CompactItemize} |
---|
87 | \end{Indent} |
---|
88 | \begin{Indent}{\bf Access to attributes}\par |
---|
89 | \begin{CompactItemize} |
---|
90 | \item |
---|
91 | \hypertarget{classbdm_1_1BM_ff2d8755ba0b3def927d31305c03b09c}{ |
---|
92 | const \hyperlink{classbdm_1_1RV}{RV} \& \textbf{\_\-drv} () const } |
---|
93 | \label{classbdm_1_1BM_ff2d8755ba0b3def927d31305c03b09c} |
---|
94 | |
---|
95 | \item |
---|
96 | \hypertarget{classbdm_1_1BM_f135ae6dce7e9f30c9f88229c7930b96}{ |
---|
97 | void \textbf{set\_\-drv} (const \hyperlink{classbdm_1_1RV}{RV} \&rv)} |
---|
98 | \label{classbdm_1_1BM_f135ae6dce7e9f30c9f88229c7930b96} |
---|
99 | |
---|
100 | \item |
---|
101 | \hypertarget{classbdm_1_1BM_5be65d37dedfe33a3671e7065f523a70}{ |
---|
102 | double \textbf{\_\-ll} () const } |
---|
103 | \label{classbdm_1_1BM_5be65d37dedfe33a3671e7065f523a70} |
---|
104 | |
---|
105 | \item |
---|
106 | \hypertarget{classbdm_1_1BM_236b3abbcc93594fc97cd86d82c1a83f}{ |
---|
107 | void \textbf{set\_\-evalll} (bool evl0)} |
---|
108 | \label{classbdm_1_1BM_236b3abbcc93594fc97cd86d82c1a83f} |
---|
109 | |
---|
110 | \end{CompactItemize} |
---|
111 | \end{Indent} |
---|
112 | \subsection*{Protected Attributes} |
---|
113 | \begin{CompactItemize} |
---|
114 | \item |
---|
115 | \hypertarget{classbdm_1_1PF_eeafaf9b8ad75fe62ee9fd6369e3f7fe}{ |
---|
116 | int \hyperlink{classbdm_1_1PF_eeafaf9b8ad75fe62ee9fd6369e3f7fe}{n}} |
---|
117 | \label{classbdm_1_1PF_eeafaf9b8ad75fe62ee9fd6369e3f7fe} |
---|
118 | |
---|
119 | \begin{CompactList}\small\item\em number of particles; \item\end{CompactList}\item |
---|
120 | \hypertarget{classbdm_1_1PF_dc049265b9086cad7071f98d00a2b9af}{ |
---|
121 | \hyperlink{classbdm_1_1eEmp}{eEmp} \hyperlink{classbdm_1_1PF_dc049265b9086cad7071f98d00a2b9af}{est}} |
---|
122 | \label{classbdm_1_1PF_dc049265b9086cad7071f98d00a2b9af} |
---|
123 | |
---|
124 | \begin{CompactList}\small\item\em posterior density \item\end{CompactList}\item |
---|
125 | \hypertarget{classbdm_1_1PF_f5149d5522d1095d39240c4c607f61a3}{ |
---|
126 | vec \& \hyperlink{classbdm_1_1PF_f5149d5522d1095d39240c4c607f61a3}{\_\-w}} |
---|
127 | \label{classbdm_1_1PF_f5149d5522d1095d39240c4c607f61a3} |
---|
128 | |
---|
129 | \begin{CompactList}\small\item\em pointer into {\tt \hyperlink{classbdm_1_1eEmp}{eEmp}} \item\end{CompactList}\item |
---|
130 | \hypertarget{classbdm_1_1PF_914bd66025692c4018dbd482cb3c47c1}{ |
---|
131 | Array$<$ vec $>$ \& \hyperlink{classbdm_1_1PF_914bd66025692c4018dbd482cb3c47c1}{\_\-samples}} |
---|
132 | \label{classbdm_1_1PF_914bd66025692c4018dbd482cb3c47c1} |
---|
133 | |
---|
134 | \begin{CompactList}\small\item\em pointer into {\tt \hyperlink{classbdm_1_1eEmp}{eEmp}} \item\end{CompactList}\item |
---|
135 | \hypertarget{classbdm_1_1PF_cf3a1b2a407012e47ac878e3aa2fbf34}{ |
---|
136 | \hyperlink{classbdm_1_1mpdf}{mpdf} \& \hyperlink{classbdm_1_1PF_cf3a1b2a407012e47ac878e3aa2fbf34}{par}} |
---|
137 | \label{classbdm_1_1PF_cf3a1b2a407012e47ac878e3aa2fbf34} |
---|
138 | |
---|
139 | \begin{CompactList}\small\item\em Parameter evolution model. \item\end{CompactList}\item |
---|
140 | \hypertarget{classbdm_1_1PF_c58b8fa634272c3f48845a9020ba55aa}{ |
---|
141 | \hyperlink{classbdm_1_1mpdf}{mpdf} \& \hyperlink{classbdm_1_1PF_c58b8fa634272c3f48845a9020ba55aa}{obs}} |
---|
142 | \label{classbdm_1_1PF_c58b8fa634272c3f48845a9020ba55aa} |
---|
143 | |
---|
144 | \begin{CompactList}\small\item\em Observation model. \item\end{CompactList}\item |
---|
145 | \hypertarget{classbdm_1_1BM_c400357e37d27a4834b2b1d9211009ed}{ |
---|
146 | \hyperlink{classbdm_1_1RV}{RV} \hyperlink{classbdm_1_1BM_c400357e37d27a4834b2b1d9211009ed}{drv}} |
---|
147 | \label{classbdm_1_1BM_c400357e37d27a4834b2b1d9211009ed} |
---|
148 | |
---|
149 | \begin{CompactList}\small\item\em Random variable of the data (optional). \item\end{CompactList}\item |
---|
150 | \hypertarget{classbdm_1_1BM_4064b6559d962633e4372b12f4cd204a}{ |
---|
151 | double \hyperlink{classbdm_1_1BM_4064b6559d962633e4372b12f4cd204a}{ll}} |
---|
152 | \label{classbdm_1_1BM_4064b6559d962633e4372b12f4cd204a} |
---|
153 | |
---|
154 | \begin{CompactList}\small\item\em Logarithm of marginalized data likelihood. \item\end{CompactList}\item |
---|
155 | \hypertarget{classbdm_1_1BM_faff0ad12556fe7dc0e2807d4fd938ee}{ |
---|
156 | bool \hyperlink{classbdm_1_1BM_faff0ad12556fe7dc0e2807d4fd938ee}{evalll}} |
---|
157 | \label{classbdm_1_1BM_faff0ad12556fe7dc0e2807d4fd938ee} |
---|
158 | |
---|
159 | \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} |
---|
160 | \subsection*{Classes} |
---|
161 | \begin{CompactItemize} |
---|
162 | \item |
---|
163 | class \textbf{mpfepdf} |
---|
164 | \begin{CompactList}\small\item\em internal class for MPDF providing composition of \hyperlink{classbdm_1_1eEmp}{eEmp} with external components \item\end{CompactList}\end{CompactItemize} |
---|
165 | |
---|
166 | |
---|
167 | \subsection{Member Function Documentation} |
---|
168 | \hypertarget{classbdm_1_1MPF_286d040770d08bd7ff416cea617b1b14}{ |
---|
169 | \index{bdm::MPF@{bdm::MPF}!bayes@{bayes}} |
---|
170 | \index{bayes@{bayes}!bdm::MPF@{bdm::MPF}} |
---|
171 | \subsubsection[bayes]{\setlength{\rightskip}{0pt plus 5cm}template$<$class BM\_\-T$>$ void {\bf bdm::MPF}$<$ BM\_\-T $>$::bayes (const vec \& {\em dt})\hspace{0.3cm}{\tt \mbox{[}inline, virtual\mbox{]}}}} |
---|
172 | \label{classbdm_1_1MPF_286d040770d08bd7ff416cea617b1b14} |
---|
173 | |
---|
174 | |
---|
175 | Incremental Bayes rule. |
---|
176 | |
---|
177 | \begin{Desc} |
---|
178 | \item[Parameters:] |
---|
179 | \begin{description} |
---|
180 | \item[{\em dt}]vector of input data \end{description} |
---|
181 | \end{Desc} |
---|
182 | |
---|
183 | |
---|
184 | Reimplemented from \hyperlink{classbdm_1_1PF_638946eea22d4964bf9350286bb4efd8}{bdm::PF}. |
---|
185 | |
---|
186 | References bdm::mpdf::\_\-e(), bdm::PF::\_\-samples, bdm::PF::\_\-w, bdm::PF::est, bdm::epdf::evallog(), bdm::PF::n, bdm::PF::par, bdm::eEmp::resample(), and bdm::mpdf::samplecond().\hypertarget{classbdm_1_1BM_c0f027ff91d8459937c6f60ff8e553ff}{ |
---|
187 | \index{bdm::MPF@{bdm::MPF}!\_\-copy\_\-@{\_\-copy\_\-}} |
---|
188 | \index{\_\-copy\_\-@{\_\-copy\_\-}!bdm::MPF@{bdm::MPF}} |
---|
189 | \subsubsection[\_\-copy\_\-]{\setlength{\rightskip}{0pt plus 5cm}virtual {\bf BM}$\ast$ bdm::BM::\_\-copy\_\- ()\hspace{0.3cm}{\tt \mbox{[}inline, virtual, inherited\mbox{]}}}} |
---|
190 | \label{classbdm_1_1BM_c0f027ff91d8459937c6f60ff8e553ff} |
---|
191 | |
---|
192 | |
---|
193 | Copy function required in vectors, Arrays of \hyperlink{classbdm_1_1BM}{BM} etc. Have to be DELETED manually! Prototype: |
---|
194 | |
---|
195 | \begin{Code}\begin{verbatim} BM* _copy_(){return new BM(*this);} |
---|
196 | \end{verbatim} |
---|
197 | \end{Code} |
---|
198 | |
---|
199 | |
---|
200 | |
---|
201 | Reimplemented in \hyperlink{classbdm_1_1ARX_60c40b5c6abc4c7e464b4ccae64a5a61}{bdm::ARX}.\hypertarget{classbdm_1_1BM_50257e0c1e5b5c73153ea6e716ad8ae0}{ |
---|
202 | \index{bdm::MPF@{bdm::MPF}!logpred@{logpred}} |
---|
203 | \index{logpred@{logpred}!bdm::MPF@{bdm::MPF}} |
---|
204 | \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{]}}}} |
---|
205 | \label{classbdm_1_1BM_50257e0c1e5b5c73153ea6e716ad8ae0} |
---|
206 | |
---|
207 | |
---|
208 | Evaluates predictive log-likelihood of the given data record I.e. marginal likelihood of the data with the posterior integrated out. |
---|
209 | |
---|
210 | Reimplemented in \hyperlink{classbdm_1_1ARX_080a7e531e3aa06694112863b15bc6a4}{bdm::ARX}, \hyperlink{classbdm_1_1MixEF_da724da464a75e07521941e430929efa}{bdm::MixEF}, and \hyperlink{classbdm_1_1multiBM_e157b607c1e3fa91d42aeea44458e2bf}{bdm::multiBM}. |
---|
211 | |
---|
212 | Referenced by bdm::BM::logpred\_\-m(). |
---|
213 | |
---|
214 | The documentation for this class was generated from the following file:\begin{CompactItemize} |
---|
215 | \item |
---|
216 | \hyperlink{libPF_8h}{libPF.h}\end{CompactItemize} |
---|