root/doc/latex/classbdm_1_1eDirich.tex @ 270

Revision 270, 9.7 kB (checked in by smidl, 16 years ago)

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

Line 
1\hypertarget{classbdm_1_1eDirich}{
2\section{bdm::eDirich Class Reference}
3\label{classbdm_1_1eDirich}\index{bdm::eDirich@{bdm::eDirich}}
4}
5{\tt \#include $<$libEF.h$>$}
6
7Inheritance diagram for bdm::eDirich:\nopagebreak
8\begin{figure}[H]
9\begin{center}
10\leavevmode
11\includegraphics[width=64pt]{classbdm_1_1eDirich__inherit__graph}
12\end{center}
13\end{figure}
14
15
16\subsection{Detailed Description}
17Dirichlet posterior density.
18
19Continuous Dirichlet density of $n$-dimensional variable $x$ \[ f(x|\beta) = \frac{\Gamma[\gamma]}{\prod_{i=1}^{n}\Gamma(\beta_i)} \prod_{i=1}^{n}x_i^{\beta_i-1} \] where $\gamma=\sum_i \beta_i$. \subsection*{Public Member Functions}
20\begin{CompactItemize}
21\item 
22\hypertarget{classbdm_1_1eDirich_d5137485050ca8d67549b514896f602d}{
23\hyperlink{classbdm_1_1eDirich_d5137485050ca8d67549b514896f602d}{eDirich} ()}
24\label{classbdm_1_1eDirich_d5137485050ca8d67549b514896f602d}
25
26\begin{CompactList}\small\item\em Default constructor. \item\end{CompactList}\item 
27\hypertarget{classbdm_1_1eDirich_31cc8bf709552c9e7286ac16b27c8e2c}{
28\hyperlink{classbdm_1_1eDirich_31cc8bf709552c9e7286ac16b27c8e2c}{eDirich} (const \hyperlink{classbdm_1_1eDirich}{eDirich} \&D0)}
29\label{classbdm_1_1eDirich_31cc8bf709552c9e7286ac16b27c8e2c}
30
31\begin{CompactList}\small\item\em Copy constructor. \item\end{CompactList}\item 
32\hypertarget{classbdm_1_1eDirich_3290613d31d58daa8a45a54b003871fc}{
33vec \hyperlink{classbdm_1_1eDirich_3290613d31d58daa8a45a54b003871fc}{sample} () const }
34\label{classbdm_1_1eDirich_3290613d31d58daa8a45a54b003871fc}
35
36\begin{CompactList}\small\item\em Returns a sample, $ x $ from density $ f_x()$. \item\end{CompactList}\item 
37\hypertarget{classbdm_1_1eDirich_cb343355ec791298bb5a3404cd482fb6}{
38vec \hyperlink{classbdm_1_1eDirich_cb343355ec791298bb5a3404cd482fb6}{mean} () const }
39\label{classbdm_1_1eDirich_cb343355ec791298bb5a3404cd482fb6}
40
41\begin{CompactList}\small\item\em return expected value \item\end{CompactList}\item 
42\hypertarget{classbdm_1_1eDirich_43c547a2507e233706f92712d8c2aacc}{
43vec \hyperlink{classbdm_1_1eDirich_43c547a2507e233706f92712d8c2aacc}{variance} () const }
44\label{classbdm_1_1eDirich_43c547a2507e233706f92712d8c2aacc}
45
46\begin{CompactList}\small\item\em return expected variance (not covariance!) \item\end{CompactList}\item 
47\hypertarget{classbdm_1_1eDirich_e09a24938e80c3d94b0ee842d1552318}{
48double \hyperlink{classbdm_1_1eDirich_e09a24938e80c3d94b0ee842d1552318}{evallog\_\-nn} (const vec \&val) const }
49\label{classbdm_1_1eDirich_e09a24938e80c3d94b0ee842d1552318}
50
51\begin{CompactList}\small\item\em In this instance, val is ... \item\end{CompactList}\item 
52\hypertarget{classbdm_1_1eDirich_279a99f6266c82fe2273e83841f19eb2}{
53double \hyperlink{classbdm_1_1eDirich_279a99f6266c82fe2273e83841f19eb2}{lognc} () const }
54\label{classbdm_1_1eDirich_279a99f6266c82fe2273e83841f19eb2}
55
56\begin{CompactList}\small\item\em logarithm of the normalizing constant, $\mathcal{I}$ \item\end{CompactList}\item 
57\hypertarget{classbdm_1_1eDirich_175e0add26d2105c28d8121eefb9e324}{
58vec \& \hyperlink{classbdm_1_1eDirich_175e0add26d2105c28d8121eefb9e324}{\_\-beta} ()}
59\label{classbdm_1_1eDirich_175e0add26d2105c28d8121eefb9e324}
60
61\begin{CompactList}\small\item\em access function \item\end{CompactList}\item 
62\hypertarget{classbdm_1_1eDirich_a06af2376976a33e1eceaed7e8da75a5}{
63void \hyperlink{classbdm_1_1eDirich_a06af2376976a33e1eceaed7e8da75a5}{set\_\-parameters} (const vec \&beta0)}
64\label{classbdm_1_1eDirich_a06af2376976a33e1eceaed7e8da75a5}
65
66\begin{CompactList}\small\item\em Set internal parameters. \item\end{CompactList}\item 
67\hypertarget{classbdm_1_1eEF_deef7d6273ba4d5a5cf0bbd91ec7277a}{
68virtual void \hyperlink{classbdm_1_1eEF_deef7d6273ba4d5a5cf0bbd91ec7277a}{dupdate} (mat \&v)}
69\label{classbdm_1_1eEF_deef7d6273ba4d5a5cf0bbd91ec7277a}
70
71\begin{CompactList}\small\item\em TODO decide if it is really needed. \item\end{CompactList}\item 
72\hypertarget{classbdm_1_1eEF_a36d06ecdd6f4c79dc122510eaccc692}{
73virtual double \hyperlink{classbdm_1_1eEF_a36d06ecdd6f4c79dc122510eaccc692}{evallog} (const vec \&val) const }
74\label{classbdm_1_1eEF_a36d06ecdd6f4c79dc122510eaccc692}
75
76\begin{CompactList}\small\item\em Evaluate normalized log-probability. \item\end{CompactList}\item 
77\hypertarget{classbdm_1_1eEF_79a7c8ea8c02e45d410bd1d7ffd72b41}{
78virtual vec \hyperlink{classbdm_1_1eEF_79a7c8ea8c02e45d410bd1d7ffd72b41}{evallog} (const mat \&Val) const }
79\label{classbdm_1_1eEF_79a7c8ea8c02e45d410bd1d7ffd72b41}
80
81\begin{CompactList}\small\item\em Evaluate normalized log-probability for many samples. \item\end{CompactList}\item 
82\hypertarget{classbdm_1_1eEF_cf38af29e8e3d650c640509a52396053}{
83virtual void \hyperlink{classbdm_1_1eEF_cf38af29e8e3d650c640509a52396053}{pow} (double p)}
84\label{classbdm_1_1eEF_cf38af29e8e3d650c640509a52396053}
85
86\begin{CompactList}\small\item\em Power of the density, used e.g. to flatten the density. \item\end{CompactList}\end{CompactItemize}
87\begin{Indent}{\bf Matematical Operations}\par
88\begin{CompactItemize}
89\item 
90\hypertarget{classbdm_1_1epdf_b4cf45fd83cc7573ede9fe1215256058}{
91virtual mat \hyperlink{classbdm_1_1epdf_b4cf45fd83cc7573ede9fe1215256058}{sample\_\-m} (int N) const }
92\label{classbdm_1_1epdf_b4cf45fd83cc7573ede9fe1215256058}
93
94\begin{CompactList}\small\item\em Returns N samples, $ [x_1 , x_2 , \ldots \ $ from density $ f_x(rv)$. \item\end{CompactList}\item 
95\hypertarget{classbdm_1_1epdf_34956d4dd3176eeb5937cf48a1546b62}{
96virtual vec \hyperlink{classbdm_1_1epdf_34956d4dd3176eeb5937cf48a1546b62}{evallog\_\-m} (const mat \&Val) const }
97\label{classbdm_1_1epdf_34956d4dd3176eeb5937cf48a1546b62}
98
99\begin{CompactList}\small\item\em Compute log-probability of multiple values argument {\tt val}. \item\end{CompactList}\item 
100\hypertarget{classbdm_1_1epdf_e584eac5579c1b6384947ecf66166c77}{
101virtual \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 }
102\label{classbdm_1_1epdf_e584eac5579c1b6384947ecf66166c77}
103
104\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 
105\hypertarget{classbdm_1_1epdf_3fb2ece54f720b62ad325e61214fa0a1}{
106virtual \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 }
107\label{classbdm_1_1epdf_3fb2ece54f720b62ad325e61214fa0a1}
108
109\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}
110\end{Indent}
111\begin{Indent}{\bf Connection to other classes}\par
112{\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}
113\item 
114\hypertarget{classbdm_1_1epdf_f423e28448dbb69ef4905295ec8de8ff}{
115void \hyperlink{classbdm_1_1epdf_f423e28448dbb69ef4905295ec8de8ff}{set\_\-rv} (const \hyperlink{classbdm_1_1RV}{RV} \&rv0)}
116\label{classbdm_1_1epdf_f423e28448dbb69ef4905295ec8de8ff}
117
118\begin{CompactList}\small\item\em Name its rv. \item\end{CompactList}\item 
119\hypertarget{classbdm_1_1epdf_c4b863ff84c7a4882fb3ad18556027f9}{
120bool \hyperlink{classbdm_1_1epdf_c4b863ff84c7a4882fb3ad18556027f9}{isnamed} () const }
121\label{classbdm_1_1epdf_c4b863ff84c7a4882fb3ad18556027f9}
122
123\begin{CompactList}\small\item\em True if rv is assigned. \item\end{CompactList}\item 
124\hypertarget{classbdm_1_1epdf_a4ab378d5e004c3ff3e2d4e64f7bba21}{
125const \hyperlink{classbdm_1_1RV}{RV} \& \hyperlink{classbdm_1_1epdf_a4ab378d5e004c3ff3e2d4e64f7bba21}{\_\-rv} () const }
126\label{classbdm_1_1epdf_a4ab378d5e004c3ff3e2d4e64f7bba21}
127
128\begin{CompactList}\small\item\em Return name (fails when isnamed is false). \item\end{CompactList}\end{CompactItemize}
129\end{Indent}
130\begin{Indent}{\bf Access to attributes}\par
131\begin{CompactItemize}
132\item 
133\hypertarget{classbdm_1_1epdf_46dfe100cd621716ee5c7ee25a20f24b}{
134bool \hyperlink{classbdm_1_1epdf_46dfe100cd621716ee5c7ee25a20f24b}{dimension} () const }
135\label{classbdm_1_1epdf_46dfe100cd621716ee5c7ee25a20f24b}
136
137\begin{CompactList}\small\item\em Size of the random variable. \item\end{CompactList}\end{CompactItemize}
138\end{Indent}
139\subsection*{Protected Attributes}
140\begin{CompactItemize}
141\item 
142\hypertarget{classbdm_1_1eDirich_f25886a49b4667af61245de81c83b5d2}{
143vec \hyperlink{classbdm_1_1eDirich_f25886a49b4667af61245de81c83b5d2}{beta}}
144\label{classbdm_1_1eDirich_f25886a49b4667af61245de81c83b5d2}
145
146\begin{CompactList}\small\item\em sufficient statistics \item\end{CompactList}\item 
147\hypertarget{classbdm_1_1eDirich_ee9db192a6f0ab7b29c33b2a18a5e1b4}{
148double \hyperlink{classbdm_1_1eDirich_ee9db192a6f0ab7b29c33b2a18a5e1b4}{gamma}}
149\label{classbdm_1_1eDirich_ee9db192a6f0ab7b29c33b2a18a5e1b4}
150
151\begin{CompactList}\small\item\em speedup variable \item\end{CompactList}\item 
152\hypertarget{classbdm_1_1epdf_16adac20ec7fe07e1ea0b27d917788ce}{
153int \hyperlink{classbdm_1_1epdf_16adac20ec7fe07e1ea0b27d917788ce}{dim}}
154\label{classbdm_1_1epdf_16adac20ec7fe07e1ea0b27d917788ce}
155
156\begin{CompactList}\small\item\em dimension of the random variable \item\end{CompactList}\item 
157\hypertarget{classbdm_1_1epdf_62c5b8ff71d9ebe6cd58d3c342eb1dc8}{
158\hyperlink{classbdm_1_1RV}{RV} \hyperlink{classbdm_1_1epdf_62c5b8ff71d9ebe6cd58d3c342eb1dc8}{rv}}
159\label{classbdm_1_1epdf_62c5b8ff71d9ebe6cd58d3c342eb1dc8}
160
161\begin{CompactList}\small\item\em Description of the random variable. \item\end{CompactList}\end{CompactItemize}
162
163
164The documentation for this class was generated from the following file:\begin{CompactItemize}
165\item 
166\hyperlink{libEF_8h}{libEF.h}\end{CompactItemize}
Note: See TracBrowser for help on using the browser.