root/doc/latex/classmerger.tex @ 219

Revision 219, 12.1 kB (checked in by smidl, 16 years ago)

doc

Line 
1\hypertarget{classmerger}{
2\section{merger Class Reference}
3\label{classmerger}\index{merger@{merger}}
4}
5Function for general combination of pdfs. 
6
7
8{\tt \#include $<$merger.h$>$}
9
10Inheritance diagram for merger:\nopagebreak
11\begin{figure}[H]
12\begin{center}
13\leavevmode
14\includegraphics[width=89pt]{classmerger__inherit__graph}
15\end{center}
16\end{figure}
17Collaboration diagram for merger:\nopagebreak
18\begin{figure}[H]
19\begin{center}
20\leavevmode
21\includegraphics[height=400pt]{classmerger__coll__graph}
22\end{center}
23\end{figure}
24\subsection*{Public Member Functions}
25\begin{CompactItemize}
26\item 
27\hypertarget{classmerger_3f9a955329eab65026e8322e9027d469}{
28\hyperlink{classmerger_3f9a955329eab65026e8322e9027d469}{merger} (const Array$<$ \hyperlink{classmpdf}{mpdf} $\ast$ $>$ \&S)}
29\label{classmerger_3f9a955329eab65026e8322e9027d469}
30
31\begin{CompactList}\small\item\em Default constructor. \item\end{CompactList}\item 
32\hypertarget{classmerger_79420e251308df4502c834171d518ad9}{
33void \hyperlink{classmerger_79420e251308df4502c834171d518ad9}{set\_\-parameters} (double beta0, int Ns0, int Nc0)}
34\label{classmerger_79420e251308df4502c834171d518ad9}
35
36\begin{CompactList}\small\item\em Set internal parameters used in approximation. \item\end{CompactList}\item 
37\hypertarget{classmerger_02d2a445e44a87f37ee3a2b9b40cffd1}{
38void \hyperlink{classmerger_02d2a445e44a87f37ee3a2b9b40cffd1}{init} ()}
39\label{classmerger_02d2a445e44a87f37ee3a2b9b40cffd1}
40
41\begin{CompactList}\small\item\em Initialize the proposal density. This function must be called before \hyperlink{classmerger_bc23accc77ec766bce7202934e2c180c}{merge()}! \item\end{CompactList}\item 
42\hypertarget{classmerger_e56ad4a2bc9be2ddfc051626adf27715}{
43void \hyperlink{classmerger_e56ad4a2bc9be2ddfc051626adf27715}{merge} (const \hyperlink{classepdf}{epdf} $\ast$g0)}
44\label{classmerger_e56ad4a2bc9be2ddfc051626adf27715}
45
46\begin{CompactList}\small\item\em Create a mixture density using known proposal. \item\end{CompactList}\item 
47\hypertarget{classmerger_bc23accc77ec766bce7202934e2c180c}{
48void \hyperlink{classmerger_bc23accc77ec766bce7202934e2c180c}{merge} ()}
49\label{classmerger_bc23accc77ec766bce7202934e2c180c}
50
51\begin{CompactList}\small\item\em Create a mixture density, make sure to call \hyperlink{classmerger_02d2a445e44a87f37ee3a2b9b40cffd1}{init()} before the first call. \item\end{CompactList}\item 
52\hypertarget{classmerger_217c65f335c603033fa09a2ecc64bc05}{
53vec \hyperlink{classmerger_217c65f335c603033fa09a2ecc64bc05}{lognorm\_\-merge} (mat \&lW)}
54\label{classmerger_217c65f335c603033fa09a2ecc64bc05}
55
56\begin{CompactList}\small\item\em Merge log-likelihood values. \item\end{CompactList}\item 
57vec \hyperlink{classmerger_379198c3d2063bfa63f5d1245a2511ba}{sample} () const
58\item 
59\hypertarget{classmerger_632cd7e0bcd149c0dc85042063364f6b}{
60double \hyperlink{classmerger_632cd7e0bcd149c0dc85042063364f6b}{evallog} (const vec \&dt) const }
61\label{classmerger_632cd7e0bcd149c0dc85042063364f6b}
62
63\begin{CompactList}\small\item\em Compute log-probability of argument {\tt val}. \item\end{CompactList}\item 
64\hypertarget{classmerger_3a46999cd77047d5d4ac6c1cb735a83e}{
65vec \hyperlink{classmerger_3a46999cd77047d5d4ac6c1cb735a83e}{mean} () const }
66\label{classmerger_3a46999cd77047d5d4ac6c1cb735a83e}
67
68\begin{CompactList}\small\item\em return expected value \item\end{CompactList}\item 
69\hypertarget{classmerger_b4aaca5b70165272f5093206faee9ce7}{
70mat \textbf{variance} () const }
71\label{classmerger_b4aaca5b70165272f5093206faee9ce7}
72
73\item 
74\hypertarget{classmerger_51e425ee1dd46d73353526e6a1c24ca3}{
75virtual \hyperlink{classmerger_51e425ee1dd46d73353526e6a1c24ca3}{$\sim$merger} ()}
76\label{classmerger_51e425ee1dd46d73353526e6a1c24ca3}
77
78\begin{CompactList}\small\item\em for future use \item\end{CompactList}\item 
79\hypertarget{classmerger_6e430acd4eb7eea6078df0eb0a429821}{
80\hyperlink{classMixEF}{MixEF} \& \hyperlink{classmerger_6e430acd4eb7eea6078df0eb0a429821}{\_\-Mix} ()}
81\label{classmerger_6e430acd4eb7eea6078df0eb0a429821}
82
83\begin{CompactList}\small\item\em Access function. \item\end{CompactList}\item 
84\hypertarget{classmerger_f79677063ec72cdc175280a3fae8ebc2}{
85\hyperlink{classeEmp}{eEmp} \& \hyperlink{classmerger_f79677063ec72cdc175280a3fae8ebc2}{\_\-Smp} ()}
86\label{classmerger_f79677063ec72cdc175280a3fae8ebc2}
87
88\begin{CompactList}\small\item\em Access function. \item\end{CompactList}\item 
89\hyperlink{classRV}{RV} \hyperlink{classcompositepdf_635d219fb3e32852400d6f98aa4bdc93}{getrv} (bool checkoverlap=false)
90\begin{CompactList}\small\item\em find common rv, flag \item\end{CompactList}\item 
91\hypertarget{classcompositepdf_5a4479785c1fdb2cc351fbea07b899ac}{
92void \hyperlink{classcompositepdf_5a4479785c1fdb2cc351fbea07b899ac}{setrvc} (const \hyperlink{classRV}{RV} \&\hyperlink{classepdf_74da992e3f5d598da8850b646b79b9d9}{rv}, \hyperlink{classRV}{RV} \&rvc)}
93\label{classcompositepdf_5a4479785c1fdb2cc351fbea07b899ac}
94
95\begin{CompactList}\small\item\em common rvc of all mpdfs is written to rvc \item\end{CompactList}\item 
96\hypertarget{classepdf_76608914c3b19e150292d5c56e93e508}{
97virtual mat \hyperlink{classepdf_76608914c3b19e150292d5c56e93e508}{sample\_\-m} (int N) const }
98\label{classepdf_76608914c3b19e150292d5c56e93e508}
99
100\begin{CompactList}\small\item\em Returns N samples from density $epdf(rv)$. \item\end{CompactList}\item 
101\hypertarget{classepdf_2495a04bbacb9b55fe5a3a59b78affca}{
102virtual vec \hyperlink{classepdf_2495a04bbacb9b55fe5a3a59b78affca}{evallog\_\-m} (const mat \&Val) const }
103\label{classepdf_2495a04bbacb9b55fe5a3a59b78affca}
104
105\begin{CompactList}\small\item\em Compute log-probability of multiple values argument {\tt val}. \item\end{CompactList}\item 
106\hypertarget{classepdf_e87dc8260a5c37bc1b03eb66174741a0}{
107virtual \hyperlink{classmpdf}{mpdf} $\ast$ \hyperlink{classepdf_e87dc8260a5c37bc1b03eb66174741a0}{condition} (const \hyperlink{classRV}{RV} \&\hyperlink{classepdf_74da992e3f5d598da8850b646b79b9d9}{rv}) const }
108\label{classepdf_e87dc8260a5c37bc1b03eb66174741a0}
109
110\begin{CompactList}\small\item\em Return conditional density on the given \hyperlink{classRV}{RV}, the remaining rvs will be in conditioning. \item\end{CompactList}\item 
111\hypertarget{classepdf_38de9f59b65ee06028554f3f74b66025}{
112virtual \hyperlink{classepdf}{epdf} $\ast$ \hyperlink{classepdf_38de9f59b65ee06028554f3f74b66025}{marginal} (const \hyperlink{classRV}{RV} \&\hyperlink{classepdf_74da992e3f5d598da8850b646b79b9d9}{rv}) const }
113\label{classepdf_38de9f59b65ee06028554f3f74b66025}
114
115\begin{CompactList}\small\item\em Return marginal density on the given \hyperlink{classRV}{RV}, the remainig rvs are intergrated out. \item\end{CompactList}\item 
116\hypertarget{classepdf_ca0d32aabb4cbba347e0c37fe8607562}{
117const \hyperlink{classRV}{RV} \& \hyperlink{classepdf_ca0d32aabb4cbba347e0c37fe8607562}{\_\-rv} () const }
118\label{classepdf_ca0d32aabb4cbba347e0c37fe8607562}
119
120\begin{CompactList}\small\item\em access function, possibly dangerous! \item\end{CompactList}\item 
121\hypertarget{classepdf_7fb94ce90d1ac7077d29f7d6a6c3e0a5}{
122void \hyperlink{classepdf_7fb94ce90d1ac7077d29f7d6a6c3e0a5}{\_\-renewrv} (const \hyperlink{classRV}{RV} \&in\_\-rv)}
123\label{classepdf_7fb94ce90d1ac7077d29f7d6a6c3e0a5}
124
125\begin{CompactList}\small\item\em modifier function - useful when copying epdfs \item\end{CompactList}\end{CompactItemize}
126\subsection*{Protected Attributes}
127\begin{CompactItemize}
128\item 
129\hypertarget{classmerger_021d1522cea70db8545d708afd32ec2f}{
130\hyperlink{classMixEF}{MixEF} \hyperlink{classmerger_021d1522cea70db8545d708afd32ec2f}{Mix}}
131\label{classmerger_021d1522cea70db8545d708afd32ec2f}
132
133\begin{CompactList}\small\item\em Internal mixture of EF models. \item\end{CompactList}\item 
134\hypertarget{classmerger_01e222f5df660e1b25c712e82da8df8f}{
135Array$<$ \hyperlink{classdatalink__m2e}{datalink\_\-m2e} $\ast$ $>$ \hyperlink{classmerger_01e222f5df660e1b25c712e82da8df8f}{dls}}
136\label{classmerger_01e222f5df660e1b25c712e82da8df8f}
137
138\begin{CompactList}\small\item\em Data link for each \hyperlink{classmpdf}{mpdf} in mpdfs. \item\end{CompactList}\item 
139\hypertarget{classmerger_e741e6096a7acec3dfa477efa1d8160e}{
140Array$<$ \hyperlink{classRV}{RV} $>$ \hyperlink{classmerger_e741e6096a7acec3dfa477efa1d8160e}{rvzs}}
141\label{classmerger_e741e6096a7acec3dfa477efa1d8160e}
142
143\begin{CompactList}\small\item\em Array of rvs that are not modelled by mpdfs at all (aux). \item\end{CompactList}\item 
144\hypertarget{classmerger_d0ff2953f904f12a355f72f51813ca7a}{
145Array$<$ \hyperlink{classdatalink__m2e}{datalink\_\-m2e} $\ast$ $>$ \hyperlink{classmerger_d0ff2953f904f12a355f72f51813ca7a}{zdls}}
146\label{classmerger_d0ff2953f904f12a355f72f51813ca7a}
147
148\begin{CompactList}\small\item\em Data Links of rv0 mpdfs - these will be conditioned the (rv,rvc) of mpdfs. \item\end{CompactList}\item 
149\hypertarget{classmerger_ce84de1824875b4262eefb640e8c6d69}{
150int \hyperlink{classmerger_ce84de1824875b4262eefb640e8c6d69}{Ns}}
151\label{classmerger_ce84de1824875b4262eefb640e8c6d69}
152
153\begin{CompactList}\small\item\em Number of samples used in approximation. \item\end{CompactList}\item 
154\hypertarget{classmerger_6acf33e1c64aaaee20689725e8110f65}{
155int \hyperlink{classmerger_6acf33e1c64aaaee20689725e8110f65}{Nc}}
156\label{classmerger_6acf33e1c64aaaee20689725e8110f65}
157
158\begin{CompactList}\small\item\em Number of components in a mixture. \item\end{CompactList}\item 
159\hypertarget{classmerger_e68a72e2740007ae68545e378c7701ad}{
160double \hyperlink{classmerger_e68a72e2740007ae68545e378c7701ad}{beta}}
161\label{classmerger_e68a72e2740007ae68545e378c7701ad}
162
163\begin{CompactList}\small\item\em Prior on the log-normal merging model. \item\end{CompactList}\item 
164\hypertarget{classmerger_b13c9e8921e6bc6b8dd7bbafb54fa801}{
165\hyperlink{classeEmp}{eEmp} \hyperlink{classmerger_b13c9e8921e6bc6b8dd7bbafb54fa801}{eSmp}}
166\label{classmerger_b13c9e8921e6bc6b8dd7bbafb54fa801}
167
168\begin{CompactList}\small\item\em Projection to empirical density. \item\end{CompactList}\item 
169\hypertarget{classcompositepdf_c1646fe41ff5934d010e54ccaa46133f}{
170int \hyperlink{classcompositepdf_c1646fe41ff5934d010e54ccaa46133f}{n}}
171\label{classcompositepdf_c1646fe41ff5934d010e54ccaa46133f}
172
173\begin{CompactList}\small\item\em Number of mpdfs in the composite. \item\end{CompactList}\item 
174\hypertarget{classcompositepdf_637877061b917a16a0421bb5c4cd480d}{
175Array$<$ \hyperlink{classmpdf}{mpdf} $\ast$ $>$ \hyperlink{classcompositepdf_637877061b917a16a0421bb5c4cd480d}{mpdfs}}
176\label{classcompositepdf_637877061b917a16a0421bb5c4cd480d}
177
178\begin{CompactList}\small\item\em Elements of composition. \item\end{CompactList}\item 
179\hypertarget{classepdf_74da992e3f5d598da8850b646b79b9d9}{
180\hyperlink{classRV}{RV} \hyperlink{classepdf_74da992e3f5d598da8850b646b79b9d9}{rv}}
181\label{classepdf_74da992e3f5d598da8850b646b79b9d9}
182
183\begin{CompactList}\small\item\em Identified of the random variable. \item\end{CompactList}\end{CompactItemize}
184
185
186\subsection{Detailed Description}
187Function for general combination of pdfs.
188
189Mixtures of Gaussian densities are used internally. Switching to other densities should be trivial.
190
191\subsection{Member Function Documentation}
192\hypertarget{classmerger_379198c3d2063bfa63f5d1245a2511ba}{
193\index{merger@{merger}!sample@{sample}}
194\index{sample@{sample}!merger@{merger}}
195\subsubsection[sample]{\setlength{\rightskip}{0pt plus 5cm}vec merger::sample () const\hspace{0.3cm}{\tt  \mbox{[}inline, virtual\mbox{]}}}}
196\label{classmerger_379198c3d2063bfa63f5d1245a2511ba}
197
198
199sample from merged density weight w is a
200
201Implements \hyperlink{classepdf_8019654e494bf5e458f6fb947e11b262}{epdf}.
202
203References MixEF::\_\-epdf(), Mix, and epdf::sample().\hypertarget{classcompositepdf_635d219fb3e32852400d6f98aa4bdc93}{
204\index{merger@{merger}!getrv@{getrv}}
205\index{getrv@{getrv}!merger@{merger}}
206\subsubsection[getrv]{\setlength{\rightskip}{0pt plus 5cm}{\bf RV} compositepdf::getrv (bool {\em checkoverlap} = {\tt false})\hspace{0.3cm}{\tt  \mbox{[}inherited\mbox{]}}}}
207\label{classcompositepdf_635d219fb3e32852400d6f98aa4bdc93}
208
209
210find common rv, flag
211
212\begin{Desc}
213\item[Parameters:]
214\begin{description}
215\item[{\em checkoverlap}]modifies whether overlaps are acceptable \end{description}
216\end{Desc}
217
218
219References RV::add(), compositepdf::mpdfs, and compositepdf::n.
220
221The documentation for this class was generated from the following files:\begin{CompactItemize}
222\item 
223work/git/mixpp/bdm/estim/\hyperlink{merger_8h}{merger.h}\item 
224work/git/mixpp/bdm/estim/merger.cpp\end{CompactItemize}
Note: See TracBrowser for help on using the browser.