\hypertarget{classbdm_1_1MPF}{
\section{bdm::MPF$<$ BM\_\-T $>$ Class Template Reference}
\label{classbdm_1_1MPF}\index{bdm::MPF@{bdm::MPF}}
}
Marginalized Particle filter.  


{\tt \#include $<$libPF.h$>$}

Inheritance diagram for bdm::MPF$<$ BM\_\-T $>$:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=77pt]{classbdm_1_1MPF__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for bdm::MPF$<$ BM\_\-T $>$:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=400pt]{classbdm_1_1MPF__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
\hypertarget{classbdm_1_1MPF_e2a00c2399599c3613ab632fc36a1f79}{
\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)}
\label{classbdm_1_1MPF_e2a00c2399599c3613ab632fc36a1f79}

\begin{CompactList}\small\item\em Default constructor. \item\end{CompactList}\item 
void \hyperlink{classbdm_1_1MPF_286d040770d08bd7ff416cea617b1b14}{bayes} (const vec \&dt)
\begin{CompactList}\small\item\em Incremental Bayes rule. \item\end{CompactList}\item 
\hypertarget{classbdm_1_1MPF_2da4cbf7645da52ad5630ada411e3f9f}{
const \hyperlink{classbdm_1_1epdf}{epdf} \& \hyperlink{classbdm_1_1MPF_2da4cbf7645da52ad5630ada411e3f9f}{\_\-epdf} () const }
\label{classbdm_1_1MPF_2da4cbf7645da52ad5630ada411e3f9f}

\begin{CompactList}\small\item\em Returns a reference to the \hyperlink{classbdm_1_1epdf}{epdf} representing posterior density on parameters. \item\end{CompactList}\item 
\hypertarget{classbdm_1_1MPF_1401874aa88a7a3f2593070646779af2}{
const \hyperlink{classbdm_1_1epdf}{epdf} $\ast$ \hyperlink{classbdm_1_1MPF_1401874aa88a7a3f2593070646779af2}{\_\-e} () const }
\label{classbdm_1_1MPF_1401874aa88a7a3f2593070646779af2}

\begin{CompactList}\small\item\em Returns a pointer to the \hyperlink{classbdm_1_1epdf}{epdf} representing posterior density on parameters. Use with care! \item\end{CompactList}\item 
\hypertarget{classbdm_1_1MPF_dcecdaf2acbbee51acf3018a70989a7e}{
void \hyperlink{classbdm_1_1MPF_dcecdaf2acbbee51acf3018a70989a7e}{set\_\-est} (const \hyperlink{classbdm_1_1epdf}{epdf} \&epdf0)}
\label{classbdm_1_1MPF_dcecdaf2acbbee51acf3018a70989a7e}

\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 
\hypertarget{classbdm_1_1MPF_82b5a34d9ed0e78452f98d2ecbf1e93c}{
\hyperlink{classbdm_1_1BM}{BM} $\ast$ \hyperlink{classbdm_1_1MPF_82b5a34d9ed0e78452f98d2ecbf1e93c}{\_\-BM} (int i)}
\label{classbdm_1_1MPF_82b5a34d9ed0e78452f98d2ecbf1e93c}

\begin{CompactList}\small\item\em Access function. \item\end{CompactList}\item 
\hypertarget{classbdm_1_1PF_78a9f6809827be1d9bfe215d03b1c6ed}{
vec $\ast$ \hyperlink{classbdm_1_1PF_78a9f6809827be1d9bfe215d03b1c6ed}{\_\-\_\-w} ()}
\label{classbdm_1_1PF_78a9f6809827be1d9bfe215d03b1c6ed}

\begin{CompactList}\small\item\em access function \item\end{CompactList}\item 
\hypertarget{classbdm_1_1BM_1dee3fddaf021e62d925289660a707dc}{
virtual void \hyperlink{classbdm_1_1BM_1dee3fddaf021e62d925289660a707dc}{bayesB} (const mat \&Dt)}
\label{classbdm_1_1BM_1dee3fddaf021e62d925289660a707dc}

\begin{CompactList}\small\item\em Batch Bayes rule (columns of Dt are observations). \item\end{CompactList}\item 
virtual double \hyperlink{classbdm_1_1BM_50257e0c1e5b5c73153ea6e716ad8ae0}{logpred} (const vec \&dt) const 
\item 
\hypertarget{classbdm_1_1BM_0e8ebe61fb14990abe1254bd3dda5fae}{
vec \hyperlink{classbdm_1_1BM_0e8ebe61fb14990abe1254bd3dda5fae}{logpred\_\-m} (const mat \&dt) const }
\label{classbdm_1_1BM_0e8ebe61fb14990abe1254bd3dda5fae}

