[261] | 1 | \hypertarget{classbdm_1_1migamma}{ |
---|
| 2 | \section{bdm::migamma Class Reference} |
---|
| 3 | \label{classbdm_1_1migamma}\index{bdm::migamma@{bdm::migamma}} |
---|
| 4 | } |
---|
| 5 | Inverse-Gamma random walk. |
---|
| 6 | |
---|
| 7 | |
---|
| 8 | {\tt \#include $<$libEF.h$>$} |
---|
| 9 | |
---|
| 10 | Inheritance diagram for bdm::migamma:\nopagebreak |
---|
| 11 | \begin{figure}[H] |
---|
| 12 | \begin{center} |
---|
| 13 | \leavevmode |
---|
| 14 | \includegraphics[width=76pt]{classbdm_1_1migamma__inherit__graph} |
---|
| 15 | \end{center} |
---|
| 16 | \end{figure} |
---|
| 17 | Collaboration diagram for bdm::migamma:\nopagebreak |
---|
| 18 | \begin{figure}[H] |
---|
| 19 | \begin{center} |
---|
| 20 | \leavevmode |
---|
| 21 | \includegraphics[height=400pt]{classbdm_1_1migamma__coll__graph} |
---|
| 22 | \end{center} |
---|
| 23 | \end{figure} |
---|
| 24 | \subsection*{Public Member Functions} |
---|
| 25 | \begin{CompactItemize} |
---|
| 26 | \item |
---|
| 27 | \hypertarget{classbdm_1_1migamma_07c5970da0e578ce8a428f1ebf46a459}{ |
---|
| 28 | \hyperlink{classbdm_1_1migamma_07c5970da0e578ce8a428f1ebf46a459}{migamma} (const \hyperlink{classbdm_1_1RV}{RV} \&\hyperlink{classbdm_1_1mpdf_9bcfb45435d30983f436d41c298cbb51}{rv}, const \hyperlink{classbdm_1_1RV}{RV} \&\hyperlink{classbdm_1_1mpdf_5a5f08950daa08b85b01ddf4e1c36288}{rvc})} |
---|
| 29 | \label{classbdm_1_1migamma_07c5970da0e578ce8a428f1ebf46a459} |
---|
| 30 | |
---|
| 31 | \begin{CompactList}\small\item\em Constructor. \item\end{CompactList}\item |
---|
| 32 | \hypertarget{classbdm_1_1migamma_1d7023b1565551d0260eb1ba832bebaf}{ |
---|
| 33 | void \hyperlink{classbdm_1_1migamma_1d7023b1565551d0260eb1ba832bebaf}{set\_\-parameters} (double k0)} |
---|
| 34 | \label{classbdm_1_1migamma_1d7023b1565551d0260eb1ba832bebaf} |
---|
| 35 | |
---|
| 36 | \begin{CompactList}\small\item\em Set value of {\tt k}. \item\end{CompactList}\item |
---|
| 37 | \hypertarget{classbdm_1_1migamma_7a34b1e2e3aa2250d7c0ed7df1665b8c}{ |
---|
| 38 | void \hyperlink{classbdm_1_1migamma_7a34b1e2e3aa2250d7c0ed7df1665b8c}{condition} (const vec \&val)} |
---|
| 39 | \label{classbdm_1_1migamma_7a34b1e2e3aa2250d7c0ed7df1665b8c} |
---|
| 40 | |
---|
| 41 | \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}\item |
---|
| 42 | virtual vec \hyperlink{classbdm_1_1mpdf_e4848a428d8ef0549c6e4a9ed386d9f2}{samplecond} (const vec \&cond, double \&ll) |
---|
| 43 | \begin{CompactList}\small\item\em Returns a sample from the density conditioned on {\tt cond}, $x \sim epdf(rv|cond)$. \item\end{CompactList}\item |
---|
| 44 | virtual mat \hyperlink{classbdm_1_1mpdf_ee26963a637b2ea1fb1933652981e652}{samplecond\_\-m} (const vec \&cond, vec \&ll, int N) |
---|
| 45 | \begin{CompactList}\small\item\em Returns. \item\end{CompactList}\item |
---|
| 46 | \hypertarget{classbdm_1_1mpdf_6336a8a72462e2a56a3989a220f18b1b}{ |
---|
| 47 | virtual double \hyperlink{classbdm_1_1mpdf_6336a8a72462e2a56a3989a220f18b1b}{evallogcond} (const vec \&dt, const vec \&cond)} |
---|
| 48 | \label{classbdm_1_1mpdf_6336a8a72462e2a56a3989a220f18b1b} |
---|
| 49 | |
---|
| 50 | \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 |
---|
| 51 | \hypertarget{classbdm_1_1mpdf_0b0ed1ed663071bb7cf4a1349eb94fcb}{ |
---|
| 52 | virtual vec \hyperlink{classbdm_1_1mpdf_0b0ed1ed663071bb7cf4a1349eb94fcb}{evallogcond\_\-m} (const mat \&Dt, const vec \&cond)} |
---|
| 53 | \label{classbdm_1_1mpdf_0b0ed1ed663071bb7cf4a1349eb94fcb} |
---|
| 54 | |
---|
| 55 | \begin{CompactList}\small\item\em Matrix version of evallogcond. \item\end{CompactList}\item |
---|
| 56 | \hypertarget{classbdm_1_1mpdf_b3aba7311038bf990d706a64cab60cf8}{ |
---|
| 57 | \hyperlink{classbdm_1_1RV}{RV} \hyperlink{classbdm_1_1mpdf_b3aba7311038bf990d706a64cab60cf8}{\_\-rvc} () const } |
---|
| 58 | \label{classbdm_1_1mpdf_b3aba7311038bf990d706a64cab60cf8} |
---|
| 59 | |
---|
| 60 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
---|
| 61 | \hypertarget{classbdm_1_1mpdf_222d5280e309c5a053ba73841e98c151}{ |
---|
| 62 | \hyperlink{classbdm_1_1RV}{RV} \hyperlink{classbdm_1_1mpdf_222d5280e309c5a053ba73841e98c151}{\_\-rv} () const } |
---|
| 63 | \label{classbdm_1_1mpdf_222d5280e309c5a053ba73841e98c151} |
---|
| 64 | |
---|
| 65 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
---|
| 66 | \hypertarget{classbdm_1_1mpdf_1892fe3933488942253679f068e9e7f6}{ |
---|
| 67 | \hyperlink{classbdm_1_1epdf}{epdf} \& \hyperlink{classbdm_1_1mpdf_1892fe3933488942253679f068e9e7f6}{\_\-epdf} ()} |
---|
| 68 | \label{classbdm_1_1mpdf_1892fe3933488942253679f068e9e7f6} |
---|
| 69 | |
---|
| 70 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\item |
---|
| 71 | \hypertarget{classbdm_1_1mpdf_05e843fd11c410a99dad2b88c55aca80}{ |
---|
| 72 | \hyperlink{classbdm_1_1epdf}{epdf} $\ast$ \hyperlink{classbdm_1_1mpdf_05e843fd11c410a99dad2b88c55aca80}{\_\-e} ()} |
---|
| 73 | \label{classbdm_1_1mpdf_05e843fd11c410a99dad2b88c55aca80} |
---|
| 74 | |
---|
| 75 | \begin{CompactList}\small\item\em access function \item\end{CompactList}\end{CompactItemize} |
---|
| 76 | \subsection*{Protected Attributes} |
---|
| 77 | \begin{CompactItemize} |
---|
| 78 | \item |
---|
| 79 | \hypertarget{classbdm_1_1migamma_a31b39d4179551b593c9e0d7d756783a}{ |
---|
| 80 | \hyperlink{classbdm_1_1eigamma}{eigamma} \hyperlink{classbdm_1_1migamma_a31b39d4179551b593c9e0d7d756783a}{epdf}} |
---|
| 81 | \label{classbdm_1_1migamma_a31b39d4179551b593c9e0d7d756783a} |
---|
| 82 | |
---|
| 83 | \begin{CompactList}\small\item\em Internal \hyperlink{classbdm_1_1epdf}{epdf} that arise by conditioning on {\tt rvc}. \item\end{CompactList}\item |
---|
| 84 | \hypertarget{classbdm_1_1migamma_dc56bc9da542e0103ec16b9be8e5e38c}{ |
---|
| 85 | double \hyperlink{classbdm_1_1migamma_dc56bc9da542e0103ec16b9be8e5e38c}{k}} |
---|
| 86 | \label{classbdm_1_1migamma_dc56bc9da542e0103ec16b9be8e5e38c} |
---|
| 87 | |
---|
| 88 | \begin{CompactList}\small\item\em Constant $k$. \item\end{CompactList}\item |
---|
| 89 | \hypertarget{classbdm_1_1migamma_4825c0ef11a148bad9b802a496f56f96}{ |
---|
| 90 | vec $\ast$ \hyperlink{classbdm_1_1migamma_4825c0ef11a148bad9b802a496f56f96}{\_\-beta}} |
---|
| 91 | \label{classbdm_1_1migamma_4825c0ef11a148bad9b802a496f56f96} |
---|
| 92 | |
---|
| 93 | \begin{CompactList}\small\item\em cache of epdf.beta \item\end{CompactList}\item |
---|
| 94 | \hypertarget{classbdm_1_1migamma_b6c265b132ff79963bf51dff4c3ef252}{ |
---|
| 95 | vec $\ast$ \hyperlink{classbdm_1_1migamma_b6c265b132ff79963bf51dff4c3ef252}{\_\-alpha}} |
---|
| 96 | \label{classbdm_1_1migamma_b6c265b132ff79963bf51dff4c3ef252} |
---|
| 97 | |
---|
| 98 | \begin{CompactList}\small\item\em chaceh of epdf.alpha \item\end{CompactList}\item |
---|
| 99 | \hypertarget{classbdm_1_1mpdf_9bcfb45435d30983f436d41c298cbb51}{ |
---|
| 100 | \hyperlink{classbdm_1_1RV}{RV} \hyperlink{classbdm_1_1mpdf_9bcfb45435d30983f436d41c298cbb51}{rv}} |
---|
| 101 | \label{classbdm_1_1mpdf_9bcfb45435d30983f436d41c298cbb51} |
---|
| 102 | |
---|
| 103 | \begin{CompactList}\small\item\em modeled random variable \item\end{CompactList}\item |
---|
| 104 | \hypertarget{classbdm_1_1mpdf_5a5f08950daa08b85b01ddf4e1c36288}{ |
---|
| 105 | \hyperlink{classbdm_1_1RV}{RV} \hyperlink{classbdm_1_1mpdf_5a5f08950daa08b85b01ddf4e1c36288}{rvc}} |
---|
| 106 | \label{classbdm_1_1mpdf_5a5f08950daa08b85b01ddf4e1c36288} |
---|
| 107 | |
---|
| 108 | \begin{CompactList}\small\item\em random variable in condition \item\end{CompactList}\item |
---|
| 109 | \hypertarget{classbdm_1_1mpdf_5eea43c56d38e4441bfb30270db949c0}{ |
---|
| 110 | \hyperlink{classbdm_1_1epdf}{epdf} $\ast$ \hyperlink{classbdm_1_1mpdf_5eea43c56d38e4441bfb30270db949c0}{ep}} |
---|
| 111 | \label{classbdm_1_1mpdf_5eea43c56d38e4441bfb30270db949c0} |
---|
| 112 | |
---|
| 113 | \begin{CompactList}\small\item\em pointer to internal \hyperlink{classbdm_1_1epdf}{epdf} \item\end{CompactList}\end{CompactItemize} |
---|
| 114 | |
---|
| 115 | |
---|
| 116 | \subsection{Detailed Description} |
---|
| 117 | Inverse-Gamma random walk. |
---|
| 118 | |
---|
| 119 | 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=\mu/k+2$ and $\beta=\mu(\alpha-1)$. |
---|
| 120 | |
---|
| 121 | The standard deviation of the walk is then: $\mu/\sqrt(k)$. |
---|
| 122 | |
---|
| 123 | \subsection{Member Function Documentation} |
---|
| 124 | \hypertarget{classbdm_1_1mpdf_e4848a428d8ef0549c6e4a9ed386d9f2}{ |
---|
| 125 | \index{bdm::migamma@{bdm::migamma}!samplecond@{samplecond}} |
---|
| 126 | \index{samplecond@{samplecond}!bdm::migamma@{bdm::migamma}} |
---|
| 127 | \subsubsection[samplecond]{\setlength{\rightskip}{0pt plus 5cm}virtual vec bdm::mpdf::samplecond (const vec \& {\em cond}, \/ double \& {\em ll})\hspace{0.3cm}{\tt \mbox{[}inline, virtual, inherited\mbox{]}}}} |
---|
| 128 | \label{classbdm_1_1mpdf_e4848a428d8ef0549c6e4a9ed386d9f2} |
---|
| 129 | |
---|
| 130 | |
---|
| 131 | Returns a sample from the density conditioned on {\tt cond}, $x \sim epdf(rv|cond)$. |
---|
| 132 | |
---|
| 133 | \begin{Desc} |
---|
| 134 | \item[Parameters:] |
---|
| 135 | \begin{description} |
---|
| 136 | \item[{\em cond}]is numeric value of {\tt rv} \item[{\em ll}]is a return value of log-likelihood of the sample. \end{description} |
---|
| 137 | \end{Desc} |
---|
| 138 | |
---|
| 139 | |
---|
| 140 | Reimplemented in \hyperlink{classbdm_1_1mprod_1a37c2aaba8bde7fce5351c39b6e1168}{bdm::mprod}. |
---|
| 141 | |
---|
| 142 | References bdm::mpdf::condition(), bdm::mpdf::ep, bdm::epdf::evallog(), and bdm::epdf::sample(). |
---|
| 143 | |
---|
| 144 | Referenced by bdm::MPF$<$ BM\_\-T $>$::bayes(), bdm::PF::bayes(), and bdm::ArxDS::step().\hypertarget{classbdm_1_1mpdf_ee26963a637b2ea1fb1933652981e652}{ |
---|
| 145 | \index{bdm::migamma@{bdm::migamma}!samplecond\_\-m@{samplecond\_\-m}} |
---|
| 146 | \index{samplecond\_\-m@{samplecond\_\-m}!bdm::migamma@{bdm::migamma}} |
---|
| 147 | \subsubsection[samplecond\_\-m]{\setlength{\rightskip}{0pt plus 5cm}virtual mat bdm::mpdf::samplecond\_\-m (const vec \& {\em cond}, \/ vec \& {\em ll}, \/ int {\em N})\hspace{0.3cm}{\tt \mbox{[}inline, virtual, inherited\mbox{]}}}} |
---|
| 148 | \label{classbdm_1_1mpdf_ee26963a637b2ea1fb1933652981e652} |
---|
| 149 | |
---|
| 150 | |
---|
| 151 | Returns. |
---|
| 152 | |
---|
| 153 | \begin{Desc} |
---|
| 154 | \item[Parameters:] |
---|
| 155 | \begin{description} |
---|
| 156 | \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} |
---|
| 157 | \end{Desc} |
---|
| 158 | |
---|
| 159 | |
---|
| 160 | References bdm::mpdf::condition(), bdm::RV::count(), bdm::mpdf::ep, bdm::epdf::evallog(), bdm::mpdf::rv, and bdm::epdf::sample(). |
---|
| 161 | |
---|
| 162 | The documentation for this class was generated from the following file:\begin{CompactItemize} |
---|
| 163 | \item |
---|
| 164 | \hyperlink{libEF_8h}{libEF.h}\end{CompactItemize} |
---|