Show
Ignore:
Timestamp:
02/16/09 10:02:08 (16 years ago)
Author:
smidl
Message:

Changes in the very root classes!
* rv and rvc are no longer compulsory,
* samplecond does not return ll
* BM has drv

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • doc/latex/classbdm_1_1MixEF.tex

    r269 r270  
    33\label{classbdm_1_1MixEF}\index{bdm::MixEF@{bdm::MixEF}} 
    44} 
    5 Mixture of Exponential Family Densities.   
    6  
    7  
    85{\tt \#include $<$mixef.h$>$} 
    96 
     
    1512\end{center} 
    1613\end{figure} 
    17 Collaboration diagram for bdm::MixEF:\nopagebreak 
    18 \begin{figure}[H] 
    19 \begin{center} 
    20 \leavevmode 
    21 \includegraphics[height=400pt]{classbdm_1_1MixEF__coll__graph} 
    22 \end{center} 
    23 \end{figure} 
    24 \subsection*{Public Member Functions} 
     14 
     15 
     16\subsection{Detailed Description} 
     17Mixture of Exponential Family Densities.  
     18 
     19An approximate estimation method for models with latent discrete variable, such as mixture models of the following kind: \[ f(y_t|\psi_t, \Theta) = \sum_{i=1}^{n} w_i f(y_t|\psi_t, \theta_i) \] where $\psi$ is a known function of past outputs, $w=[w_1,\ldots,w_n]$ are component weights, and component parameters $\theta_i$ are assumed to be mutually independent. $\Theta$ is an aggregation af all component parameters and weights, i.e. $\Theta = [\theta_1,\ldots,\theta_n,w]$. 
     20 
     21The characteristic feature of this model is that if the exact values of the latent variable were known, estimation of the parameters can be handled by a single model. For example, for the case of mixture models, posterior density for each component parameters would be a BayesianModel from Exponential Family. 
     22 
     23This class uses EM-style type algorithms for estimation of its parameters. Under this simplification, the posterior density is a product of exponential family members, hence under EM-style approximate estimation this class itself belongs to the exponential family. 
     24 
     25TODO: Extend \hyperlink{classbdm_1_1BM}{BM} to use rvc. \subsection*{Public Member Functions} 
    2526\begin{CompactItemize} 
    2627\item  
     
    6061\item  
    6162\hypertarget{classbdm_1_1MixEF_33d0b3da1d10bf149d41ee74f6284a19}{ 
    62 const \hyperlink{classbdm_1_1epdf}{epdf} \& \hyperlink{classbdm_1_1MixEF_33d0b3da1d10bf149d41ee74f6284a19}{\_\-epdf} () const } 
     63const \hyperlink{classbdm_1_1epdf}{epdf} \& \textbf{\_\-epdf} () const } 
    6364\label{classbdm_1_1MixEF_33d0b3da1d10bf149d41ee74f6284a19} 
    6465 
    65 \begin{CompactList}\small\item\em Returns a reference to the \hyperlink{classbdm_1_1epdf}{epdf} representing posterior density on parameters. \item\end{CompactList}\item  
     66\item  
    6667\hypertarget{classbdm_1_1MixEF_ea8be6f0703d87b7c4c3e77fd07e28c8}{ 
    67 const \hyperlink{classbdm_1_1eprod}{eprod} $\ast$ \hyperlink{classbdm_1_1MixEF_ea8be6f0703d87b7c4c3e77fd07e28c8}{\_\-e} () const } 
     68const \hyperlink{classbdm_1_1eprod}{eprod} $\ast$ \textbf{\_\-e} () const } 
    6869\label{classbdm_1_1MixEF_ea8be6f0703d87b7c4c3e77fd07e28c8} 
    6970 
    70 \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  
    71 \hypertarget{classbdm_1_1MixEF_5105973c0f790f08d1dfb79c2a3f6e1c}{ 
    72 \hyperlink{classbdm_1_1emix}{emix} $\ast$ \hyperlink{classbdm_1_1MixEF_5105973c0f790f08d1dfb79c2a3f6e1c}{predictor} (const \hyperlink{classbdm_1_1RV}{RV} \&\hyperlink{classbdm_1_1BM_18d6db4af8ee42077741d9e3618153ca}{rv}) const } 
    73 \label{classbdm_1_1MixEF_5105973c0f790f08d1dfb79c2a3f6e1c} 
    74  
    75 \begin{CompactList}\small\item\em Constructs a predictive density (marginal density on data). \item\end{CompactList}\item  
     71\item  
     72\hypertarget{classbdm_1_1MixEF_edc50e9640f049b846084748b18469a2}{ 
     73\hyperlink{classbdm_1_1emix}{emix} $\ast$ \hyperlink{classbdm_1_1MixEF_edc50e9640f049b846084748b18469a2}{epredictor} () const } 
     74\label{classbdm_1_1MixEF_edc50e9640f049b846084748b18469a2} 
     75 
     76\begin{CompactList}\small\item\em Constructs a predictive density $ f(d_{t+1} |d_{t}, \ldots d_{0}) $. \item\end{CompactList}\item  
    7677\hypertarget{classbdm_1_1MixEF_f0dfb4375fef4e61c4cb062e5bac7c8c}{ 
    7778void \hyperlink{classbdm_1_1MixEF_f0dfb4375fef4e61c4cb062e5bac7c8c}{flatten} (const \hyperlink{classbdm_1_1BMEF}{BMEF} $\ast$M2)} 
     
    103104\label{classbdm_1_1BMEF_5912dbcf28ae711e30b08c2fa766a3e6} 
    104105 
    105 \begin{CompactList}\small\item\em Flatten the posterior as if to keep nu0 data. \item\end{CompactList}\item  
     106\begin{CompactList}\small\item\em Flatten the posterior as if to keep nu0 data. \item\end{CompactList}\end{CompactItemize} 
     107\begin{Indent}{\bf Constructors}\par 
     108\begin{CompactItemize} 
     109\item  
     110virtual \hyperlink{classbdm_1_1BM}{BM} $\ast$ \hyperlink{classbdm_1_1BM_c0f027ff91d8459937c6f60ff8e553ff}{\_\-copy\_\-} () 
     111\end{CompactItemize} 
     112\end{Indent} 
     113\begin{Indent}{\bf Mathematical operations}\par 
     114\begin{CompactItemize} 
     115\item  
    106116\hypertarget{classbdm_1_1BM_1dee3fddaf021e62d925289660a707dc}{ 
    107117virtual void \hyperlink{classbdm_1_1BM_1dee3fddaf021e62d925289660a707dc}{bayesB} (const mat \&Dt)} 
     
    114124 
    115125\begin{CompactList}\small\item\em Matrix version of logpred. \item\end{CompactList}\item  
    116 \hypertarget{classbdm_1_1BM_40a3c891996391e3135518053a917793}{ 
    117 const \hyperlink{classbdm_1_1RV}{RV} \& \hyperlink{classbdm_1_1BM_40a3c891996391e3135518053a917793}{\_\-rv} () const } 
    118 \label{classbdm_1_1BM_40a3c891996391e3135518053a917793} 
    119  
    120 \begin{CompactList}\small\item\em access function \item\end{CompactList}\item  
     126\hypertarget{classbdm_1_1BM_598b25e3f3d96a5bc00a5faeb5b3c912}{ 
     127virtual \hyperlink{classbdm_1_1mpdf}{mpdf} $\ast$ \hyperlink{classbdm_1_1BM_598b25e3f3d96a5bc00a5faeb5b3c912}{predictor} () const } 
     128\label{classbdm_1_1BM_598b25e3f3d96a5bc00a5faeb5b3c912} 
     129 
     130\begin{CompactList}\small\item\em Constructs a conditional density 1-step ahead predictor. \item\end{CompactList}\end{CompactItemize} 
     131\end{Indent} 
     132\begin{Indent}{\bf Access to attributes}\par 
     133\begin{CompactItemize} 
     134\item  
    121135\hypertarget{classbdm_1_1BM_ff2d8755ba0b3def927d31305c03b09c}{ 
    122 const \hyperlink{classbdm_1_1RV}{RV} \& \hyperlink{classbdm_1_1BM_ff2d8755ba0b3def927d31305c03b09c}{\_\-drv} () const } 
     136const \hyperlink{classbdm_1_1RV}{RV} \& \textbf{\_\-drv} () const } 
    123137\label{classbdm_1_1BM_ff2d8755ba0b3def927d31305c03b09c} 
    124138 
    125 \begin{CompactList}\small\item\em access function \item\end{CompactList}\item  
     139\item  
    126140\hypertarget{classbdm_1_1BM_f135ae6dce7e9f30c9f88229c7930b96}{ 
    127 void \hyperlink{classbdm_1_1BM_f135ae6dce7e9f30c9f88229c7930b96}{set\_\-drv} (const \hyperlink{classbdm_1_1RV}{RV} \&\hyperlink{classbdm_1_1BM_18d6db4af8ee42077741d9e3618153ca}{rv})} 
     141void \textbf{set\_\-drv} (const \hyperlink{classbdm_1_1RV}{RV} \&rv)} 
    128142\label{classbdm_1_1BM_f135ae6dce7e9f30c9f88229c7930b96} 
    129143 
    130 \begin{CompactList}\small\item\em set drv \item\end{CompactList}\item  
     144\item  
    131145\hypertarget{classbdm_1_1BM_5be65d37dedfe33a3671e7065f523a70}{ 
    132 double \hyperlink{classbdm_1_1BM_5be65d37dedfe33a3671e7065f523a70}{\_\-ll} () const } 
     146double \textbf{\_\-ll} () const } 
    133147\label{classbdm_1_1BM_5be65d37dedfe33a3671e7065f523a70} 
    134148 
    135 \begin{CompactList}\small\item\em access function \item\end{CompactList}\item  
     149\item  
    136150\hypertarget{classbdm_1_1BM_236b3abbcc93594fc97cd86d82c1a83f}{ 
    137 void \hyperlink{classbdm_1_1BM_236b3abbcc93594fc97cd86d82c1a83f}{set\_\-evalll} (bool evl0)} 
     151void \textbf{set\_\-evalll} (bool evl0)} 
    138152\label{classbdm_1_1BM_236b3abbcc93594fc97cd86d82c1a83f} 
    139153 
    140 \begin{CompactList}\small\item\em access function \item\end{CompactList}\end{CompactItemize} 
     154\end{CompactItemize} 
     155\end{Indent} 
    141156\subsection*{Protected Member Functions} 
    142157\begin{CompactItemize} 
     
    185200 
    186201\begin{CompactList}\small\item\em cached value of lognc() in the previous step (used in evaluation of {\tt ll} ) \item\end{CompactList}\item  
    187 \hypertarget{classbdm_1_1BM_18d6db4af8ee42077741d9e3618153ca}{ 
    188 \hyperlink{classbdm_1_1RV}{RV} \hyperlink{classbdm_1_1BM_18d6db4af8ee42077741d9e3618153ca}{rv}} 
    189 \label{classbdm_1_1BM_18d6db4af8ee42077741d9e3618153ca} 
    190  
    191 \begin{CompactList}\small\item\em Random variable of the posterior. \item\end{CompactList}\item  
    192202\hypertarget{classbdm_1_1BM_c400357e37d27a4834b2b1d9211009ed}{ 
    193203\hyperlink{classbdm_1_1RV}{RV} \hyperlink{classbdm_1_1BM_c400357e37d27a4834b2b1d9211009ed}{drv}} 
     
    206216\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} 
    207217 
    208  
    209 \subsection{Detailed Description} 
    210 Mixture of Exponential Family Densities.  
    211  
    212 An approximate estimation method for models with latent discrete variable, such as mixture models of the following kind: \[ f(y_t|\psi_t, \Theta) = \sum_{i=1}^{n} w_i f(y_t|\psi_t, \theta_i) \] where $\psi$ is a known function of past outputs, $w=[w_1,\ldots,w_n]$ are component weights, and component parameters $\theta_i$ are assumed to be mutually independent. $\Theta$ is an aggregation af all component parameters and weights, i.e. $\Theta = [\theta_1,\ldots,\theta_n,w]$. 
    213  
    214 The characteristic feature of this model is that if the exact values of the latent variable were known, estimation of the parameters can be handled by a single model. For example, for the case of mixture models, posterior density for each component parameters would be a BayesianModel from Exponential Family. 
    215  
    216 This class uses EM-style type algorithms for estimation of its parameters. Under this simplification, the posterior density is a product of exponential family members, hence under EM-style approximate estimation this class itself belongs to the exponential family. 
    217  
    218 TODO: Extend \hyperlink{classbdm_1_1BM}{BM} to use rvc.  
    219218 
    220219\subsection{Member Function Documentation} 
     
    248247References bdm::multiBM::\_\-epdf(), Coms, bdm::epdf::mean(), and weights. 
    249248 
    250 Referenced by bdm::merger::evallog(), and bdm::merger::merge(). 
     249Referenced by bdm::merger::evallog(), and bdm::merger::merge().\hypertarget{classbdm_1_1BM_c0f027ff91d8459937c6f60ff8e553ff}{ 
     250\index{bdm::MixEF@{bdm::MixEF}!\_\-copy\_\-@{\_\-copy\_\-}} 
     251\index{\_\-copy\_\-@{\_\-copy\_\-}!bdm::MixEF@{bdm::MixEF}} 
     252\subsubsection[\_\-copy\_\-]{\setlength{\rightskip}{0pt plus 5cm}virtual {\bf BM}$\ast$ bdm::BM::\_\-copy\_\- ()\hspace{0.3cm}{\tt  \mbox{[}inline, virtual, inherited\mbox{]}}}} 
     253\label{classbdm_1_1BM_c0f027ff91d8459937c6f60ff8e553ff} 
     254 
     255 
     256Copy function required in vectors, Arrays of \hyperlink{classbdm_1_1BM}{BM} etc. Have to be DELETED manually! Prototype:  
     257 
     258\begin{Code}\begin{verbatim} BM* _copy_(){return new BM(*this);}  
     259\end{verbatim} 
     260\end{Code} 
     261 
     262  
     263 
     264Reimplemented in \hyperlink{classbdm_1_1ARX_60c40b5c6abc4c7e464b4ccae64a5a61}{bdm::ARX}. 
    251265 
    252266The documentation for this class was generated from the following files:\begin{CompactItemize}