\begin{CompactList}\small\item\em Matrix version of logpred. \item\end{CompactList}\item 
\hypertarget{classbdm_1_1BM_710e7d69c0d8791fb41a7cd4683cca2c}{
virtual \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 }
\label{classbdm_1_1BM_710e7d69c0d8791fb41a7cd4683cca2c}

\begin{CompactList}\small\item\em Constructs a predictive density (marginal density on data). \item\end{CompactList}\item 
\hypertarget{classbdm_1_1BM_40a3c891996391e3135518053a917793}{
const \hyperlink{classbdm_1_1RV}{RV} \& \hyperlink{classbdm_1_1BM_40a3c891996391e3135518053a917793}{\_\-rv} () const }
\label{classbdm_1_1BM_40a3c891996391e3135518053a917793}

\begin{CompactList}\small\item\em access function \item\end{CompactList}\item 
\hypertarget{classbdm_1_1BM_5be65d37dedfe33a3671e7065f523a70}{
double \hyperlink{classbdm_1_1BM_5be65d37dedfe33a3671e7065f523a70}{\_\-ll} () const }
\label{classbdm_1_1BM_5be65d37dedfe33a3671e7065f523a70}

\begin{CompactList}\small\item\em access function \item\end{CompactList}\item 
\hypertarget{classbdm_1_1BM_236b3abbcc93594fc97cd86d82c1a83f}{
void \hyperlink{classbdm_1_1BM_236b3abbcc93594fc97cd86d82c1a83f}{set\_\-evalll} (bool evl0)}
\label{classbdm_1_1BM_236b3abbcc93594fc97cd86d82c1a83f}

\begin{CompactList}\small\item\em access function \item\end{CompactList}\item 
virtual \hyperlink{classbdm_1_1BM}{BM} $\ast$ \hyperlink{classbdm_1_1BM_3efb3098172f1f67564a312fe732473e}{\_\-copy\_\-} (bool changerv=false)
\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
\hypertarget{classbdm_1_1PF_eeafaf9b8ad75fe62ee9fd6369e3f7fe}{
int \hyperlink{classbdm_1_1PF_eeafaf9b8ad75fe62ee9fd6369e3f7fe}{n}}
\label{classbdm_1_1PF_eeafaf9b8ad75fe62ee9fd6369e3f7fe}

\begin{CompactList}\small\item\em number of particles; \item\end{CompactList}\item 
\hypertarget{classbdm_1_1PF_dc049265b9086cad7071f98d00a2b9af}{
\hyperlink{classbdm_1_1eEmp}{eEmp} \hyperlink{classbdm_1_1PF_dc049265b9086cad7071f98d00a2b9af}{est}}
\label{classbdm_1_1PF_dc049265b9086cad7071f98d00a2b9af}

\begin{CompactList}\small\item\em posterior density \item\end{CompactList}\item 
\hypertarget{classbdm_1_1PF_f5149d5522d1095d39240c4c607f61a3}{
vec \& \hyperlink{classbdm_1_1PF_f5149d5522d1095d39240c4c607f61a3}{\_\-w}}
\label{classbdm_1_1PF_f5149d5522d1095d39240c4c607f61a3}

\begin{CompactList}\small\item\em pointer into {\tt \hyperlink{classbdm_1_1eEmp}{eEmp}} \item\end{CompactList}\item 
\hypertarget{classbdm_1_1PF_914bd66025692c4018dbd482cb3c47c1}{
Array$<$ vec $>$ \& \hyperlink{classbdm_1_1PF_914bd66025692c4018dbd482cb3c47c1}{\_\-samples}}
\label{classbdm_1_1PF_914bd66025692c4018dbd482cb3c47c1}

\begin{CompactList}\small\item\em pointer into {\tt \hyperlink{classbdm_1_1eEmp}{eEmp}} \item\end{CompactList}\item 
\hypertarget{classbdm_1_1PF_cf3a1b2a407012e47ac878e3aa2fbf34}{
\hyperlink{classbdm_1_1mpdf}{mpdf} \& \hyperlink{classbdm_1_1PF_cf3a1b2a407012e47ac878e3aa2fbf34}{par}}
\label{classbdm_1_1PF_cf3a1b2a407012e47ac878e3aa2fbf34}

\begin{CompactList}\small\item\em Parameter evolution model. \item\end{CompactList}\item 
\hypertarget{classbdm_1_1PF_c58b8fa634272c3f48845a9020ba55aa}{
\hyperlink{classbdm_1_1mpdf}{mpdf} \& \hyperlink{classbdm_1_1PF_c58b8fa634272c3f48845a9020ba55aa}{obs}}
\label{classbdm_1_1PF_c58b8fa634272c3f48845a9020ba55aa}

