root/doc/latex/classbdm_1_1egiw.tex @ 271

Revision 271, 11.6 kB (checked in by smidl, 16 years ago)

Next major revision

Line 
1\hypertarget{classbdm_1_1egiw}{
2\section{bdm::egiw Class Reference}
3\label{classbdm_1_1egiw}\index{bdm::egiw@{bdm::egiw}}
4}
5{\tt \#include $<$libEF.h$>$}
6
7Inheritance diagram for bdm::egiw::\begin{figure}[H]
8\begin{center}
9\leavevmode
10\includegraphics[height=4cm]{classbdm_1_1egiw}
11\end{center}
12\end{figure}
13
14
15\subsection{Detailed Description}
16Gauss-inverse-Wishart density stored in LD form.
17
18For $p$-variate densities, given rv.count() should be $p\times$ V.rows(). \subsection*{Public Member Functions}
19\begin{CompactItemize}
20\item 
21\hypertarget{classbdm_1_1egiw_920f21548b7a3723923dd108fe514c61}{
22vec \hyperlink{classbdm_1_1egiw_920f21548b7a3723923dd108fe514c61}{sample} () const }
23\label{classbdm_1_1egiw_920f21548b7a3723923dd108fe514c61}
24
25\begin{CompactList}\small\item\em Returns a sample, $ x $ from density $ f_x()$. \item\end{CompactList}\item 
26\hypertarget{classbdm_1_1egiw_df70c05f918c3a6f86d60f10c1fd6ba2}{
27vec \hyperlink{classbdm_1_1egiw_df70c05f918c3a6f86d60f10c1fd6ba2}{mean} () const }
28\label{classbdm_1_1egiw_df70c05f918c3a6f86d60f10c1fd6ba2}
29
30\begin{CompactList}\small\item\em return expected value \item\end{CompactList}\item 
31\hypertarget{classbdm_1_1egiw_c1ecc406613cc2341225dc10c3d3b46a}{
32vec \hyperlink{classbdm_1_1egiw_c1ecc406613cc2341225dc10c3d3b46a}{variance} () const }
33\label{classbdm_1_1egiw_c1ecc406613cc2341225dc10c3d3b46a}
34
35\begin{CompactList}\small\item\em return expected variance (not covariance!) \item\end{CompactList}\item 
36\hypertarget{classbdm_1_1egiw_d2075aa2306648b3e4fe40bb86628d5c}{
37void \textbf{mean\_\-mat} (mat \&M, mat \&R) const }
38\label{classbdm_1_1egiw_d2075aa2306648b3e4fe40bb86628d5c}
39
40\item 
41\hypertarget{classbdm_1_1egiw_bfb8e7c619b34ad804a73bff71742b5e}{
42double \hyperlink{classbdm_1_1egiw_bfb8e7c619b34ad804a73bff71742b5e}{evallog\_\-nn} (const vec \&val) const }
43\label{classbdm_1_1egiw_bfb8e7c619b34ad804a73bff71742b5e}
44
45\begin{CompactList}\small\item\em In this instance, val= \mbox{[}theta, r\mbox{]}. For multivariate instances, it is stored columnwise val = \mbox{[}theta\_\-1 theta\_\-2 ... r\_\-1 r\_\-2 \mbox{]}. \item\end{CompactList}\item 
46\hypertarget{classbdm_1_1egiw_41d72ba7b2abc8a9a4209ffa98ed5633}{
47double \hyperlink{classbdm_1_1egiw_41d72ba7b2abc8a9a4209ffa98ed5633}{lognc} () const }
48\label{classbdm_1_1egiw_41d72ba7b2abc8a9a4209ffa98ed5633}
49
50\begin{CompactList}\small\item\em logarithm of the normalizing constant, $\mathcal{I}$ \item\end{CompactList}\item 
51\hypertarget{classbdm_1_1egiw_8e610e95401a11baf34f65e16ecd87be}{
52void \hyperlink{classbdm_1_1egiw_8e610e95401a11baf34f65e16ecd87be}{pow} (double p)}
53\label{classbdm_1_1egiw_8e610e95401a11baf34f65e16ecd87be}
54
55\begin{CompactList}\small\item\em Power of the density, used e.g. to flatten the density. \item\end{CompactList}\item 
56\hypertarget{classbdm_1_1eEF_deef7d6273ba4d5a5cf0bbd91ec7277a}{
57virtual void \hyperlink{classbdm_1_1eEF_deef7d6273ba4d5a5cf0bbd91ec7277a}{dupdate} (mat \&v)}
58\label{classbdm_1_1eEF_deef7d6273ba4d5a5cf0bbd91ec7277a}
59
60\begin{CompactList}\small\item\em TODO decide if it is really needed. \item\end{CompactList}\item 
61\hypertarget{classbdm_1_1eEF_a36d06ecdd6f4c79dc122510eaccc692}{
62virtual double \hyperlink{classbdm_1_1eEF_a36d06ecdd6f4c79dc122510eaccc692}{evallog} (const vec \&val) const }
63\label{classbdm_1_1eEF_a36d06ecdd6f4c79dc122510eaccc692}
64
65\begin{CompactList}\small\item\em Evaluate normalized log-probability. \item\end{CompactList}\item 
66\hypertarget{classbdm_1_1eEF_79a7c8ea8c02e45d410bd1d7ffd72b41}{
67virtual vec \hyperlink{classbdm_1_1eEF_79a7c8ea8c02e45d410bd1d7ffd72b41}{evallog} (const mat \&Val) const }
68\label{classbdm_1_1eEF_79a7c8ea8c02e45d410bd1d7ffd72b41}
69
70\begin{CompactList}\small\item\em Evaluate normalized log-probability for many samples. \item\end{CompactList}\end{CompactItemize}
71\begin{Indent}{\bf Constructors}\par
72\begin{CompactItemize}
73\item 
74\hypertarget{classbdm_1_1egiw_50149cf136c9120b4fff71c117f0bb2e}{
75\textbf{egiw} ()}
76\label{classbdm_1_1egiw_50149cf136c9120b4fff71c117f0bb2e}
77
78\item 
79\hypertarget{classbdm_1_1egiw_79037e048e717a076f342eb1d276870e}{
80\textbf{egiw} (int dimx0, \hyperlink{classldmat}{ldmat} V0, double nu0=-1.0)}
81\label{classbdm_1_1egiw_79037e048e717a076f342eb1d276870e}
82
83\item 
84\hypertarget{classbdm_1_1egiw_40b04f8ef133d089c4be2c7983e18b5c}{
85void \textbf{set\_\-parameters} (int dimx0, \hyperlink{classldmat}{ldmat} V0, double nu0=-1.0)}
86\label{classbdm_1_1egiw_40b04f8ef133d089c4be2c7983e18b5c}
87
88\end{CompactItemize}
89\end{Indent}
90\begin{Indent}{\bf Access attributes}\par
91\begin{CompactItemize}
92\item 
93\hypertarget{classbdm_1_1egiw_15792f3112e5cf67d572f491b09324c8}{
94\hyperlink{classldmat}{ldmat} \& \textbf{\_\-V} ()}
95\label{classbdm_1_1egiw_15792f3112e5cf67d572f491b09324c8}
96
97\item 
98\hypertarget{classbdm_1_1egiw_ad9c539a80a552e837245ddcebcbbba4}{
99const \hyperlink{classldmat}{ldmat} \& \textbf{\_\-V} () const }
100\label{classbdm_1_1egiw_ad9c539a80a552e837245ddcebcbbba4}
101
102\item 
103\hypertarget{classbdm_1_1egiw_a025ee710274ca142dd0ae978735ad4a}{
104double \& \textbf{\_\-nu} ()}
105\label{classbdm_1_1egiw_a025ee710274ca142dd0ae978735ad4a}
106
107\item 
108\hypertarget{classbdm_1_1egiw_cf3b2bcb158c15c24788bba90e4154e4}{
109const double \& \textbf{\_\-nu} () const }
110\label{classbdm_1_1egiw_cf3b2bcb158c15c24788bba90e4154e4}
111
112\end{CompactItemize}
113\end{Indent}
114\begin{Indent}{\bf Constructors}\par
115{\em Construction of each \hyperlink{classbdm_1_1epdf}{epdf} should support two types of constructors: \begin{itemize}
116\item empty constructor, \item copy constructor,\end{itemize}
117The following constructors should be supported for convenience: \begin{itemize}
118\item constructor followed by calling {\tt set\_\-parameters()} \item constructor accepting random variables calling {\tt \hyperlink{classbdm_1_1epdf_f423e28448dbb69ef4905295ec8de8ff}{set\_\-rv()}} \end{itemize}
119All internal data structures are constructed as empty. Their values (including sizes) will be set by method {\tt set\_\-parameters()}. This way references can be initialized in constructors. }\begin{CompactItemize}
120\item 
121\hypertarget{classbdm_1_1epdf_840de94aa33cf4f2ebd2427f45a165d8}{
122void \textbf{set\_\-parameters} (int dim0)}
123\label{classbdm_1_1epdf_840de94aa33cf4f2ebd2427f45a165d8}
124
125\end{CompactItemize}
126\end{Indent}
127\begin{Indent}{\bf Matematical Operations}\par
128\begin{CompactItemize}
129\item 
130\hypertarget{classbdm_1_1epdf_b4cf45fd83cc7573ede9fe1215256058}{
131virtual mat \hyperlink{classbdm_1_1epdf_b4cf45fd83cc7573ede9fe1215256058}{sample\_\-m} (int N) const }
132\label{classbdm_1_1epdf_b4cf45fd83cc7573ede9fe1215256058}
133
134\begin{CompactList}\small\item\em Returns N samples, $ [x_1 , x_2 , \ldots \ $ from density $ f_x(rv)$. \item\end{CompactList}\item 
135\hypertarget{classbdm_1_1epdf_34956d4dd3176eeb5937cf48a1546b62}{
136virtual vec \hyperlink{classbdm_1_1epdf_34956d4dd3176eeb5937cf48a1546b62}{evallog\_\-m} (const mat \&Val) const }
137\label{classbdm_1_1epdf_34956d4dd3176eeb5937cf48a1546b62}
138
139\begin{CompactList}\small\item\em Compute log-probability of multiple values argument {\tt val}. \item\end{CompactList}\item 
140\hypertarget{classbdm_1_1epdf_e584eac5579c1b6384947ecf66166c77}{
141virtual \hyperlink{classbdm_1_1mpdf}{mpdf} $\ast$ \hyperlink{classbdm_1_1epdf_e584eac5579c1b6384947ecf66166c77}{condition} (const \hyperlink{classbdm_1_1RV}{RV} \&\hyperlink{classbdm_1_1epdf_62c5b8ff71d9ebe6cd58d3c342eb1dc8}{rv}) const }
142\label{classbdm_1_1epdf_e584eac5579c1b6384947ecf66166c77}
143
144\begin{CompactList}\small\item\em Return conditional density on the given \hyperlink{classbdm_1_1RV}{RV}, the remaining rvs will be in conditioning. \item\end{CompactList}\item 
145\hypertarget{classbdm_1_1epdf_3fb2ece54f720b62ad325e61214fa0a1}{
146virtual \hyperlink{classbdm_1_1epdf}{epdf} $\ast$ \hyperlink{classbdm_1_1epdf_3fb2ece54f720b62ad325e61214fa0a1}{marginal} (const \hyperlink{classbdm_1_1RV}{RV} \&\hyperlink{classbdm_1_1epdf_62c5b8ff71d9ebe6cd58d3c342eb1dc8}{rv}) const }
147\label{classbdm_1_1epdf_3fb2ece54f720b62ad325e61214fa0a1}
148
149\begin{CompactList}\small\item\em Return marginal density on the given \hyperlink{classbdm_1_1RV}{RV}, the remainig rvs are intergrated out. \item\end{CompactList}\end{CompactItemize}
150\end{Indent}
151\begin{Indent}{\bf Connection to other classes}\par
152{\em Description of the random quantity via attribute {\tt rv} is optional. For operations such as sampling {\tt rv} does not need to be set. However, for {\tt marginalization} and {\tt conditioning} {\tt rv} has to be set. NB: }\begin{CompactItemize}
153\item 
154\hypertarget{classbdm_1_1epdf_f423e28448dbb69ef4905295ec8de8ff}{
155void \hyperlink{classbdm_1_1epdf_f423e28448dbb69ef4905295ec8de8ff}{set\_\-rv} (const \hyperlink{classbdm_1_1RV}{RV} \&rv0)}
156\label{classbdm_1_1epdf_f423e28448dbb69ef4905295ec8de8ff}
157
158\begin{CompactList}\small\item\em Name its rv. \item\end{CompactList}\item 
159\hypertarget{classbdm_1_1epdf_c4b863ff84c7a4882fb3ad18556027f9}{
160bool \hyperlink{classbdm_1_1epdf_c4b863ff84c7a4882fb3ad18556027f9}{isnamed} () const }
161\label{classbdm_1_1epdf_c4b863ff84c7a4882fb3ad18556027f9}
162
163\begin{CompactList}\small\item\em True if rv is assigned. \item\end{CompactList}\item 
164\hypertarget{classbdm_1_1epdf_a4ab378d5e004c3ff3e2d4e64f7bba21}{
165const \hyperlink{classbdm_1_1RV}{RV} \& \hyperlink{classbdm_1_1epdf_a4ab378d5e004c3ff3e2d4e64f7bba21}{\_\-rv} () const }
166\label{classbdm_1_1epdf_a4ab378d5e004c3ff3e2d4e64f7bba21}
167
168\begin{CompactList}\small\item\em Return name (fails when isnamed is false). \item\end{CompactList}\end{CompactItemize}
169\end{Indent}
170\begin{Indent}{\bf Access to attributes}\par
171\begin{CompactItemize}
172\item 
173\hypertarget{classbdm_1_1epdf_7083a65f7b7a0d0d13b2c516bd2ec29c}{
174int \hyperlink{classbdm_1_1epdf_7083a65f7b7a0d0d13b2c516bd2ec29c}{dimension} () const }
175\label{classbdm_1_1epdf_7083a65f7b7a0d0d13b2c516bd2ec29c}
176
177\begin{CompactList}\small\item\em Size of the random variable. \item\end{CompactList}\end{CompactItemize}
178\end{Indent}
179\subsection*{Protected Attributes}
180\begin{CompactItemize}
181\item 
182\hypertarget{classbdm_1_1egiw_ae56852845c6af176fd9017dbebbbd52}{
183\hyperlink{classldmat}{ldmat} \hyperlink{classbdm_1_1egiw_ae56852845c6af176fd9017dbebbbd52}{V}}
184\label{classbdm_1_1egiw_ae56852845c6af176fd9017dbebbbd52}
185
186\begin{CompactList}\small\item\em Extended information matrix of sufficient statistics. \item\end{CompactList}\item 
187\hypertarget{classbdm_1_1egiw_447eacf19d4f4083872686f044814dc4}{
188double \hyperlink{classbdm_1_1egiw_447eacf19d4f4083872686f044814dc4}{nu}}
189\label{classbdm_1_1egiw_447eacf19d4f4083872686f044814dc4}
190
191\begin{CompactList}\small\item\em Number of data records (degrees of freedom) of sufficient statistics. \item\end{CompactList}\item 
192\hypertarget{classbdm_1_1egiw_23e4d78bea7e98840f3da30e76a2b57a}{
193int \hyperlink{classbdm_1_1egiw_23e4d78bea7e98840f3da30e76a2b57a}{dimx}}
194\label{classbdm_1_1egiw_23e4d78bea7e98840f3da30e76a2b57a}
195
196\begin{CompactList}\small\item\em Dimension of the output. \item\end{CompactList}\item 
197\hypertarget{classbdm_1_1egiw_322414c32d9a21a006a5aab0311f64fd}{
198int \hyperlink{classbdm_1_1egiw_322414c32d9a21a006a5aab0311f64fd}{nPsi}}
199\label{classbdm_1_1egiw_322414c32d9a21a006a5aab0311f64fd}
200
201\begin{CompactList}\small\item\em Dimension of the regressor. \item\end{CompactList}\item 
202\hypertarget{classbdm_1_1epdf_16adac20ec7fe07e1ea0b27d917788ce}{
203int \hyperlink{classbdm_1_1epdf_16adac20ec7fe07e1ea0b27d917788ce}{dim}}
204\label{classbdm_1_1epdf_16adac20ec7fe07e1ea0b27d917788ce}
205
206\begin{CompactList}\small\item\em dimension of the random variable \item\end{CompactList}\item 
207\hypertarget{classbdm_1_1epdf_62c5b8ff71d9ebe6cd58d3c342eb1dc8}{
208\hyperlink{classbdm_1_1RV}{RV} \hyperlink{classbdm_1_1epdf_62c5b8ff71d9ebe6cd58d3c342eb1dc8}{rv}}
209\label{classbdm_1_1epdf_62c5b8ff71d9ebe6cd58d3c342eb1dc8}
210
211\begin{CompactList}\small\item\em Description of the random variable. \item\end{CompactList}\end{CompactItemize}
212
213
214The documentation for this class was generated from the following files:\begin{CompactItemize}
215\item 
216\hyperlink{libEF_8h}{libEF.h}\item 
217libEF.cpp\end{CompactItemize}
Note: See TracBrowser for help on using the browser.