1 | \hypertarget{classbdm_1_1egamma}{ |
---|
2 | \section{bdm::egamma Class Reference} |
---|
3 | \label{classbdm_1_1egamma}\index{bdm::egamma@{bdm::egamma}} |
---|
4 | } |
---|
5 | {\tt \#include $<$libEF.h$>$} |
---|
6 | |
---|
7 | Inheritance diagram for bdm::egamma:\nopagebreak |
---|
8 | \begin{figure}[H] |
---|
9 | \begin{center} |
---|
10 | \leavevmode |
---|
11 | \includegraphics[width=65pt]{classbdm_1_1egamma__inherit__graph} |
---|
12 | \end{center} |
---|
13 | \end{figure} |
---|
14 | |
---|
15 | |
---|
16 | \subsection{Detailed Description} |
---|
17 | Gamma posterior density. |
---|
18 | |
---|
19 | Multivariate Gamma density as product of independent univariate densities. \[ f(x|\alpha,\beta) = \prod f(x_i|\alpha_i,\beta_i) \] \subsection*{Public Member Functions} |
---|
20 | \begin{CompactItemize} |
---|
21 | \item |
---|
22 | \hypertarget{classbdm_1_1egamma_131197f3dfad99355a01d30903279653}{ |
---|
23 | \hyperlink{classbdm_1_1egamma_131197f3dfad99355a01d30903279653}{egamma} ()} |
---|
24 | \label{classbdm_1_1egamma_131197f3dfad99355a01d30903279653} |
---|
25 | |
---|
26 | \begin{CompactList}\small\item\em Default constructor. \item\end{CompactList}\item |
---|
27 | \hypertarget{classbdm_1_1egamma_749f82293ff23a8319c1bf52489d2ed2}{ |
---|
28 | void \hyperlink{classbdm_1_1egamma_749f82293ff23a8319c1bf52489d2ed2}{set\_\-parameters} (const vec \&a, const vec \&b)} |
---|
29 | \label{classbdm_1_1egamma_749f82293ff23a8319c1bf52489d2ed2} |
---|
30 | |
---|
31 | \begin{CompactList}\small\item\em Sets parameters. \item\end{CompactList}\item |
---|
32 | \hypertarget{classbdm_1_1egamma_6ed82f0fd05f6002487256d8e75a0bbd}{ |
---|
33 | vec \hyperlink{classbdm_1_1egamma_6ed82f0fd05f6002487256d8e75a0bbd}{sample} () const } |
---|
34 | \label{classbdm_1_1egamma_6ed82f0fd05f6002487256d8e75a0bbd} |
---|
35 | |
---|
36 | \begin{CompactList}\small\item\em Returns a sample, $ x $ from density $ f_x()$. \item\end{CompactList}\item |
---|
37 | \hypertarget{classbdm_1_1egamma_a8e11e5a580ff42a1b205974c60768c6}{ |
---|
38 | double \hyperlink{classbdm_1_1egamma_a8e11e5a580ff42a1b205974c60768c6}{evallog} (const vec \&val) const } |
---|
39 | \label{classbdm_1_1egamma_a8e11e5a580ff42a1b205974c60768c6} |
---|
40 | |
---|
41 | \begin{CompactList}\small\item\em TODO: is it used anywhere? \item\end{CompactList}\item |
---|
42 | \hypertarget{classbdm_1_1egamma_9a66cbd100e8520c769ccb3c451f86f8}{ |
---|
43 | double \hyperlink{classbdm_1_1egamma_9a66cbd100e8520c769ccb3c451f86f8}{lognc} () const } |
---|
44 | \label{classbdm_1_1egamma_9a66cbd100e8520c769ccb3c451f86f8} |
---|
45 | |
---|
46 | \begin{CompactList}\small\item\em logarithm of the normalizing constant, $\mathcal{I}$ \item\end{CompactList}\item |
---|
47 | \hypertarget{classbdm_1_1egamma_0865cb3d6339fdc7410806cf70a329ed}{ |
---|
48 | vec \& \hyperlink{classbdm_1_1egamma_0865cb3d6339fdc7410806cf70a329ed}{\_\-alpha} ()} |
---|
49 | \label{classbdm_1_1egamma_0865cb3d6339fdc7410806cf70a329ed} |
---|
50 | |
---|
51 | \begin{CompactList}\small\item\em Returns poiter to alpha and beta. Potentially dengerous: use with care! \item\end{CompactList}\item |
---|
52 | \hypertarget{classbdm_1_1egamma_c42cadd9cbd344caaa69b0b433cd16ca}{ |
---|
53 | vec \& \textbf{\_\-beta} ()} |
---|
54 | \label{classbdm_1_1egamma_c42cadd9cbd344caaa69b0b433cd16ca} |
---|
55 | |
---|
56 | \item |
---|
57 | \hypertarget{classbdm_1_1egamma_49d256c42cce14c6faa56ec242b57e85}{ |
---|
58 | vec \hyperlink{classbdm_1_1egamma_49d256c42cce14c6faa56ec242b57e85}{mean} () const } |
---|
59 | \label{classbdm_1_1egamma_49d256c42cce14c6faa56ec242b57e85} |
---|
60 | |
---|
61 | \begin{CompactList}\small\item\em return expected value \item\end{CompactList}\item |
---|
62 | \hypertarget{classbdm_1_1egamma_36986cc01917cd0796fadc17125bdec1}{ |
---|
63 | vec \hyperlink{classbdm_1_1egamma_36986cc01917cd0796fadc17125bdec1}{variance} () const } |
---|
64 | \label{classbdm_1_1egamma_36986cc01917cd0796fadc17125bdec1} |
---|
65 | |
---|
66 | \begin{CompactList}\small\item\em return expected variance (not covariance!) \item\end{CompactList}\item |
---|
67 | \hypertarget{classbdm_1_1eEF_deef7d6273ba4d5a5cf0bbd91ec7277a}{ |
---|
68 | virtual 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_a4135778ecd9ab774762936c82a097c6}{ |
---|
73 | virtual double \hyperlink{classbdm_1_1eEF_a4135778ecd9ab774762936c82a097c6}{evallog\_\-nn} (const vec \&val) const } |
---|
74 | \label{classbdm_1_1eEF_a4135778ecd9ab774762936c82a097c6} |
---|
75 | |
---|
76 | \begin{CompactList}\small\item\em Evaluate normalized log-probability. \item\end{CompactList}\item |
---|
77 | \hypertarget{classbdm_1_1eEF_79a7c8ea8c02e45d410bd1d7ffd72b41}{ |
---|
78 | virtual 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}{ |
---|
83 | virtual 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}{ |
---|
91 | virtual 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}{ |
---|
96 | virtual 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}{ |
---|
101 | virtual \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}{ |
---|
106 | virtual \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}{ |
---|
115 | void \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}{ |
---|
120 | bool \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}{ |
---|
125 | const \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}{ |
---|
134 | bool \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_1egamma_0901ec983e66b8337aaa506e13b122fa}{ |
---|
143 | vec \hyperlink{classbdm_1_1egamma_0901ec983e66b8337aaa506e13b122fa}{alpha}} |
---|
144 | \label{classbdm_1_1egamma_0901ec983e66b8337aaa506e13b122fa} |
---|
145 | |
---|
146 | \begin{CompactList}\small\item\em Vector $\alpha$. \item\end{CompactList}\item |
---|
147 | \hypertarget{classbdm_1_1egamma_457bfb1ccb2057df85073e519a15ccc1}{ |
---|
148 | vec \hyperlink{classbdm_1_1egamma_457bfb1ccb2057df85073e519a15ccc1}{beta}} |
---|
149 | \label{classbdm_1_1egamma_457bfb1ccb2057df85073e519a15ccc1} |
---|
150 | |
---|
151 | \begin{CompactList}\small\item\em Vector $\beta$. \item\end{CompactList}\item |
---|
152 | \hypertarget{classbdm_1_1epdf_16adac20ec7fe07e1ea0b27d917788ce}{ |
---|
153 | int \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 | |
---|
164 | The documentation for this class was generated from the following files:\begin{CompactItemize} |
---|
165 | \item |
---|
166 | \hyperlink{libEF_8h}{libEF.h}\item |
---|
167 | libEF.cpp\end{CompactItemize} |
---|