\begin{CompactList}\small\item\em Observation model. \item\end{CompactList}\item 
\hypertarget{classbdm_1_1BM_18d6db4af8ee42077741d9e3618153ca}{
\hyperlink{classbdm_1_1RV}{RV} \hyperlink{classbdm_1_1BM_18d6db4af8ee42077741d9e3618153ca}{rv}}
\label{classbdm_1_1BM_18d6db4af8ee42077741d9e3618153ca}

\begin{CompactList}\small\item\em Random variable of the posterior. \item\end{CompactList}\item 
\hypertarget{classbdm_1_1BM_4064b6559d962633e4372b12f4cd204a}{
double \hyperlink{classbdm_1_1BM_4064b6559d962633e4372b12f4cd204a}{ll}}
\label{classbdm_1_1BM_4064b6559d962633e4372b12f4cd204a}

\begin{CompactList}\small\item\em Logarithm of marginalized data likelihood. \item\end{CompactList}\item 
\hypertarget{classbdm_1_1BM_faff0ad12556fe7dc0e2807d4fd938ee}{
bool \hyperlink{classbdm_1_1BM_faff0ad12556fe7dc0e2807d4fd938ee}{evalll}}
\label{classbdm_1_1BM_faff0ad12556fe7dc0e2807d4fd938ee}

\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}
\subsection*{Classes}
\begin{CompactItemize}
\item 
class \textbf{mpfepdf}
\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}


\subsection{Detailed Description}
\subsubsection*{template$<$class BM\_\-T$>$ class bdm::MPF$<$ BM\_\-T $>$}

Marginalized Particle filter. 

Trivial version: proposal = parameter evolution, observation model is not used. (it is assumed to be part of \hyperlink{classbdm_1_1BM}{BM}). 

\subsection{Member Function Documentation}
\hypertarget{classbdm_1_1MPF_286d040770d08bd7ff416cea617b1b14}{
\index{bdm::MPF@{bdm::MPF}!bayes@{bayes}}
\index{bayes@{bayes}!bdm::MPF@{bdm::MPF}}
\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{]}}}}
\label{classbdm_1_1MPF_286d040770d08bd7ff416cea617b1b14}


Incremental Bayes rule. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em dt}]vector of input data \end{description}
\end{Desc}


Reimplemented from \hyperlink{classbdm_1_1PF_638946eea22d4964bf9350286bb4efd8}{bdm::PF}.

References bdm::PF::\_\-samples, bdm::PF::\_\-w, bdm::PF::est, bdm::PF::n, bdm::PF::par, bdm::eEmp::resample(), and bdm::mpdf::samplecond().\hypertarget{classbdm_1_1BM_50257e0c1e5b5c73153ea6e716ad8ae0}{
\index{bdm::MPF@{bdm::MPF}!logpred@{logpred}}
\index{logpred@{logpred}!bdm::MPF@{bdm::MPF}}
\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{]}}}}
\label{classbdm_1_1BM_50257e0c1e5b5c73153ea6e716ad8ae0}


Evaluates predictive log-likelihood of the given data record I.e. marginal likelihood of the data with the posterior integrated out. 

Reimplemented in \hyperlink{classbdm_1_1ARX_080a7e531e3aa06694112863b15bc6a4}{bdm::ARX}, \hyperlink{classbdm_1_1MixEF_da724da464a75e07521941e430929efa}{bdm::MixEF}, and \hyperlink{classbdm_1_1multiBM_e157b607c1e3fa91d42aeea44458e2bf}{bdm::multiBM}.

Referenced by bdm::BM::logpred\_\-m().\hypertarget{classbdm_1_1BM_3efb3098172f1f67564a312fe732473e}{
\index{bdm::MPF@{bdm::MPF}!\_\-copy\_\-@{\_\-copy\_\-}}
\index{\_\-copy\_\-@{\_\-copy\_\-}!bdm::MPF@{bdm::MPF}}
\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{]}}}}
\label{classbdm_1_1BM_3efb3098172f1f67564a312fe732473e}


Copy 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; \} 

Reimplemented in \hyperlink{classbdm_1_1ARX_20ff2de8d862f28de7da83444d65bcdb}{bdm::ARX}, and \hyperlink{classbdm_1_1BMEF_5912dbcf28ae711e30b08c2fa766a3e6}{bdm::BMEF}.

The documentation for this class was generated from the following file:\begin{CompactItemize}
\item 
\hyperlink{libPF_8h}{libPF.h}\end{CompactItemize}
