[172] | 1 | \hypertarget{classMPF}{ |
---|
[30] | 2 | \section{MPF$<$ BM\_\-T $>$ Class Template Reference} |
---|
| 3 | \label{classMPF}\index{MPF@{MPF}} |
---|
[172] | 4 | } |
---|
[30] | 5 | Marginalized Particle filter. |
---|
| 6 | |
---|
| 7 | |
---|
| 8 | {\tt \#include $<$libPF.h$>$} |
---|
| 9 | |
---|
| 10 | Inheritance diagram for MPF$<$ BM\_\-T $>$:\nopagebreak |
---|
| 11 | \begin{figure}[H] |
---|
| 12 | \begin{center} |
---|
| 13 | \leavevmode |
---|
[91] | 14 | \includegraphics[width=62pt]{classMPF__inherit__graph} |
---|
[30] | 15 | \end{center} |
---|
| 16 | \end{figure} |
---|
| 17 | Collaboration diagram for MPF$<$ BM\_\-T $>$:\nopagebreak |
---|
| 18 | \begin{figure}[H] |
---|
| 19 | \begin{center} |
---|
| 20 | \leavevmode |
---|
[91] | 21 | \includegraphics[width=159pt]{classMPF__coll__graph} |
---|
[30] | 22 | \end{center} |
---|
| 23 | \end{figure} |
---|
| 24 | \subsection*{Public Member Functions} |
---|
| 25 | \begin{CompactItemize} |
---|
| 26 | \item |
---|
[172] | 27 | \hypertarget{classMPF_fc5e11e11eec3195e3c6503937bf02bd}{ |
---|
| 28 | \hyperlink{classMPF_fc5e11e11eec3195e3c6503937bf02bd}{MPF} (const \hyperlink{classRV}{RV} \&rvlin, const \hyperlink{classRV}{RV} \&rvpf, \hyperlink{classmpdf}{mpdf} \&par0, \hyperlink{classmpdf}{mpdf} \&obs0, int \hyperlink{classPF_2c2f44ed7a4eaa42e07bdb58d503f280}{n}, const BM\_\-T \&BMcond0)} |
---|
| 29 | \label{classMPF_fc5e11e11eec3195e3c6503937bf02bd} |
---|
[30] | 30 | |
---|
| 31 | \begin{CompactList}\small\item\em Default constructor. \item\end{CompactList}\item |
---|
[172] | 32 | void \hyperlink{classMPF_55daf8e4b6553dd9f47c692de7931623}{bayes} (const vec \&dt) |
---|
[30] | 33 | \begin{CompactList}\small\item\em Incremental Bayes rule. \item\end{CompactList}\item |
---|
[172] | 34 | \hypertarget{classMPF_992e01bb8f06c814cda036796e4a55ae}{ |
---|
| 35 | const \hyperlink{classepdf}{epdf} \& \hyperlink{classMPF_992e01bb8f06c814cda036796e4a55ae}{\_\-epdf} () const } |
---|
| 36 | \label{classMPF_992e01bb8f06c814cda036796e4a55ae} |
---|
[30] | 37 | |
---|
[172] | 38 | \begin{CompactList}\small\item\em Returns a pointer to the \hyperlink{classepdf}{epdf} representing posterior density on parameters. Use with care! \item\end{CompactList}\item |
---|
| 39 | \hypertarget{classMPF_7c66e1c1c0e45fc4ae765133cb3a1553}{ |
---|
| 40 | void \hyperlink{classMPF_7c66e1c1c0e45fc4ae765133cb3a1553}{set\_\-est} (const \hyperlink{classepdf}{epdf} \&epdf0)} |
---|
| 41 | \label{classMPF_7c66e1c1c0e45fc4ae765133cb3a1553} |
---|
[30] | 42 | |
---|
[33] | 43 | \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 |
---|
[172] | 44 | \hypertarget{classBM_0186270f75189677f390fe088a9947e9}{ |
---|
| 45 | virtual void \hyperlink{classBM_0186270f75189677f390fe088a9947e9}{bayesB} (const mat \&Dt)} |
---|
| 46 | \label{classBM_0186270f75189677f390fe088a9947e9} |
---|
[30] | 47 | |
---|
[33] | 48 | \begin{CompactList}\small\item\em Batch Bayes rule (columns of Dt are observations). \item\end{CompactList}\item |
---|
[172] | 49 | virtual double \hyperlink{classBM_8a8ce6df431689964c41cc6c849cfd06}{logpred} (const vec \&dt) const |
---|
| 50 | \item |
---|
[180] | 51 | \hypertarget{classBM_cd0660f2a1a344b56ac39802708ff165}{ |
---|
| 52 | vec \hyperlink{classBM_cd0660f2a1a344b56ac39802708ff165}{logpred\_\-m} (const mat \&dt) const } |
---|
| 53 | \label{classBM_cd0660f2a1a344b56ac39802708ff165} |
---|
| 54 | |
---|
| 55 | \begin{CompactList}\small\item\em Matrix version of logpred. \item\end{CompactList}\item |
---|
| 56 | \hypertarget{classBM_a627c5a79cc6f5221b7e09675525e032}{ |
---|
| 57 | virtual \hyperlink{classepdf}{epdf} $\ast$ \hyperlink{classBM_a627c5a79cc6f5221b7e09675525e032}{predictor} (const \hyperlink{classRV}{RV} \&\hyperlink{classBM_af00f0612fabe66241dd507188cdbf88}{rv})} |
---|
| 58 | \label{classBM_a627c5a79cc6f5221b7e09675525e032} |
---|
| 59 | |
---|
| 60 | \begin{CompactList}\small\item\em Constructs a predictive density (marginal density on data). \item\end{CompactList}\item |
---|
[172] | 61 | \hypertarget{classBM_126bd2595c48e311fc2a7ab72876092a}{ |
---|
| 62 | const \hyperlink{classRV}{RV} \& \hyperlink{classBM_126bd2595c48e311fc2a7ab72876092a}{\_\-rv} () const } |
---|
| 63 | \label{classBM_126bd2595c48e311fc2a7ab72876092a} |
---|
[33] | 64 | |
---|
| 65 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
---|
[172] | 66 | \hypertarget{classBM_87f4a547d2c29180be88175e5eab9c88}{ |
---|
| 67 | double \hyperlink{classBM_87f4a547d2c29180be88175e5eab9c88}{\_\-ll} () const } |
---|
| 68 | \label{classBM_87f4a547d2c29180be88175e5eab9c88} |
---|
[33] | 69 | |
---|
[172] | 70 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
---|
| 71 | \hypertarget{classBM_1ffa9f23669aabecc3760c06c6987522}{ |
---|
| 72 | void \hyperlink{classBM_1ffa9f23669aabecc3760c06c6987522}{set\_\-evalll} (bool evl0)} |
---|
| 73 | \label{classBM_1ffa9f23669aabecc3760c06c6987522} |
---|
| 74 | |
---|
| 75 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
---|
| 76 | virtual \hyperlink{classBM}{BM} $\ast$ \hyperlink{classBM_eb58c81d6a7b75b05fc6f276eed78887}{\_\-copy\_\-} (bool changerv=false) |
---|
| 77 | \end{CompactItemize} |
---|
[79] | 78 | \subsection*{Public Attributes} |
---|
| 79 | \begin{CompactItemize} |
---|
| 80 | \item |
---|
[172] | 81 | \hypertarget{classMPF_65b869f3cde2e8d3cfcc2752d14d1ca6}{ |
---|
| 82 | double \textbf{SSAT}} |
---|
| 83 | \label{classMPF_65b869f3cde2e8d3cfcc2752d14d1ca6} |
---|
[79] | 84 | |
---|
| 85 | \end{CompactItemize} |
---|
[30] | 86 | \subsection*{Protected Attributes} |
---|
| 87 | \begin{CompactItemize} |
---|
| 88 | \item |
---|
[172] | 89 | \hypertarget{classPF_2c2f44ed7a4eaa42e07bdb58d503f280}{ |
---|
| 90 | int \hyperlink{classPF_2c2f44ed7a4eaa42e07bdb58d503f280}{n}} |
---|
| 91 | \label{classPF_2c2f44ed7a4eaa42e07bdb58d503f280} |
---|
[30] | 92 | |
---|
| 93 | \begin{CompactList}\small\item\em number of particles; \item\end{CompactList}\item |
---|
[172] | 94 | \hypertarget{classPF_1a0a09e309da997f63ae8e30d1e9806b}{ |
---|
| 95 | \hyperlink{classeEmp}{eEmp} \hyperlink{classPF_1a0a09e309da997f63ae8e30d1e9806b}{est}} |
---|
| 96 | \label{classPF_1a0a09e309da997f63ae8e30d1e9806b} |
---|
[30] | 97 | |
---|
| 98 | \begin{CompactList}\small\item\em posterior density \item\end{CompactList}\item |
---|
[172] | 99 | \hypertarget{classPF_5c87aba508df321ff26536ced64dbb3a}{ |
---|
| 100 | vec \& \hyperlink{classPF_5c87aba508df321ff26536ced64dbb3a}{\_\-w}} |
---|
| 101 | \label{classPF_5c87aba508df321ff26536ced64dbb3a} |
---|
[30] | 102 | |
---|
[172] | 103 | \begin{CompactList}\small\item\em pointer into {\tt \hyperlink{classeEmp}{eEmp}} \item\end{CompactList}\item |
---|
| 104 | \hypertarget{classPF_cf7dad75e31215780a746c30e71ad9c5}{ |
---|
| 105 | Array$<$ vec $>$ \& \hyperlink{classPF_cf7dad75e31215780a746c30e71ad9c5}{\_\-samples}} |
---|
| 106 | \label{classPF_cf7dad75e31215780a746c30e71ad9c5} |
---|
[30] | 107 | |
---|
[172] | 108 | \begin{CompactList}\small\item\em pointer into {\tt \hyperlink{classeEmp}{eEmp}} \item\end{CompactList}\item |
---|
| 109 | \hypertarget{classPF_d92ac103f88f8c21e197e90af5695a09}{ |
---|
| 110 | \hyperlink{classmpdf}{mpdf} \& \hyperlink{classPF_d92ac103f88f8c21e197e90af5695a09}{par}} |
---|
| 111 | \label{classPF_d92ac103f88f8c21e197e90af5695a09} |
---|
[30] | 112 | |
---|
| 113 | \begin{CompactList}\small\item\em Parameter evolution model. \item\end{CompactList}\item |
---|
[172] | 114 | \hypertarget{classPF_dd0a687a4515333d6809147335854e77}{ |
---|
| 115 | \hyperlink{classmpdf}{mpdf} \& \hyperlink{classPF_dd0a687a4515333d6809147335854e77}{obs}} |
---|
| 116 | \label{classPF_dd0a687a4515333d6809147335854e77} |
---|
[30] | 117 | |
---|
| 118 | \begin{CompactList}\small\item\em Observation model. \item\end{CompactList}\item |
---|
[172] | 119 | \hypertarget{classBM_af00f0612fabe66241dd507188cdbf88}{ |
---|
| 120 | \hyperlink{classRV}{RV} \hyperlink{classBM_af00f0612fabe66241dd507188cdbf88}{rv}} |
---|
| 121 | \label{classBM_af00f0612fabe66241dd507188cdbf88} |
---|
[30] | 122 | |
---|
| 123 | \begin{CompactList}\small\item\em Random variable of the posterior. \item\end{CompactList}\item |
---|
[172] | 124 | \hypertarget{classBM_5623fef6572a08c2b53b8c87b82dc979}{ |
---|
| 125 | double \hyperlink{classBM_5623fef6572a08c2b53b8c87b82dc979}{ll}} |
---|
| 126 | \label{classBM_5623fef6572a08c2b53b8c87b82dc979} |
---|
[30] | 127 | |
---|
| 128 | \begin{CompactList}\small\item\em Logarithm of marginalized data likelihood. \item\end{CompactList}\item |
---|
[172] | 129 | \hypertarget{classBM_bf6fb59b30141074f8ee1e2f43d03129}{ |
---|
| 130 | bool \hyperlink{classBM_bf6fb59b30141074f8ee1e2f43d03129}{evalll}} |
---|
| 131 | \label{classBM_bf6fb59b30141074f8ee1e2f43d03129} |
---|
[30] | 132 | |
---|
[172] | 133 | \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} |
---|
[33] | 134 | \subsection*{Classes} |
---|
| 135 | \begin{CompactItemize} |
---|
| 136 | \item |
---|
| 137 | class \textbf{mpfepdf} |
---|
[172] | 138 | \begin{CompactList}\small\item\em internal class for MPDF providing composition of \hyperlink{classeEmp}{eEmp} with external components \item\end{CompactList}\end{CompactItemize} |
---|
[30] | 139 | |
---|
| 140 | |
---|
| 141 | \subsection{Detailed Description} |
---|
| 142 | \subsubsection*{template$<$class BM\_\-T$>$ class MPF$<$ BM\_\-T $>$} |
---|
| 143 | |
---|
| 144 | Marginalized Particle filter. |
---|
| 145 | |
---|
[172] | 146 | Trivial version: proposal = parameter evolution, observation model is not used. (it is assumed to be part of \hyperlink{classBM}{BM}). |
---|
[33] | 147 | |
---|
[30] | 148 | \subsection{Member Function Documentation} |
---|
[172] | 149 | \hypertarget{classMPF_55daf8e4b6553dd9f47c692de7931623}{ |
---|
[30] | 150 | \index{MPF@{MPF}!bayes@{bayes}} |
---|
| 151 | \index{bayes@{bayes}!MPF@{MPF}} |
---|
[172] | 152 | \subsubsection[bayes]{\setlength{\rightskip}{0pt plus 5cm}template$<$class BM\_\-T$>$ void {\bf MPF}$<$ BM\_\-T $>$::bayes (const vec \& {\em dt})\hspace{0.3cm}{\tt \mbox{[}inline, virtual\mbox{]}}}} |
---|
| 153 | \label{classMPF_55daf8e4b6553dd9f47c692de7931623} |
---|
[30] | 154 | |
---|
| 155 | |
---|
| 156 | Incremental Bayes rule. |
---|
| 157 | |
---|
| 158 | \begin{Desc} |
---|
| 159 | \item[Parameters:] |
---|
| 160 | \begin{description} |
---|
| 161 | \item[{\em dt}]vector of input data \end{description} |
---|
| 162 | \end{Desc} |
---|
| 163 | |
---|
| 164 | |
---|
[172] | 165 | Reimplemented from \hyperlink{classPF_64f636bbd63bea9efd778214e6b631d3}{PF}. |
---|
[30] | 166 | |
---|
[172] | 167 | References PF::\_\-samples, PF::\_\-w, PF::est, PF::n, PF::par, eEmp::resample(), and mpdf::samplecond().\hypertarget{classBM_8a8ce6df431689964c41cc6c849cfd06}{ |
---|
| 168 | \index{MPF@{MPF}!logpred@{logpred}} |
---|
| 169 | \index{logpred@{logpred}!MPF@{MPF}} |
---|
| 170 | \subsubsection[logpred]{\setlength{\rightskip}{0pt plus 5cm}virtual double BM::logpred (const vec \& {\em dt}) const\hspace{0.3cm}{\tt \mbox{[}inline, virtual, inherited\mbox{]}}}} |
---|
| 171 | \label{classBM_8a8ce6df431689964c41cc6c849cfd06} |
---|
[91] | 172 | |
---|
[172] | 173 | |
---|
| 174 | Evaluates predictive log-likelihood of the given data record I.e. marginal likelihood of the data with the posterior integrated out. |
---|
| 175 | |
---|
[180] | 176 | Reimplemented in \hyperlink{classARX_e7f9e7823aec9bf7ddc3b42d9b3304c4}{ARX}, \hyperlink{classMixEF_424ca64f36d4e41de7a7e7ae921d35ea}{MixEF}, and \hyperlink{classmultiBM_13e26a61757278981fd8cac9a7ef91eb}{multiBM}. |
---|
| 177 | |
---|
| 178 | Referenced by BM::logpred\_\-m().\hypertarget{classBM_eb58c81d6a7b75b05fc6f276eed78887}{ |
---|
[172] | 179 | \index{MPF@{MPF}!\_\-copy\_\-@{\_\-copy\_\-}} |
---|
| 180 | \index{\_\-copy\_\-@{\_\-copy\_\-}!MPF@{MPF}} |
---|
| 181 | \subsubsection[\_\-copy\_\-]{\setlength{\rightskip}{0pt plus 5cm}virtual {\bf BM}$\ast$ BM::\_\-copy\_\- (bool {\em changerv} = {\tt false})\hspace{0.3cm}{\tt \mbox{[}inline, virtual, inherited\mbox{]}}}} |
---|
| 182 | \label{classBM_eb58c81d6a7b75b05fc6f276eed78887} |
---|
| 183 | |
---|
| 184 | |
---|
| 185 | Copy function required in vectors, Arrays of \hyperlink{classBM}{BM} etc. Have to be DELETED manually! Prototype: BM$\ast$ \hyperlink{classBM_eb58c81d6a7b75b05fc6f276eed78887}{\_\-copy\_\-()}\{\hyperlink{classBM}{BM} Tmp$\ast$=new Tmp(this$\ast$); return Tmp; \} |
---|
| 186 | |
---|
[180] | 187 | Reimplemented in \hyperlink{classARX_5de61fbd4f97fa3216760b1f733f5af0}{ARX}. |
---|
[172] | 188 | |
---|
[180] | 189 | Referenced by MixEF::init(). |
---|
[172] | 190 | |
---|
[30] | 191 | The documentation for this class was generated from the following file:\begin{CompactItemize} |
---|
| 192 | \item |
---|
[172] | 193 | work/git/mixpp/bdm/estim/\hyperlink{libPF_8h}{libPF.h}\end{CompactItemize} |
---|