root/doc/latex/classMixEF.tex @ 172

Revision 172, 9.5 kB (checked in by smidl, 16 years ago)

Latex doc

Line 
1\hypertarget{classMixEF}{
2\section{MixEF Class Reference}
3\label{classMixEF}\index{MixEF@{MixEF}}
4}
5Mixture of Exponential Family Densities. 
6
7
8{\tt \#include $<$mixef.h$>$}
9
10Inheritance diagram for MixEF:\nopagebreak
11\begin{figure}[H]
12\begin{center}
13\leavevmode
14\includegraphics[width=43pt]{classMixEF__inherit__graph}
15\end{center}
16\end{figure}
17Collaboration diagram for MixEF:\nopagebreak
18\begin{figure}[H]
19\begin{center}
20\leavevmode
21\includegraphics[height=400pt]{classMixEF__coll__graph}
22\end{center}
23\end{figure}
24\subsection*{Public Member Functions}
25\begin{CompactItemize}
26\item 
27\hypertarget{classMixEF_7713c2f01e97df268049821749405bc2}{
28\hyperlink{classMixEF_7713c2f01e97df268049821749405bc2}{MixEF} (Array$<$ \hyperlink{classBMEF}{BMEF} $\ast$ $>$ \&Coms0, const vec \&alpha0)}
29\label{classMixEF_7713c2f01e97df268049821749405bc2}
30
31\begin{CompactList}\small\item\em Full constructor. \item\end{CompactList}\item 
32\hyperlink{classMixEF_8be6cf2d9bb0d86e01e9470720515ae6}{MixEF} (\hyperlink{classBMEF}{BMEF} $\ast$Com0, const mat \&Data, int c=5)
33\item 
34\hypertarget{classMixEF_d520fb534aa43f3084ff1568ffe7573d}{
35void \hyperlink{classMixEF_d520fb534aa43f3084ff1568ffe7573d}{bayes} (const vec \&dt)}
36\label{classMixEF_d520fb534aa43f3084ff1568ffe7573d}
37
38\begin{CompactList}\small\item\em Recursive EM-like algorithm (QB-variant), see Karny et. al, 2006. \item\end{CompactList}\item 
39\hypertarget{classMixEF_4e0ad97868e55facffb37932dd44353f}{
40void \hyperlink{classMixEF_4e0ad97868e55facffb37932dd44353f}{bayes} (const mat \&dt)}
41\label{classMixEF_4e0ad97868e55facffb37932dd44353f}
42
43\begin{CompactList}\small\item\em EM algorithm. \item\end{CompactList}\item 
44\hypertarget{classMixEF_e6810daa121ccaff1ac18f26fbad4563}{
45void \hyperlink{classMixEF_e6810daa121ccaff1ac18f26fbad4563}{bayesB} (const mat \&dt)}
46\label{classMixEF_e6810daa121ccaff1ac18f26fbad4563}
47
48\begin{CompactList}\small\item\em Batch Bayes rule (columns of Dt are observations). \item\end{CompactList}\item 
49double \hyperlink{classMixEF_424ca64f36d4e41de7a7e7ae921d35ea}{logpred} (const vec \&dt) const
50\item 
51\hypertarget{classMixEF_efb3e20c2151d91c4fc080b7722a2069}{
52const \hyperlink{classepdf}{epdf} \& \hyperlink{classMixEF_efb3e20c2151d91c4fc080b7722a2069}{\_\-epdf} () const }
53\label{classMixEF_efb3e20c2151d91c4fc080b7722a2069}
54
55\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 
56\hypertarget{classBM_126bd2595c48e311fc2a7ab72876092a}{
57const \hyperlink{classRV}{RV} \& \hyperlink{classBM_126bd2595c48e311fc2a7ab72876092a}{\_\-rv} () const }
58\label{classBM_126bd2595c48e311fc2a7ab72876092a}
59
60\begin{CompactList}\small\item\em access function \item\end{CompactList}\item 
61\hypertarget{classBM_87f4a547d2c29180be88175e5eab9c88}{
62double \hyperlink{classBM_87f4a547d2c29180be88175e5eab9c88}{\_\-ll} () const }
63\label{classBM_87f4a547d2c29180be88175e5eab9c88}
64
65\begin{CompactList}\small\item\em access function \item\end{CompactList}\item 
66\hypertarget{classBM_1ffa9f23669aabecc3760c06c6987522}{
67void \hyperlink{classBM_1ffa9f23669aabecc3760c06c6987522}{set\_\-evalll} (bool evl0)}
68\label{classBM_1ffa9f23669aabecc3760c06c6987522}
69
70\begin{CompactList}\small\item\em access function \item\end{CompactList}\item 
71virtual \hyperlink{classBM}{BM} $\ast$ \hyperlink{classBM_eb58c81d6a7b75b05fc6f276eed78887}{\_\-copy\_\-} (bool changerv=false)
72\end{CompactItemize}
73\subsection*{Protected Member Functions}
74\begin{CompactItemize}
75\item 
76\hypertarget{classMixEF_5ae381b3a7dfbe2c1e5bb579a5d9b9d1}{
77void \hyperlink{classMixEF_5ae381b3a7dfbe2c1e5bb579a5d9b9d1}{build\_\-est} ()}
78\label{classMixEF_5ae381b3a7dfbe2c1e5bb579a5d9b9d1}
79
80\begin{CompactList}\small\item\em Auxiliary function for use in constructors. \item\end{CompactList}\end{CompactItemize}
81\subsection*{Protected Attributes}
82\begin{CompactItemize}
83\item 
84\hypertarget{classMixEF_e9cc9bb3e6da801455cec99a59aea149}{
85int \hyperlink{classMixEF_e9cc9bb3e6da801455cec99a59aea149}{n}}
86\label{classMixEF_e9cc9bb3e6da801455cec99a59aea149}
87
88\begin{CompactList}\small\item\em Number of components. \item\end{CompactList}\item 
89\hypertarget{classMixEF_4c4a140ca4e6e71b00237b7bc754302e}{
90Array$<$ \hyperlink{classBMEF}{BMEF} $\ast$ $>$ \hyperlink{classMixEF_4c4a140ca4e6e71b00237b7bc754302e}{Coms}}
91\label{classMixEF_4c4a140ca4e6e71b00237b7bc754302e}
92
93\begin{CompactList}\small\item\em Models for Components of $\theta_i$. \item\end{CompactList}\item 
94\hypertarget{classMixEF_d906782a0a9558f19150dc69411f717f}{
95\hyperlink{classmultiBM}{multiBM} \hyperlink{classMixEF_d906782a0a9558f19150dc69411f717f}{weights}}
96\label{classMixEF_d906782a0a9558f19150dc69411f717f}
97
98\begin{CompactList}\small\item\em Statistics for weights. \item\end{CompactList}\item 
99\hypertarget{classMixEF_33968f1325137cc6f4431f0cf05096dc}{
100\hyperlink{classeprod}{eprod} $\ast$ \hyperlink{classMixEF_33968f1325137cc6f4431f0cf05096dc}{est}}
101\label{classMixEF_33968f1325137cc6f4431f0cf05096dc}
102
103\begin{CompactList}\small\item\em Posterior on component parameters. \item\end{CompactList}\item 
104\hypertarget{classBM_af00f0612fabe66241dd507188cdbf88}{
105\hyperlink{classRV}{RV} \hyperlink{classBM_af00f0612fabe66241dd507188cdbf88}{rv}}
106\label{classBM_af00f0612fabe66241dd507188cdbf88}
107
108\begin{CompactList}\small\item\em Random variable of the posterior. \item\end{CompactList}\item 
109\hypertarget{classBM_5623fef6572a08c2b53b8c87b82dc979}{
110double \hyperlink{classBM_5623fef6572a08c2b53b8c87b82dc979}{ll}}
111\label{classBM_5623fef6572a08c2b53b8c87b82dc979}
112
113\begin{CompactList}\small\item\em Logarithm of marginalized data likelihood. \item\end{CompactList}\item 
114\hypertarget{classBM_bf6fb59b30141074f8ee1e2f43d03129}{
115bool \hyperlink{classBM_bf6fb59b30141074f8ee1e2f43d03129}{evalll}}
116\label{classBM_bf6fb59b30141074f8ee1e2f43d03129}
117
118\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}
119
120
121\subsection{Detailed Description}
122Mixture of Exponential Family Densities.
123
124An 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]$.
125
126The 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.
127
128This 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 approximate estimation project this class itself belongs to the exponential family.
129
130TODO: Extend \hyperlink{classBM}{BM} to use rvc.
131
132\subsection{Constructor \& Destructor Documentation}
133\hypertarget{classMixEF_8be6cf2d9bb0d86e01e9470720515ae6}{
134\index{MixEF@{MixEF}!MixEF@{MixEF}}
135\index{MixEF@{MixEF}!MixEF@{MixEF}}
136\subsubsection[MixEF]{\setlength{\rightskip}{0pt plus 5cm}MixEF::MixEF ({\bf BMEF} $\ast$ {\em Com0}, \/  const mat \& {\em Data}, \/  int {\em c} = {\tt 5})}}
137\label{classMixEF_8be6cf2d9bb0d86e01e9470720515ae6}
138
139
140Constructor Initializing the mixture by a random pick of centroids from data \begin{Desc}
141\item[Parameters:]
142\begin{description}
143\item[{\em Com0}]Initial component - necessary to determine its type. \item[{\em Data}]Data on which the initialization will be done \item[{\em c}]Initial number of components, default=5 \end{description}
144\end{Desc}
145
146
147References BM::\_\-copy\_\-(), build\_\-est(), Coms, and n.
148
149\subsection{Member Function Documentation}
150\hypertarget{classMixEF_424ca64f36d4e41de7a7e7ae921d35ea}{
151\index{MixEF@{MixEF}!logpred@{logpred}}
152\index{logpred@{logpred}!MixEF@{MixEF}}
153\subsubsection[logpred]{\setlength{\rightskip}{0pt plus 5cm}double MixEF::logpred (const vec \& {\em dt}) const\hspace{0.3cm}{\tt  \mbox{[}virtual\mbox{]}}}}
154\label{classMixEF_424ca64f36d4e41de7a7e7ae921d35ea}
155
156
157Evaluates predictive log-likelihood of the given data record I.e. marginal likelihood of the data with the posterior integrated out.
158
159Reimplemented from \hyperlink{classBM_8a8ce6df431689964c41cc6c849cfd06}{BM}.
160
161References multiBM::\_\-epdf(), Coms, epdf::mean(), n, and weights.\hypertarget{classBM_eb58c81d6a7b75b05fc6f276eed78887}{
162\index{MixEF@{MixEF}!\_\-copy\_\-@{\_\-copy\_\-}}
163\index{\_\-copy\_\-@{\_\-copy\_\-}!MixEF@{MixEF}}
164\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{]}}}}
165\label{classBM_eb58c81d6a7b75b05fc6f276eed78887}
166
167
168Copy 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; \} 
169
170Reimplemented in \hyperlink{classARX_d2751057811c6fb8f4ff86e1648bcddc}{ARX}.
171
172Referenced by MixEF().
173
174The documentation for this class was generated from the following files:\begin{CompactItemize}
175\item 
176work/git/mixpp/bdm/estim/\hyperlink{mixef_8h}{mixef.h}\item 
177work/git/mixpp/bdm/estim/mixef.cpp\end{CompactItemize}
Note: See TracBrowser for help on using the browser.