[172] | 1 | \hypertarget{classeDirich}{ |
---|
| 2 | \section{eDirich Class Reference} |
---|
| 3 | \label{classeDirich}\index{eDirich@{eDirich}} |
---|
| 4 | } |
---|
| 5 | Dirichlet posterior density. |
---|
| 6 | |
---|
| 7 | |
---|
| 8 | {\tt \#include $<$libEF.h$>$} |
---|
| 9 | |
---|
| 10 | Inheritance diagram for eDirich:\nopagebreak |
---|
| 11 | \begin{figure}[H] |
---|
| 12 | \begin{center} |
---|
| 13 | \leavevmode |
---|
| 14 | \includegraphics[width=46pt]{classeDirich__inherit__graph} |
---|
| 15 | \end{center} |
---|
| 16 | \end{figure} |
---|
| 17 | Collaboration diagram for eDirich:\nopagebreak |
---|
| 18 | \begin{figure}[H] |
---|
| 19 | \begin{center} |
---|
| 20 | \leavevmode |
---|
| 21 | \includegraphics[width=46pt]{classeDirich__coll__graph} |
---|
| 22 | \end{center} |
---|
| 23 | \end{figure} |
---|
| 24 | \subsection*{Public Member Functions} |
---|
| 25 | \begin{CompactItemize} |
---|
| 26 | \item |
---|
| 27 | \hypertarget{classeDirich_ac7e6116f3575c3860d07355e96cd4af}{ |
---|
| 28 | \hyperlink{classeDirich_ac7e6116f3575c3860d07355e96cd4af}{eDirich} (const \hyperlink{classRV}{RV} \&\hyperlink{classepdf_74da992e3f5d598da8850b646b79b9d9}{rv}, const vec \&beta0)} |
---|
| 29 | \label{classeDirich_ac7e6116f3575c3860d07355e96cd4af} |
---|
| 30 | |
---|
| 31 | \begin{CompactList}\small\item\em Default constructor. \item\end{CompactList}\item |
---|
| 32 | \hypertarget{classeDirich_55cccbc5eb44764dce722567acf5fd58}{ |
---|
| 33 | \hyperlink{classeDirich_55cccbc5eb44764dce722567acf5fd58}{eDirich} (const \hyperlink{classeDirich}{eDirich} \&D0)} |
---|
| 34 | \label{classeDirich_55cccbc5eb44764dce722567acf5fd58} |
---|
| 35 | |
---|
| 36 | \begin{CompactList}\small\item\em Copy constructor. \item\end{CompactList}\item |
---|
| 37 | \hypertarget{classeDirich_23dff79110822e9639343fe8e177fd80}{ |
---|
| 38 | vec \hyperlink{classeDirich_23dff79110822e9639343fe8e177fd80}{sample} () const } |
---|
| 39 | \label{classeDirich_23dff79110822e9639343fe8e177fd80} |
---|
| 40 | |
---|
| 41 | \begin{CompactList}\small\item\em Returns a sample, $x$ from density $epdf(rv)$. \item\end{CompactList}\item |
---|
| 42 | \hypertarget{classeDirich_4206e1da149d51ff3b663c9241096b73}{ |
---|
| 43 | vec \hyperlink{classeDirich_4206e1da149d51ff3b663c9241096b73}{mean} () const } |
---|
| 44 | \label{classeDirich_4206e1da149d51ff3b663c9241096b73} |
---|
| 45 | |
---|
| 46 | \begin{CompactList}\small\item\em return expected value \item\end{CompactList}\item |
---|
| 47 | \hypertarget{classeDirich_688a24f04be6d80d4769cf0e4ded7acc}{ |
---|
| 48 | double \hyperlink{classeDirich_688a24f04be6d80d4769cf0e4ded7acc}{evalpdflog\_\-nn} (const vec \&val) const } |
---|
| 49 | \label{classeDirich_688a24f04be6d80d4769cf0e4ded7acc} |
---|
| 50 | |
---|
[180] | 51 | \begin{CompactList}\small\item\em In this instance, val is ... \item\end{CompactList}\item |
---|
[172] | 52 | \hypertarget{classeDirich_7ce60be7119ffc639ede4e583c1f6e77}{ |
---|
| 53 | double \hyperlink{classeDirich_7ce60be7119ffc639ede4e583c1f6e77}{lognc} () const } |
---|
| 54 | \label{classeDirich_7ce60be7119ffc639ede4e583c1f6e77} |
---|
| 55 | |
---|
| 56 | \begin{CompactList}\small\item\em logarithm of the normalizing constant, $\mathcal{I}$ \item\end{CompactList}\item |
---|
| 57 | \hypertarget{classeDirich_6409d0362143a23976b43641ff19e53a}{ |
---|
| 58 | vec \& \hyperlink{classeDirich_6409d0362143a23976b43641ff19e53a}{\_\-beta} ()} |
---|
| 59 | \label{classeDirich_6409d0362143a23976b43641ff19e53a} |
---|
| 60 | |
---|
| 61 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
---|
[180] | 62 | \hypertarget{classeDirich_c842acb2e1cce5cc9000769ff06c086d}{ |
---|
| 63 | void \hyperlink{classeDirich_c842acb2e1cce5cc9000769ff06c086d}{set\_\-parameters} (const vec \&beta0)} |
---|
| 64 | \label{classeDirich_c842acb2e1cce5cc9000769ff06c086d} |
---|
| 65 | |
---|
| 66 | \begin{CompactList}\small\item\em Set internal parameters. \item\end{CompactList}\item |
---|
[172] | 67 | \hypertarget{classeEF_a89bef8996410609004fa019b5b48964}{ |
---|
| 68 | virtual void \hyperlink{classeEF_a89bef8996410609004fa019b5b48964}{dupdate} (mat \&v)} |
---|
| 69 | \label{classeEF_a89bef8996410609004fa019b5b48964} |
---|
| 70 | |
---|
| 71 | \begin{CompactList}\small\item\em TODO decide if it is really needed. \item\end{CompactList}\item |
---|
| 72 | \hypertarget{classeEF_6466e8d4aa9dd64698ed288cbb1afc03}{ |
---|
| 73 | virtual double \hyperlink{classeEF_6466e8d4aa9dd64698ed288cbb1afc03}{evalpdflog} (const vec \&val) const } |
---|
| 74 | \label{classeEF_6466e8d4aa9dd64698ed288cbb1afc03} |
---|
| 75 | |
---|
| 76 | \begin{CompactList}\small\item\em Evaluate normalized log-probability. \item\end{CompactList}\item |
---|
| 77 | \hypertarget{classeEF_c71faf4b2d153efda14bf1f87dca1507}{ |
---|
| 78 | virtual vec \hyperlink{classeEF_c71faf4b2d153efda14bf1f87dca1507}{evalpdflog} (const mat \&Val) const } |
---|
| 79 | \label{classeEF_c71faf4b2d153efda14bf1f87dca1507} |
---|
| 80 | |
---|
| 81 | \begin{CompactList}\small\item\em Evaluate normalized log-probability for many samples. \item\end{CompactList}\item |
---|
| 82 | \hypertarget{classeEF_4f8385dd1cc9740522dc373b1dc3cbf5}{ |
---|
| 83 | virtual void \hyperlink{classeEF_4f8385dd1cc9740522dc373b1dc3cbf5}{pow} (double p)} |
---|
| 84 | \label{classeEF_4f8385dd1cc9740522dc373b1dc3cbf5} |
---|
| 85 | |
---|
| 86 | \begin{CompactList}\small\item\em Power of the density, used e.g. to flatten the density. \item\end{CompactList}\item |
---|
| 87 | \hypertarget{classepdf_54d7dd53a641b618771cd9bee135181f}{ |
---|
| 88 | virtual mat \hyperlink{classepdf_54d7dd53a641b618771cd9bee135181f}{sampleN} (int N) const } |
---|
| 89 | \label{classepdf_54d7dd53a641b618771cd9bee135181f} |
---|
| 90 | |
---|
| 91 | \begin{CompactList}\small\item\em Returns N samples from density $epdf(rv)$. \item\end{CompactList}\item |
---|
| 92 | \hypertarget{classepdf_3ea597362e11a0040fe7c990269d072c}{ |
---|
| 93 | virtual double \hyperlink{classepdf_3ea597362e11a0040fe7c990269d072c}{eval} (const vec \&val) const } |
---|
| 94 | \label{classepdf_3ea597362e11a0040fe7c990269d072c} |
---|
| 95 | |
---|
| 96 | \begin{CompactList}\small\item\em Compute probability of argument {\tt val}. \item\end{CompactList}\item |
---|
[180] | 97 | \hypertarget{classepdf_cebbdd7a85e6328f7358fc0ba8eee06c}{ |
---|
| 98 | virtual vec \hyperlink{classepdf_cebbdd7a85e6328f7358fc0ba8eee06c}{evalpdflog\_\-m} (const mat \&Val) const } |
---|
| 99 | \label{classepdf_cebbdd7a85e6328f7358fc0ba8eee06c} |
---|
| 100 | |
---|
| 101 | \begin{CompactList}\small\item\em Compute log-probability of multiple values argument {\tt val}. \item\end{CompactList}\item |
---|
[181] | 102 | \hypertarget{classepdf_3ba08c0e788deff22134c049b9269666}{ |
---|
| 103 | \hyperlink{classmpdf}{mpdf} $\ast$ \hyperlink{classepdf_3ba08c0e788deff22134c049b9269666}{condition} (const \hyperlink{classRV}{RV} \&\hyperlink{classepdf_74da992e3f5d598da8850b646b79b9d9}{rv})} |
---|
| 104 | \label{classepdf_3ba08c0e788deff22134c049b9269666} |
---|
| 105 | |
---|
| 106 | \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 |
---|
| 107 | \hypertarget{classepdf_bc0c171b6dafacd78d26263913b1d0c0}{ |
---|
| 108 | \hyperlink{classepdf}{epdf} $\ast$ \hyperlink{classepdf_bc0c171b6dafacd78d26263913b1d0c0}{marginal} (const \hyperlink{classRV}{RV} \&\hyperlink{classepdf_74da992e3f5d598da8850b646b79b9d9}{rv})} |
---|
| 109 | \label{classepdf_bc0c171b6dafacd78d26263913b1d0c0} |
---|
| 110 | |
---|
| 111 | \begin{CompactList}\small\item\em Return marginal density on the given \hyperlink{classRV}{RV}, the remainig rvs are intergrated out. \item\end{CompactList}\item |
---|
[172] | 112 | \hypertarget{classepdf_ca0d32aabb4cbba347e0c37fe8607562}{ |
---|
| 113 | const \hyperlink{classRV}{RV} \& \hyperlink{classepdf_ca0d32aabb4cbba347e0c37fe8607562}{\_\-rv} () const } |
---|
| 114 | \label{classepdf_ca0d32aabb4cbba347e0c37fe8607562} |
---|
| 115 | |
---|
| 116 | \begin{CompactList}\small\item\em access function, possibly dangerous! \item\end{CompactList}\item |
---|
| 117 | \hypertarget{classepdf_7fb94ce90d1ac7077d29f7d6a6c3e0a5}{ |
---|
| 118 | void \hyperlink{classepdf_7fb94ce90d1ac7077d29f7d6a6c3e0a5}{\_\-renewrv} (const \hyperlink{classRV}{RV} \&in\_\-rv)} |
---|
| 119 | \label{classepdf_7fb94ce90d1ac7077d29f7d6a6c3e0a5} |
---|
| 120 | |
---|
| 121 | \begin{CompactList}\small\item\em modifier function - useful when copying epdfs \item\end{CompactList}\end{CompactItemize} |
---|
| 122 | \subsection*{Protected Attributes} |
---|
| 123 | \begin{CompactItemize} |
---|
| 124 | \item |
---|
| 125 | \hypertarget{classeDirich_15e6b65e9595eedc8a1286c6cecd36d7}{ |
---|
| 126 | vec \hyperlink{classeDirich_15e6b65e9595eedc8a1286c6cecd36d7}{beta}} |
---|
| 127 | \label{classeDirich_15e6b65e9595eedc8a1286c6cecd36d7} |
---|
| 128 | |
---|
| 129 | \begin{CompactList}\small\item\em sufficient statistics \item\end{CompactList}\item |
---|
| 130 | \hypertarget{classepdf_74da992e3f5d598da8850b646b79b9d9}{ |
---|
| 131 | \hyperlink{classRV}{RV} \hyperlink{classepdf_74da992e3f5d598da8850b646b79b9d9}{rv}} |
---|
| 132 | \label{classepdf_74da992e3f5d598da8850b646b79b9d9} |
---|
| 133 | |
---|
| 134 | \begin{CompactList}\small\item\em Identified of the random variable. \item\end{CompactList}\end{CompactItemize} |
---|
| 135 | |
---|
| 136 | |
---|
| 137 | \subsection{Detailed Description} |
---|
| 138 | Dirichlet posterior density. |
---|
| 139 | |
---|
| 140 | Continuous 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$. |
---|
| 141 | |
---|
| 142 | The documentation for this class was generated from the following file:\begin{CompactItemize} |
---|
| 143 | \item |
---|
| 144 | work/git/mixpp/bdm/stat/\hyperlink{libEF_8h}{libEF.h}\end{CompactItemize} |
---|