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


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

Inheritance diagram for bdm::multiBM:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=64pt]{classbdm_1_1multiBM__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for bdm::multiBM:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=400pt]{classbdm_1_1multiBM__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
\hypertarget{classbdm_1_1multiBM_65dc7567b67ce86a8f339dd496ed8e88}{
\hyperlink{classbdm_1_1multiBM_65dc7567b67ce86a8f339dd496ed8e88}{multiBM} (const \hyperlink{classbdm_1_1RV}{RV} \&\hyperlink{classbdm_1_1BM_18d6db4af8ee42077741d9e3618153ca}{rv}, const vec beta0)}
\label{classbdm_1_1multiBM_65dc7567b67ce86a8f339dd496ed8e88}

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

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

\begin{CompactList}\small\item\em Sets sufficient statistics to match that of givefrom mB0. \item\end{CompactList}\item 
void \hyperlink{classbdm_1_1multiBM_1e4bf41b61937fd80f34049742e23f95}{bayes} (const vec \&dt)
\begin{CompactList}\small\item\em Incremental Bayes rule. \item\end{CompactList}\item 
double \hyperlink{classbdm_1_1multiBM_e157b607c1e3fa91d42aeea44458e2bf}{logpred} (const vec \&dt) const 
\item 
\hypertarget{classbdm_1_1multiBM_aaeb18c989088feb8d26d300e4971732}{
void \hyperlink{classbdm_1_1multiBM_aaeb18c989088feb8d26d300e4971732}{flatten} (const \hyperlink{classbdm_1_1BMEF}{BMEF} $\ast$B)}
\label{classbdm_1_1multiBM_aaeb18c989088feb8d26d300e4971732}

\begin{CompactList}\small\item\em Flatten the posterior according to the given \hyperlink{classbdm_1_1BMEF}{BMEF} (of the same type!). \item\end{CompactList}\item 
\hypertarget{classbdm_1_1multiBM_98c22316ecfef589989baca261713c8d}{
const \hyperlink{classbdm_1_1epdf}{epdf} \& \hyperlink{classbdm_1_1multiBM_98c22316ecfef589989baca261713c8d}{\_\-epdf} () const }
\label{classbdm_1_1multiBM_98c22316ecfef589989baca261713c8d}

\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_1multiBM_c996f6b9ca930182030e1027318f1ca6}{
const \hyperlink{classbdm_1_1eDirich}{eDirich} $\ast$ \hyperlink{classbdm_1_1multiBM_c996f6b9ca930182030e1027318f1ca6}{\_\-e} () const }
\label{classbdm_1_1multiBM_c996f6b9ca930182030e1027318f1ca6}

\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_1multiBM_7a480eace4446661bacca94c57499f01}{
void \textbf{set\_\-parameters} (const vec \&beta0)}
\label{classbdm_1_1multiBM_7a480eace4446661bacca94c57499f01}

\item 
\hypertarget{classbdm_1_1BMEF_d2b528b7a41ca67163152142f5404051}{
virtual void \hyperlink{classbdm_1_1BMEF_d2b528b7a41ca67163152142f5404051}{set\_\-statistics} (const \hyperlink{classbdm_1_1BMEF}{BMEF} $\ast$BM0)}
\label{classbdm_1_1BMEF_d2b528b7a41ca67163152142f5404051}

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

\begin{CompactList}\small\item\em Weighted update of sufficient statistics (Bayes rule). \item\end{CompactList}\item 
\hypertarget{classbdm_1_1BMEF_5912dbcf28ae711e30b08c2fa766a3e6}{
\hyperlink{classbdm_1_1BMEF}{BMEF} $\ast$ \hyperlink{classbdm_1_1BMEF_5912dbcf28ae711e30b08c2fa766a3e6}{\_\-copy\_\-} (bool changerv=false)}
\label{classbdm_1_1BMEF_5912dbcf28ae711e30b08c2fa766a3e6}

\begin{CompactList}\small\item\em Flatten the posterior as if to keep nu0 data. \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 
\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}\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
\hypertarget{classbdm_1_1multiBM_9ecc6878abbd20eb8d8e43b6ab3f941a}{
\hyperlink{classbdm_1_1eDirich}{eDirich} \hyperlink{classbdm_1_1multiBM_9ecc6878abbd20eb8d8e43b6ab3f941a}{est}}
\label{classbdm_1_1multiBM_9ecc6878abbd20eb8d8e43b6ab3f941a}

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

\begin{CompactList}\small\item\em Pointer inside est to sufficient statistics. \item\end{CompactList}\item 
\hypertarget{classbdm_1_1BMEF_1331865e10fb1ccef65bb4c47fa3be64}{
double \hyperlink{classbdm_1_1BMEF_1331865e10fb1ccef65bb4c47fa3be64}{frg}}
\label{classbdm_1_1BMEF_1331865e10fb1ccef65bb4c47fa3be64}

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

\begin{CompactList}\small\item\em cached value of lognc() in the previous step (used in evaluation of {\tt ll} ) \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{Detailed Description}
Estimator for Multinomial density. 

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


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_1BMEF_c287f4c0c1ea31b91572ec45351838f1}{bdm::BMEF}.

References beta, est, bdm::BM::evalll, bdm::BMEF::frg, bdm::BMEF::last\_\-lognc, bdm::BM::ll, and bdm::eDirich::lognc().\hypertarget{classbdm_1_1multiBM_e157b607c1e3fa91d42aeea44458e2bf}{
\index{bdm::multiBM@{bdm::multiBM}!logpred@{logpred}}
\index{logpred@{logpred}!bdm::multiBM@{bdm::multiBM}}
\subsubsection[logpred]{\setlength{\rightskip}{0pt plus 5cm}double bdm::multiBM::logpred (const vec \& {\em dt}) const\hspace{0.3cm}{\tt  \mbox{[}inline, virtual\mbox{]}}}}
\label{classbdm_1_1multiBM_e157b607c1e3fa91d42aeea44458e2bf}


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

Reimplemented from \hyperlink{classbdm_1_1BM_50257e0c1e5b5c73153ea6e716ad8ae0}{bdm::BM}.

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

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