1 | \hypertarget{classegamma}{ |
---|
2 | \section{egamma Class Reference} |
---|
3 | \label{classegamma}\index{egamma@{egamma}} |
---|
4 | } |
---|
5 | Gamma posterior density. |
---|
6 | |
---|
7 | |
---|
8 | {\tt \#include $<$libEF.h$>$} |
---|
9 | |
---|
10 | Inheritance diagram for egamma:\nopagebreak |
---|
11 | \begin{figure}[H] |
---|
12 | \begin{center} |
---|
13 | \leavevmode |
---|
14 | \includegraphics[width=49pt]{classegamma__inherit__graph} |
---|
15 | \end{center} |
---|
16 | \end{figure} |
---|
17 | Collaboration diagram for egamma:\nopagebreak |
---|
18 | \begin{figure}[H] |
---|
19 | \begin{center} |
---|
20 | \leavevmode |
---|
21 | \includegraphics[width=49pt]{classegamma__coll__graph} |
---|
22 | \end{center} |
---|
23 | \end{figure} |
---|
24 | \subsection*{Public Member Functions} |
---|
25 | \begin{CompactItemize} |
---|
26 | \item |
---|
27 | \hypertarget{classegamma_4b1d34f3b244ea51a58ec10c468788c1}{ |
---|
28 | \hyperlink{classegamma_4b1d34f3b244ea51a58ec10c468788c1}{egamma} (const \hyperlink{classRV}{RV} \&\hyperlink{classepdf_74da992e3f5d598da8850b646b79b9d9}{rv})} |
---|
29 | \label{classegamma_4b1d34f3b244ea51a58ec10c468788c1} |
---|
30 | |
---|
31 | \begin{CompactList}\small\item\em Default constructor. \item\end{CompactList}\item |
---|
32 | \hypertarget{classegamma_8e348b89be82b70471fe8c5630f61339}{ |
---|
33 | void \hyperlink{classegamma_8e348b89be82b70471fe8c5630f61339}{set\_\-parameters} (const vec \&a, const vec \&b)} |
---|
34 | \label{classegamma_8e348b89be82b70471fe8c5630f61339} |
---|
35 | |
---|
36 | \begin{CompactList}\small\item\em Sets parameters. \item\end{CompactList}\item |
---|
37 | \hypertarget{classegamma_8e10c0021b5dfdd9cb62c6959b5ef425}{ |
---|
38 | vec \hyperlink{classegamma_8e10c0021b5dfdd9cb62c6959b5ef425}{sample} () const } |
---|
39 | \label{classegamma_8e10c0021b5dfdd9cb62c6959b5ef425} |
---|
40 | |
---|
41 | \begin{CompactList}\small\item\em Returns a sample, $x$ from density $epdf(rv)$. \item\end{CompactList}\item |
---|
42 | \hypertarget{classegamma_74a49a4c696f44e54bb6b0515e155a9b}{ |
---|
43 | double \hyperlink{classegamma_74a49a4c696f44e54bb6b0515e155a9b}{evallog} (const vec \&val) const } |
---|
44 | \label{classegamma_74a49a4c696f44e54bb6b0515e155a9b} |
---|
45 | |
---|
46 | \begin{CompactList}\small\item\em TODO: is it used anywhere? \item\end{CompactList}\item |
---|
47 | \hypertarget{classegamma_d6dbbdb72360f9e54d64501f80318bb6}{ |
---|
48 | double \hyperlink{classegamma_d6dbbdb72360f9e54d64501f80318bb6}{lognc} () const } |
---|
49 | \label{classegamma_d6dbbdb72360f9e54d64501f80318bb6} |
---|
50 | |
---|
51 | \begin{CompactList}\small\item\em logarithm of the normalizing constant, $\mathcal{I}$ \item\end{CompactList}\item |
---|
52 | \hypertarget{classegamma_44445c56e60b91b377f207f8d5089790}{ |
---|
53 | void \hyperlink{classegamma_44445c56e60b91b377f207f8d5089790}{\_\-param} (vec $\ast$\&a, vec $\ast$\&b)} |
---|
54 | \label{classegamma_44445c56e60b91b377f207f8d5089790} |
---|
55 | |
---|
56 | \begin{CompactList}\small\item\em Returns poiter to alpha and beta. Potentially dengerous: use with care! \item\end{CompactList}\item |
---|
57 | \hypertarget{classegamma_6ab5ba56f7cdb2e5921c3e77524fa50a}{ |
---|
58 | vec \hyperlink{classegamma_6ab5ba56f7cdb2e5921c3e77524fa50a}{mean} () const } |
---|
59 | \label{classegamma_6ab5ba56f7cdb2e5921c3e77524fa50a} |
---|
60 | |
---|
61 | \begin{CompactList}\small\item\em return expected value \item\end{CompactList}\item |
---|
62 | \hypertarget{classeEF_a89bef8996410609004fa019b5b48964}{ |
---|
63 | virtual void \hyperlink{classeEF_a89bef8996410609004fa019b5b48964}{dupdate} (mat \&v)} |
---|
64 | \label{classeEF_a89bef8996410609004fa019b5b48964} |
---|
65 | |
---|
66 | \begin{CompactList}\small\item\em TODO decide if it is really needed. \item\end{CompactList}\item |
---|
67 | \hypertarget{classeEF_41c70565b4d3fb424599817d008f0c71}{ |
---|
68 | virtual double \hyperlink{classeEF_41c70565b4d3fb424599817d008f0c71}{evallog\_\-nn} (const vec \&val) const } |
---|
69 | \label{classeEF_41c70565b4d3fb424599817d008f0c71} |
---|
70 | |
---|
71 | \begin{CompactList}\small\item\em Evaluate normalized log-probability. \item\end{CompactList}\item |
---|
72 | \hypertarget{classeEF_cff03a658aec11b806c3e3d48f37b81f}{ |
---|
73 | virtual vec \hyperlink{classeEF_cff03a658aec11b806c3e3d48f37b81f}{evallog} (const mat \&Val) const } |
---|
74 | \label{classeEF_cff03a658aec11b806c3e3d48f37b81f} |
---|
75 | |
---|
76 | \begin{CompactList}\small\item\em Evaluate normalized log-probability for many samples. \item\end{CompactList}\item |
---|
77 | \hypertarget{classeEF_4f8385dd1cc9740522dc373b1dc3cbf5}{ |
---|
78 | virtual void \hyperlink{classeEF_4f8385dd1cc9740522dc373b1dc3cbf5}{pow} (double p)} |
---|
79 | \label{classeEF_4f8385dd1cc9740522dc373b1dc3cbf5} |
---|
80 | |
---|
81 | \begin{CompactList}\small\item\em Power of the density, used e.g. to flatten the density. \item\end{CompactList}\item |
---|
82 | \hypertarget{classepdf_76608914c3b19e150292d5c56e93e508}{ |
---|
83 | virtual mat \hyperlink{classepdf_76608914c3b19e150292d5c56e93e508}{sample\_\-m} (int N) const } |
---|
84 | \label{classepdf_76608914c3b19e150292d5c56e93e508} |
---|
85 | |
---|
86 | \begin{CompactList}\small\item\em Returns N samples from density $epdf(rv)$. \item\end{CompactList}\item |
---|
87 | \hypertarget{classepdf_2495a04bbacb9b55fe5a3a59b78affca}{ |
---|
88 | virtual vec \hyperlink{classepdf_2495a04bbacb9b55fe5a3a59b78affca}{evallog\_\-m} (const mat \&Val) const } |
---|
89 | \label{classepdf_2495a04bbacb9b55fe5a3a59b78affca} |
---|
90 | |
---|
91 | \begin{CompactList}\small\item\em Compute log-probability of multiple values argument {\tt val}. \item\end{CompactList}\item |
---|
92 | \hypertarget{classepdf_e87dc8260a5c37bc1b03eb66174741a0}{ |
---|
93 | virtual \hyperlink{classmpdf}{mpdf} $\ast$ \hyperlink{classepdf_e87dc8260a5c37bc1b03eb66174741a0}{condition} (const \hyperlink{classRV}{RV} \&\hyperlink{classepdf_74da992e3f5d598da8850b646b79b9d9}{rv}) const } |
---|
94 | \label{classepdf_e87dc8260a5c37bc1b03eb66174741a0} |
---|
95 | |
---|
96 | \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 |
---|
97 | \hypertarget{classepdf_38de9f59b65ee06028554f3f74b66025}{ |
---|
98 | virtual \hyperlink{classepdf}{epdf} $\ast$ \hyperlink{classepdf_38de9f59b65ee06028554f3f74b66025}{marginal} (const \hyperlink{classRV}{RV} \&\hyperlink{classepdf_74da992e3f5d598da8850b646b79b9d9}{rv}) const } |
---|
99 | \label{classepdf_38de9f59b65ee06028554f3f74b66025} |
---|
100 | |
---|
101 | \begin{CompactList}\small\item\em Return marginal density on the given \hyperlink{classRV}{RV}, the remainig rvs are intergrated out. \item\end{CompactList}\item |
---|
102 | \hypertarget{classepdf_ca0d32aabb4cbba347e0c37fe8607562}{ |
---|
103 | const \hyperlink{classRV}{RV} \& \hyperlink{classepdf_ca0d32aabb4cbba347e0c37fe8607562}{\_\-rv} () const } |
---|
104 | \label{classepdf_ca0d32aabb4cbba347e0c37fe8607562} |
---|
105 | |
---|
106 | \begin{CompactList}\small\item\em access function, possibly dangerous! \item\end{CompactList}\item |
---|
107 | \hypertarget{classepdf_7fb94ce90d1ac7077d29f7d6a6c3e0a5}{ |
---|
108 | void \hyperlink{classepdf_7fb94ce90d1ac7077d29f7d6a6c3e0a5}{\_\-renewrv} (const \hyperlink{classRV}{RV} \&in\_\-rv)} |
---|
109 | \label{classepdf_7fb94ce90d1ac7077d29f7d6a6c3e0a5} |
---|
110 | |
---|
111 | \begin{CompactList}\small\item\em modifier function - useful when copying epdfs \item\end{CompactList}\end{CompactItemize} |
---|
112 | \subsection*{Protected Attributes} |
---|
113 | \begin{CompactItemize} |
---|
114 | \item |
---|
115 | \hypertarget{classegamma_376cebd8932546c440f21b182910b01b}{ |
---|
116 | vec \hyperlink{classegamma_376cebd8932546c440f21b182910b01b}{alpha}} |
---|
117 | \label{classegamma_376cebd8932546c440f21b182910b01b} |
---|
118 | |
---|
119 | \begin{CompactList}\small\item\em Vector $\alpha$. \item\end{CompactList}\item |
---|
120 | \hypertarget{classegamma_cfc5f136467488a421ab22f886323790}{ |
---|
121 | vec \hyperlink{classegamma_cfc5f136467488a421ab22f886323790}{beta}} |
---|
122 | \label{classegamma_cfc5f136467488a421ab22f886323790} |
---|
123 | |
---|
124 | \begin{CompactList}\small\item\em Vector $\beta$. \item\end{CompactList}\item |
---|
125 | \hypertarget{classepdf_74da992e3f5d598da8850b646b79b9d9}{ |
---|
126 | \hyperlink{classRV}{RV} \hyperlink{classepdf_74da992e3f5d598da8850b646b79b9d9}{rv}} |
---|
127 | \label{classepdf_74da992e3f5d598da8850b646b79b9d9} |
---|
128 | |
---|
129 | \begin{CompactList}\small\item\em Identified of the random variable. \item\end{CompactList}\end{CompactItemize} |
---|
130 | |
---|
131 | |
---|
132 | \subsection{Detailed Description} |
---|
133 | Gamma posterior density. |
---|
134 | |
---|
135 | Multivariate Gamma density as product of independent univariate densities. \[ f(x|\alpha,\beta) = \prod f(x_i|\alpha_i,\beta_i) \] |
---|
136 | |
---|
137 | The documentation for this class was generated from the following files:\begin{CompactItemize} |
---|
138 | \item |
---|
139 | work/git/mixpp/bdm/stat/\hyperlink{libEF_8h}{libEF.h}\item |
---|
140 | work/git/mixpp/bdm/stat/libEF.cpp\end{CompactItemize} |
---|