\hypertarget{classmultiBM}{
\section{multiBM Class Reference}
\label{classmultiBM}\index{multiBM@{multiBM}}
}
Estimator for Multinomial density.  


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

Inheritance diagram for multiBM:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=49pt]{classmultiBM__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for multiBM:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=69pt]{classmultiBM__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
\hypertarget{classmultiBM_7d7d7e78c129602bcde96078359dc6e5}{
\hyperlink{classmultiBM_7d7d7e78c129602bcde96078359dc6e5}{multiBM} (const \hyperlink{classRV}{RV} \&\hyperlink{classBM_af00f0612fabe66241dd507188cdbf88}{rv}, const vec beta0)}
\label{classmultiBM_7d7d7e78c129602bcde96078359dc6e5}

\begin{CompactList}\small\item\em Default constructor. \item\end{CompactList}\item 
\hypertarget{classmultiBM_b92751adbfb9f259ca8c95232cfd9c09}{
\hyperlink{classmultiBM_b92751adbfb9f259ca8c95232cfd9c09}{multiBM} (const \hyperlink{classmultiBM}{multiBM} \&B)}
\label{classmultiBM_b92751adbfb9f259ca8c95232cfd9c09}

\begin{CompactList}\small\item\em Copy constructor. \item\end{CompactList}\item 
\hypertarget{classmultiBM_42e36804041e551d3ceea6c75abc0562}{
void \textbf{set\_\-statistics} (const \hyperlink{classBM}{BM} $\ast$mB0)}
\label{classmultiBM_42e36804041e551d3ceea6c75abc0562}

\item 
void \hyperlink{classmultiBM_11eeba7e97954e316e959116f90d80e2}{bayes} (const vec \&dt)
\begin{CompactList}\small\item\em Incremental Bayes rule. \item\end{CompactList}\item 
double \hyperlink{classmultiBM_13e26a61757278981fd8cac9a7ef91eb}{logpred} (const vec \&dt) const 
\item 
\hypertarget{classmultiBM_58257073a90aab5d1aafbc9b805d324a}{
void \hyperlink{classmultiBM_58257073a90aab5d1aafbc9b805d324a}{flatten} (\hyperlink{classBMEF}{BMEF} $\ast$B)}
\label{classmultiBM_58257073a90aab5d1aafbc9b805d324a}

\begin{CompactList}\small\item\em Flatten the posterior. \item\end{CompactList}\item 
\hypertarget{classmultiBM_66cdfd83a70bc281840ab0646b941684}{
const \hyperlink{classepdf}{epdf} \& \hyperlink{classmultiBM_66cdfd83a70bc281840ab0646b941684}{\_\-epdf} () const }
\label{classmultiBM_66cdfd83a70bc281840ab0646b941684}

\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 
\hypertarget{classBMEF_30bb40eb1fd31869b2e62e79e1ecdcb4}{
virtual void \hyperlink{classBMEF_30bb40eb1fd31869b2e62e79e1ecdcb4}{set\_\-statistics} (const \hyperlink{classBMEF}{BMEF} $\ast$BM0)}
\label{classBMEF_30bb40eb1fd31869b2e62e79e1ecdcb4}

\begin{CompactList}\small\item\em get statistics from another model \item\end{CompactList}\item 
\hypertarget{classBMEF_8f4ecb6e2eaf630155a1fa98f35aa6ad}{
virtual void \hyperlink{classBMEF_8f4ecb6e2eaf630155a1fa98f35aa6ad}{bayes} (const vec \&data, const double w)}
\label{classBMEF_8f4ecb6e2eaf630155a1fa98f35aa6ad}

\begin{CompactList}\small\item\em Weighted update of sufficient statistics (Bayes rule). \item\end{CompactList}\item 
\hypertarget{classBM_0186270f75189677f390fe088a9947e9}{
virtual void \hyperlink{classBM_0186270f75189677f390fe088a9947e9}{bayesB} (const mat \&Dt)}
\label{classBM_0186270f75189677f390fe088a9947e9}

\begin{CompactList}\small\item\em Batch Bayes rule (columns of Dt are observations). \item\end{CompactList}\item 
\hypertarget{classBM_126bd2595c48e311fc2a7ab72876092a}{
const \hyperlink{classRV}{RV} \& \hyperlink{classBM_126bd2595c48e311fc2a7ab72876092a}{\_\-rv} () const }
\label{classBM_126bd2595c48e311fc2a7ab72876092a}

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

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

\begin{CompactList}\small\item\em access function \item\end{CompactList}\item 
virtual \hyperlink{classBM}{BM} $\ast$ \hyperlink{classBM_eb58c81d6a7b75b05fc6f276eed78887}{\_\-copy\_\-} (bool changerv=false)
\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
\hypertarget{classmultiBM_eddee08a724170de63f36e40c57b27b5}{
\hyperlink{classeDirich}{eDirich} \hyperlink{classmultiBM_eddee08a724170de63f36e40c57b27b5}{est}}
\label{classmultiBM_eddee08a724170de63f36e40c57b27b5}

\begin{CompactList}\small\item\em Conjugate prior and posterior. \item\end{CompactList}\item 
\hypertarget{classmultiBM_7b606116aed7e8834a339cbb0424b1d6}{
vec \& \textbf{beta}}
\label{classmultiBM_7b606116aed7e8834a339cbb0424b1d6}

\item 
\hypertarget{classBMEF_538d632e59f9afa8daa1de74da12ce71}{
double \hyperlink{classBMEF_538d632e59f9afa8daa1de74da12ce71}{frg}}
\label{classBMEF_538d632e59f9afa8daa1de74da12ce71}

\begin{CompactList}\small\item\em forgetting factor \item\end{CompactList}\item 
\hypertarget{classBMEF_308cf5d4133cd471fdf1ecd5dfa09d02}{
double \hyperlink{classBMEF_308cf5d4133cd471fdf1ecd5dfa09d02}{last\_\-lognc}}
\label{classBMEF_308cf5d4133cd471fdf1ecd5dfa09d02}

\begin{CompactList}\small\item\em cached value of lognc() in the previous step (used in evaluation of {\tt ll} ) \item\end{CompactList}\item 
\hypertarget{classBM_af00f0612fabe66241dd507188cdbf88}{
\hyperlink{classRV}{RV} \hyperlink{classBM_af00f0612fabe66241dd507188cdbf88}{rv}}
\label{classBM_af00f0612fabe66241dd507188cdbf88}

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

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

\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{Detailed Description}
Estimator for Multinomial density. 

\subsection{Member Function Documentation}
\hypertarget{classmultiBM_11eeba7e97954e316e959116f90d80e2}{
\index{multiBM@{multiBM}!bayes@{bayes}}
\index{bayes@{bayes}!multiBM@{multiBM}}
\subsubsection[bayes]{\setlength{\rightskip}{0pt plus 5cm}void multiBM::bayes (const vec \& {\em dt})\hspace{0.3cm}{\tt  \mbox{[}inline, virtual\mbox{]}}}}
\label{classmultiBM_11eeba7e97954e316e959116f90d80e2}


Incremental Bayes rule. 

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


Reimplemented from \hyperlink{classBMEF_52b7719312d545215cca1ff87722a35a}{BMEF}.

References est, BM::evalll, BMEF::frg, BMEF::last\_\-lognc, BM::ll, and eDirich::lognc().

Referenced by MixEF::bayes().\hypertarget{classmultiBM_13e26a61757278981fd8cac9a7ef91eb}{
\index{multiBM@{multiBM}!logpred@{logpred}}
\index{logpred@{logpred}!multiBM@{multiBM}}
\subsubsection[logpred]{\setlength{\rightskip}{0pt plus 5cm}double multiBM::logpred (const vec \& {\em dt}) const\hspace{0.3cm}{\tt  \mbox{[}inline, virtual\mbox{]}}}}
\label{classmultiBM_13e26a61757278981fd8cac9a7ef91eb}


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

Reimplemented from \hyperlink{classBM_8a8ce6df431689964c41cc6c849cfd06}{BM}.

References eDirich::\_\-beta(), est, BM::evalll, BMEF::frg, BMEF::last\_\-lognc, and eDirich::lognc().

Referenced by MixEF::bayes().\hypertarget{classBM_eb58c81d6a7b75b05fc6f276eed78887}{
\index{multiBM@{multiBM}!\_\-copy\_\-@{\_\-copy\_\-}}
\index{\_\-copy\_\-@{\_\-copy\_\-}!multiBM@{multiBM}}
\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{]}}}}
\label{classBM_eb58c81d6a7b75b05fc6f276eed78887}


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

Reimplemented in \hyperlink{classARX_d2751057811c6fb8f4ff86e1648bcddc}{ARX}.

Referenced by MixEF::MixEF().

The documentation for this class was generated from the following file:\begin{CompactItemize}
\item 
work/git/mixpp/bdm/stat/\hyperlink{libEF_8h}{libEF.h}\end{CompactItemize}
