Changeset 270 for doc/latex/classbdm_1_1MixEF.tex
- Timestamp:
- 02/16/09 10:02:08 (16 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
doc/latex/classbdm_1_1MixEF.tex
r269 r270 3 3 \label{classbdm_1_1MixEF}\index{bdm::MixEF@{bdm::MixEF}} 4 4 } 5 Mixture of Exponential Family Densities.6 7 8 5 {\tt \#include $<$mixef.h$>$} 9 6 … … 15 12 \end{center} 16 13 \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} 17 Mixture of Exponential Family Densities. 18 19 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]$. 20 21 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. 22 23 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. 24 25 TODO: Extend \hyperlink{classbdm_1_1BM}{BM} to use rvc. \subsection*{Public Member Functions} 25 26 \begin{CompactItemize} 26 27 \item … … 60 61 \item 61 62 \hypertarget{classbdm_1_1MixEF_33d0b3da1d10bf149d41ee74f6284a19}{ 62 const \hyperlink{classbdm_1_1epdf}{epdf} \& \ hyperlink{classbdm_1_1MixEF_33d0b3da1d10bf149d41ee74f6284a19}{\_\-epdf} () const }63 const \hyperlink{classbdm_1_1epdf}{epdf} \& \textbf{\_\-epdf} () const } 63 64 \label{classbdm_1_1MixEF_33d0b3da1d10bf149d41ee74f6284a19} 64 65 65 \ begin{CompactList}\small\item\em Returns a reference to the \hyperlink{classbdm_1_1epdf}{epdf} representing posterior density on parameters. \item\end{CompactList}\item66 \item 66 67 \hypertarget{classbdm_1_1MixEF_ea8be6f0703d87b7c4c3e77fd07e28c8}{ 67 const \hyperlink{classbdm_1_1eprod}{eprod} $\ast$ \ hyperlink{classbdm_1_1MixEF_ea8be6f0703d87b7c4c3e77fd07e28c8}{\_\-e} () const }68 const \hyperlink{classbdm_1_1eprod}{eprod} $\ast$ \textbf{\_\-e} () const } 68 69 \label{classbdm_1_1MixEF_ea8be6f0703d87b7c4c3e77fd07e28c8} 69 70 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}\item71 \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}\item71 \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 76 77 \hypertarget{classbdm_1_1MixEF_f0dfb4375fef4e61c4cb062e5bac7c8c}{ 77 78 void \hyperlink{classbdm_1_1MixEF_f0dfb4375fef4e61c4cb062e5bac7c8c}{flatten} (const \hyperlink{classbdm_1_1BMEF}{BMEF} $\ast$M2)} … … 103 104 \label{classbdm_1_1BMEF_5912dbcf28ae711e30b08c2fa766a3e6} 104 105 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 110 virtual \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 106 116 \hypertarget{classbdm_1_1BM_1dee3fddaf021e62d925289660a707dc}{ 107 117 virtual void \hyperlink{classbdm_1_1BM_1dee3fddaf021e62d925289660a707dc}{bayesB} (const mat \&Dt)} … … 114 124 115 125 \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}{ 127 virtual \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 121 135 \hypertarget{classbdm_1_1BM_ff2d8755ba0b3def927d31305c03b09c}{ 122 const \hyperlink{classbdm_1_1RV}{RV} \& \ hyperlink{classbdm_1_1BM_ff2d8755ba0b3def927d31305c03b09c}{\_\-drv} () const }136 const \hyperlink{classbdm_1_1RV}{RV} \& \textbf{\_\-drv} () const } 123 137 \label{classbdm_1_1BM_ff2d8755ba0b3def927d31305c03b09c} 124 138 125 \ begin{CompactList}\small\item\em access function \item\end{CompactList}\item139 \item 126 140 \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})}141 void \textbf{set\_\-drv} (const \hyperlink{classbdm_1_1RV}{RV} \&rv)} 128 142 \label{classbdm_1_1BM_f135ae6dce7e9f30c9f88229c7930b96} 129 143 130 \ begin{CompactList}\small\item\em set drv \item\end{CompactList}\item144 \item 131 145 \hypertarget{classbdm_1_1BM_5be65d37dedfe33a3671e7065f523a70}{ 132 double \ hyperlink{classbdm_1_1BM_5be65d37dedfe33a3671e7065f523a70}{\_\-ll} () const }146 double \textbf{\_\-ll} () const } 133 147 \label{classbdm_1_1BM_5be65d37dedfe33a3671e7065f523a70} 134 148 135 \ begin{CompactList}\small\item\em access function \item\end{CompactList}\item149 \item 136 150 \hypertarget{classbdm_1_1BM_236b3abbcc93594fc97cd86d82c1a83f}{ 137 void \ hyperlink{classbdm_1_1BM_236b3abbcc93594fc97cd86d82c1a83f}{set\_\-evalll} (bool evl0)}151 void \textbf{set\_\-evalll} (bool evl0)} 138 152 \label{classbdm_1_1BM_236b3abbcc93594fc97cd86d82c1a83f} 139 153 140 \begin{CompactList}\small\item\em access function \item\end{CompactList}\end{CompactItemize} 154 \end{CompactItemize} 155 \end{Indent} 141 156 \subsection*{Protected Member Functions} 142 157 \begin{CompactItemize} … … 185 200 186 201 \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}\item192 202 \hypertarget{classbdm_1_1BM_c400357e37d27a4834b2b1d9211009ed}{ 193 203 \hyperlink{classbdm_1_1RV}{RV} \hyperlink{classbdm_1_1BM_c400357e37d27a4834b2b1d9211009ed}{drv}} … … 206 216 \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} 207 217 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.219 218 220 219 \subsection{Member Function Documentation} … … 248 247 References bdm::multiBM::\_\-epdf(), Coms, bdm::epdf::mean(), and weights. 249 248 250 Referenced by bdm::merger::evallog(), and bdm::merger::merge(). 249 Referenced 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 256 Copy 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 264 Reimplemented in \hyperlink{classbdm_1_1ARX_60c40b5c6abc4c7e464b4ccae64a5a61}{bdm::ARX}. 251 265 252 266 The documentation for this class was generated from the following files:\begin{CompactItemize}