[261] | 1 | \hypertarget{classbdm_1_1mgamma}{ |
---|
| 2 | \section{bdm::mgamma Class Reference} |
---|
| 3 | \label{classbdm_1_1mgamma}\index{bdm::mgamma@{bdm::mgamma}} |
---|
| 4 | } |
---|
| 5 | {\tt \#include $<$libEF.h$>$} |
---|
| 6 | |
---|
[271] | 7 | Inheritance diagram for bdm::mgamma::\begin{figure}[H] |
---|
[261] | 8 | \begin{center} |
---|
| 9 | \leavevmode |
---|
[271] | 10 | \includegraphics[height=5cm]{classbdm_1_1mgamma} |
---|
[261] | 11 | \end{center} |
---|
| 12 | \end{figure} |
---|
[270] | 13 | |
---|
| 14 | |
---|
| 15 | \subsection{Detailed Description} |
---|
| 16 | Gamma random walk. |
---|
| 17 | |
---|
| 18 | Mean value, $\mu$, of this density is given by {\tt rvc} . Standard deviation of the random walk is proportional to one $k$-th the mean. This is achieved by setting $\alpha=k$ and $\beta=k/\mu$. |
---|
| 19 | |
---|
| 20 | The standard deviation of the walk is then: $\mu/\sqrt(k)$. \subsection*{Public Member Functions} |
---|
[261] | 21 | \begin{CompactItemize} |
---|
| 22 | \item |
---|
[270] | 23 | \hypertarget{classbdm_1_1mgamma_1a9dc8661e5b214a8185d6e6b9956eb1}{ |
---|
| 24 | \hyperlink{classbdm_1_1mgamma_1a9dc8661e5b214a8185d6e6b9956eb1}{mgamma} ()} |
---|
| 25 | \label{classbdm_1_1mgamma_1a9dc8661e5b214a8185d6e6b9956eb1} |
---|
[261] | 26 | |
---|
| 27 | \begin{CompactList}\small\item\em Constructor. \item\end{CompactList}\item |
---|
[271] | 28 | \hypertarget{classbdm_1_1mgamma_a0f21c2557b233a85838b497d040ab14}{ |
---|
| 29 | void \hyperlink{classbdm_1_1mgamma_a0f21c2557b233a85838b497d040ab14}{set\_\-parameters} (double \hyperlink{classbdm_1_1mgamma_b20cf88cca1fe9b0b8f2a412608bfd09}{k}, const vec \&beta0)} |
---|
| 30 | \label{classbdm_1_1mgamma_a0f21c2557b233a85838b497d040ab14} |
---|
[261] | 31 | |
---|
| 32 | \begin{CompactList}\small\item\em Set value of {\tt k}. \item\end{CompactList}\item |
---|
| 33 | \hypertarget{classbdm_1_1mgamma_8996500f1885e39cde30221b20900bff}{ |
---|
| 34 | void \hyperlink{classbdm_1_1mgamma_8996500f1885e39cde30221b20900bff}{condition} (const vec \&val)} |
---|
| 35 | \label{classbdm_1_1mgamma_8996500f1885e39cde30221b20900bff} |
---|
| 36 | |
---|
[270] | 37 | \begin{CompactList}\small\item\em Update {\tt ep} so that it represents this \hyperlink{classbdm_1_1mpdf}{mpdf} conditioned on {\tt rvc} = cond. \item\end{CompactList}\end{CompactItemize} |
---|
| 38 | \begin{Indent}{\bf Matematical operations}\par |
---|
| 39 | \begin{CompactItemize} |
---|
| 40 | \item |
---|
[269] | 41 | virtual vec \hyperlink{classbdm_1_1mpdf_f0c1db6fcbb3aae2dd6123884457a367}{samplecond} (const vec \&cond) |
---|
[261] | 42 | \begin{CompactList}\small\item\em Returns a sample from the density conditioned on {\tt cond}, $x \sim epdf(rv|cond)$. \item\end{CompactList}\item |
---|
[270] | 43 | virtual mat \hyperlink{classbdm_1_1mpdf_afe4185b26baeb03688202e254d3b005}{samplecond\_\-m} (const vec \&cond, int N) |
---|
[261] | 44 | \begin{CompactList}\small\item\em Returns. \item\end{CompactList}\item |
---|
| 45 | \hypertarget{classbdm_1_1mpdf_6336a8a72462e2a56a3989a220f18b1b}{ |
---|
| 46 | virtual double \hyperlink{classbdm_1_1mpdf_6336a8a72462e2a56a3989a220f18b1b}{evallogcond} (const vec \&dt, const vec \&cond)} |
---|
| 47 | \label{classbdm_1_1mpdf_6336a8a72462e2a56a3989a220f18b1b} |
---|
| 48 | |
---|
| 49 | \begin{CompactList}\small\item\em Shortcut for conditioning and evaluation of the internal \hyperlink{classbdm_1_1epdf}{epdf}. In some cases, this operation can be implemented efficiently. \item\end{CompactList}\item |
---|
| 50 | \hypertarget{classbdm_1_1mpdf_0b0ed1ed663071bb7cf4a1349eb94fcb}{ |
---|
| 51 | virtual vec \hyperlink{classbdm_1_1mpdf_0b0ed1ed663071bb7cf4a1349eb94fcb}{evallogcond\_\-m} (const mat \&Dt, const vec \&cond)} |
---|
| 52 | \label{classbdm_1_1mpdf_0b0ed1ed663071bb7cf4a1349eb94fcb} |
---|
| 53 | |
---|
[270] | 54 | \begin{CompactList}\small\item\em Matrix version of evallogcond. \item\end{CompactList}\end{CompactItemize} |
---|
| 55 | \end{Indent} |
---|
| 56 | \begin{Indent}{\bf Access to attributes}\par |
---|
| 57 | \begin{CompactItemize} |
---|
| 58 | \item |
---|
| 59 | \hypertarget{classbdm_1_1mpdf_5571482d150fbcb72cc36f6694ce1a10}{ |
---|
| 60 | \hyperlink{classbdm_1_1RV}{RV} \textbf{\_\-rv} ()} |
---|
| 61 | \label{classbdm_1_1mpdf_5571482d150fbcb72cc36f6694ce1a10} |
---|
[261] | 62 | |
---|
[270] | 63 | \item |
---|
| 64 | \hypertarget{classbdm_1_1mpdf_26001264236846897bd11e4baad47245}{ |
---|
| 65 | \hyperlink{classbdm_1_1RV}{RV} \textbf{\_\-rvc} ()} |
---|
| 66 | \label{classbdm_1_1mpdf_26001264236846897bd11e4baad47245} |
---|
[261] | 67 | |
---|
[270] | 68 | \item |
---|
| 69 | \hypertarget{classbdm_1_1mpdf_1c2bae3e1e90874e72941863974ec0ed}{ |
---|
| 70 | int \textbf{dimension} ()} |
---|
| 71 | \label{classbdm_1_1mpdf_1c2bae3e1e90874e72941863974ec0ed} |
---|
| 72 | |
---|
| 73 | \item |
---|
| 74 | \hypertarget{classbdm_1_1mpdf_35e135910aed187b7290742f50e61bc8}{ |
---|
| 75 | int \textbf{dimensionc} ()} |
---|
| 76 | \label{classbdm_1_1mpdf_35e135910aed187b7290742f50e61bc8} |
---|
| 77 | |
---|
| 78 | \item |
---|
[261] | 79 | \hypertarget{classbdm_1_1mpdf_1892fe3933488942253679f068e9e7f6}{ |
---|
[270] | 80 | \hyperlink{classbdm_1_1epdf}{epdf} \& \textbf{\_\-epdf} ()} |
---|
[261] | 81 | \label{classbdm_1_1mpdf_1892fe3933488942253679f068e9e7f6} |
---|
| 82 | |
---|
[270] | 83 | \item |
---|
[261] | 84 | \hypertarget{classbdm_1_1mpdf_05e843fd11c410a99dad2b88c55aca80}{ |
---|
[270] | 85 | \hyperlink{classbdm_1_1epdf}{epdf} $\ast$ \textbf{\_\-e} ()} |
---|
[261] | 86 | \label{classbdm_1_1mpdf_05e843fd11c410a99dad2b88c55aca80} |
---|
| 87 | |
---|
[270] | 88 | \end{CompactItemize} |
---|
| 89 | \end{Indent} |
---|
| 90 | \begin{Indent}{\bf Connection to other objects}\par |
---|
| 91 | \begin{CompactItemize} |
---|
| 92 | \item |
---|
| 93 | \hypertarget{classbdm_1_1mpdf_7631a5570e4ade1420065e8df78f4401}{ |
---|
| 94 | void \textbf{set\_\-rvc} (const \hyperlink{classbdm_1_1RV}{RV} \&rvc0)} |
---|
| 95 | \label{classbdm_1_1mpdf_7631a5570e4ade1420065e8df78f4401} |
---|
| 96 | |
---|
| 97 | \item |
---|
| 98 | \hypertarget{classbdm_1_1mpdf_18ac26bc2f96ae01ef4eb06178abbd75}{ |
---|
| 99 | void \textbf{set\_\-rv} (const \hyperlink{classbdm_1_1RV}{RV} \&rv0)} |
---|
| 100 | \label{classbdm_1_1mpdf_18ac26bc2f96ae01ef4eb06178abbd75} |
---|
| 101 | |
---|
| 102 | \item |
---|
| 103 | \hypertarget{classbdm_1_1mpdf_f8e3798150b42fd1f3e16ddbbe0e7045}{ |
---|
| 104 | bool \textbf{isnamed} ()} |
---|
| 105 | \label{classbdm_1_1mpdf_f8e3798150b42fd1f3e16ddbbe0e7045} |
---|
| 106 | |
---|
| 107 | \end{CompactItemize} |
---|
| 108 | \end{Indent} |
---|
[261] | 109 | \subsection*{Protected Attributes} |
---|
| 110 | \begin{CompactItemize} |
---|
| 111 | \item |
---|
| 112 | \hypertarget{classbdm_1_1mgamma_bdc9f1e9e03c09e91103fee269864438}{ |
---|
| 113 | \hyperlink{classbdm_1_1egamma}{egamma} \hyperlink{classbdm_1_1mgamma_bdc9f1e9e03c09e91103fee269864438}{epdf}} |
---|
| 114 | \label{classbdm_1_1mgamma_bdc9f1e9e03c09e91103fee269864438} |
---|
| 115 | |
---|
| 116 | \begin{CompactList}\small\item\em Internal \hyperlink{classbdm_1_1epdf}{epdf} that arise by conditioning on {\tt rvc}. \item\end{CompactList}\item |
---|
| 117 | \hypertarget{classbdm_1_1mgamma_b20cf88cca1fe9b0b8f2a412608bfd09}{ |
---|
| 118 | double \hyperlink{classbdm_1_1mgamma_b20cf88cca1fe9b0b8f2a412608bfd09}{k}} |
---|
| 119 | \label{classbdm_1_1mgamma_b20cf88cca1fe9b0b8f2a412608bfd09} |
---|
| 120 | |
---|
| 121 | \begin{CompactList}\small\item\em Constant $k$. \item\end{CompactList}\item |
---|
[270] | 122 | \hypertarget{classbdm_1_1mgamma_3d95f4dde9214ff6dba265e18af60312}{ |
---|
| 123 | vec \& \hyperlink{classbdm_1_1mgamma_3d95f4dde9214ff6dba265e18af60312}{\_\-beta}} |
---|
| 124 | \label{classbdm_1_1mgamma_3d95f4dde9214ff6dba265e18af60312} |
---|
[261] | 125 | |
---|
| 126 | \begin{CompactList}\small\item\em cache of epdf.beta \item\end{CompactList}\item |
---|
[270] | 127 | \hypertarget{classbdm_1_1mpdf_7c1900976ff13dbc09c9729b3bbff9e6}{ |
---|
| 128 | int \hyperlink{classbdm_1_1mpdf_7c1900976ff13dbc09c9729b3bbff9e6}{dimc}} |
---|
| 129 | \label{classbdm_1_1mpdf_7c1900976ff13dbc09c9729b3bbff9e6} |
---|
[261] | 130 | |
---|
[270] | 131 | \begin{CompactList}\small\item\em dimension of the condition \item\end{CompactList}\item |
---|
[261] | 132 | \hypertarget{classbdm_1_1mpdf_5a5f08950daa08b85b01ddf4e1c36288}{ |
---|
| 133 | \hyperlink{classbdm_1_1RV}{RV} \hyperlink{classbdm_1_1mpdf_5a5f08950daa08b85b01ddf4e1c36288}{rvc}} |
---|
| 134 | \label{classbdm_1_1mpdf_5a5f08950daa08b85b01ddf4e1c36288} |
---|
| 135 | |
---|
| 136 | \begin{CompactList}\small\item\em random variable in condition \item\end{CompactList}\item |
---|
| 137 | \hypertarget{classbdm_1_1mpdf_5eea43c56d38e4441bfb30270db949c0}{ |
---|
| 138 | \hyperlink{classbdm_1_1epdf}{epdf} $\ast$ \hyperlink{classbdm_1_1mpdf_5eea43c56d38e4441bfb30270db949c0}{ep}} |
---|
| 139 | \label{classbdm_1_1mpdf_5eea43c56d38e4441bfb30270db949c0} |
---|
| 140 | |
---|
| 141 | \begin{CompactList}\small\item\em pointer to internal \hyperlink{classbdm_1_1epdf}{epdf} \item\end{CompactList}\end{CompactItemize} |
---|
| 142 | |
---|
| 143 | |
---|
| 144 | \subsection{Member Function Documentation} |
---|
[269] | 145 | \hypertarget{classbdm_1_1mpdf_f0c1db6fcbb3aae2dd6123884457a367}{ |
---|
[261] | 146 | \index{bdm::mgamma@{bdm::mgamma}!samplecond@{samplecond}} |
---|
| 147 | \index{samplecond@{samplecond}!bdm::mgamma@{bdm::mgamma}} |
---|
[269] | 148 | \subsubsection[samplecond]{\setlength{\rightskip}{0pt plus 5cm}virtual vec bdm::mpdf::samplecond (const vec \& {\em cond})\hspace{0.3cm}{\tt \mbox{[}inline, virtual, inherited\mbox{]}}}} |
---|
| 149 | \label{classbdm_1_1mpdf_f0c1db6fcbb3aae2dd6123884457a367} |
---|
[261] | 150 | |
---|
| 151 | |
---|
| 152 | Returns a sample from the density conditioned on {\tt cond}, $x \sim epdf(rv|cond)$. |
---|
| 153 | |
---|
| 154 | \begin{Desc} |
---|
| 155 | \item[Parameters:] |
---|
| 156 | \begin{description} |
---|
[269] | 157 | \item[{\em cond}]is numeric value of {\tt rv} \end{description} |
---|
[261] | 158 | \end{Desc} |
---|
| 159 | |
---|
| 160 | |
---|
[271] | 161 | Reimplemented in \hyperlink{classbdm_1_1mprod_ee715a8013acf9892f6cb489db595555}{bdm::mprod}. |
---|
| 162 | |
---|
[269] | 163 | References bdm::mpdf::condition(), bdm::mpdf::ep, and bdm::epdf::sample(). |
---|
[261] | 164 | |
---|
[270] | 165 | Referenced by bdm::MPF$<$ BM\_\-T $>$::bayes(), bdm::PF::bayes(), and bdm::ArxDS::step().\hypertarget{classbdm_1_1mpdf_afe4185b26baeb03688202e254d3b005}{ |
---|
[261] | 166 | \index{bdm::mgamma@{bdm::mgamma}!samplecond\_\-m@{samplecond\_\-m}} |
---|
| 167 | \index{samplecond\_\-m@{samplecond\_\-m}!bdm::mgamma@{bdm::mgamma}} |
---|
[270] | 168 | \subsubsection[samplecond\_\-m]{\setlength{\rightskip}{0pt plus 5cm}virtual mat bdm::mpdf::samplecond\_\-m (const vec \& {\em cond}, \/ int {\em N})\hspace{0.3cm}{\tt \mbox{[}inline, virtual, inherited\mbox{]}}}} |
---|
| 169 | \label{classbdm_1_1mpdf_afe4185b26baeb03688202e254d3b005} |
---|
[261] | 170 | |
---|
| 171 | |
---|
| 172 | Returns. |
---|
| 173 | |
---|
| 174 | \begin{Desc} |
---|
| 175 | \item[Parameters:] |
---|
| 176 | \begin{description} |
---|
| 177 | \item[{\em N}]samples from the density conditioned on {\tt cond}, $x \sim epdf(rv|cond)$. \item[{\em cond}]is numeric value of {\tt rv} \item[{\em ll}]is a return value of log-likelihood of the sample. \end{description} |
---|
| 178 | \end{Desc} |
---|
| 179 | |
---|
| 180 | |
---|
[270] | 181 | References bdm::mpdf::condition(), bdm::epdf::dimension(), bdm::mpdf::ep, and bdm::epdf::sample(). |
---|
[261] | 182 | |
---|
| 183 | The documentation for this class was generated from the following files:\begin{CompactItemize} |
---|
| 184 | \item |
---|
| 185 | \hyperlink{libEF_8h}{libEF.h}\item |
---|
| 186 | libEF.cpp\end{CompactItemize} |
---|