| 1 | \hypertarget{classbdm_1_1migamma__fix}{ |
|---|
| 2 | \section{bdm::migamma\_\-fix Class Reference} |
|---|
| 3 | \label{classbdm_1_1migamma__fix}\index{bdm::migamma\_\-fix@{bdm::migamma\_\-fix}} |
|---|
| 4 | } |
|---|
| 5 | {\tt \#include $<$libEF.h$>$} |
|---|
| 6 | |
|---|
| 7 | Inheritance diagram for bdm::migamma\_\-fix::\begin{figure}[H] |
|---|
| 8 | \begin{center} |
|---|
| 9 | \leavevmode |
|---|
| 10 | \includegraphics[height=5cm]{classbdm_1_1migamma__fix} |
|---|
| 11 | \end{center} |
|---|
| 12 | \end{figure} |
|---|
| 13 | |
|---|
| 14 | |
|---|
| 15 | \subsection{Detailed Description} |
|---|
| 16 | Inverse-Gamma random walk around a fixed point. |
|---|
| 17 | |
|---|
| 18 | Mean value, $\mu$, of this density is given by a geometric combination of {\tt rvc} and given fixed point, $p$. $l$ is the coefficient of the geometric combimation \[ \mu = \mu_{t-1} ^{l} p^{1-l}\] |
|---|
| 19 | |
|---|
| 20 | ==== Check == vv = 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$. |
|---|
| 21 | |
|---|
| 22 | The standard deviation of the walk is then: $\mu/\sqrt(k)$. \subsection*{Public Member Functions} |
|---|
| 23 | \begin{CompactItemize} |
|---|
| 24 | \item |
|---|
| 25 | \hypertarget{classbdm_1_1migamma__fix_42a61f9468b2c435386f47ae8a5ddf7e}{ |
|---|
| 26 | \hyperlink{classbdm_1_1migamma__fix_42a61f9468b2c435386f47ae8a5ddf7e}{migamma\_\-fix} ()} |
|---|
| 27 | \label{classbdm_1_1migamma__fix_42a61f9468b2c435386f47ae8a5ddf7e} |
|---|
| 28 | |
|---|
| 29 | \begin{CompactList}\small\item\em Constructor. \item\end{CompactList}\item |
|---|
| 30 | \hypertarget{classbdm_1_1migamma__fix_17f9ce1068660a4e8c05173bef7d7440}{ |
|---|
| 31 | void \hyperlink{classbdm_1_1migamma__fix_17f9ce1068660a4e8c05173bef7d7440}{set\_\-parameters} (double k0, vec ref0, double l0)} |
|---|
| 32 | \label{classbdm_1_1migamma__fix_17f9ce1068660a4e8c05173bef7d7440} |
|---|
| 33 | |
|---|
| 34 | \begin{CompactList}\small\item\em Set value of {\tt k}. \item\end{CompactList}\item |
|---|
| 35 | \hypertarget{classbdm_1_1migamma__fix_cfbabd293795d44aae1b7c874e57c4b8}{ |
|---|
| 36 | void \hyperlink{classbdm_1_1migamma__fix_cfbabd293795d44aae1b7c874e57c4b8}{condition} (const vec \&val)} |
|---|
| 37 | \label{classbdm_1_1migamma__fix_cfbabd293795d44aae1b7c874e57c4b8} |
|---|
| 38 | |
|---|
| 39 | \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 |
|---|
| 40 | \hypertarget{classbdm_1_1migamma_8b10ab922e2a7bae2fb6bb3efc7b6151}{ |
|---|
| 41 | void \hyperlink{classbdm_1_1migamma_8b10ab922e2a7bae2fb6bb3efc7b6151}{set\_\-parameters} (int len, double k0)} |
|---|
| 42 | \label{classbdm_1_1migamma_8b10ab922e2a7bae2fb6bb3efc7b6151} |
|---|
| 43 | |
|---|
| 44 | \begin{CompactList}\small\item\em Set value of {\tt k}. \item\end{CompactList}\end{CompactItemize} |
|---|
| 45 | \begin{Indent}{\bf Matematical operations}\par |
|---|
| 46 | \begin{CompactItemize} |
|---|
| 47 | \item |
|---|
| 48 | virtual vec \hyperlink{classbdm_1_1mpdf_f0c1db6fcbb3aae2dd6123884457a367}{samplecond} (const vec \&cond) |
|---|
| 49 | \begin{CompactList}\small\item\em Returns a sample from the density conditioned on {\tt cond}, $x \sim epdf(rv|cond)$. \item\end{CompactList}\item |
|---|
| 50 | virtual mat \hyperlink{classbdm_1_1mpdf_afe4185b26baeb03688202e254d3b005}{samplecond\_\-m} (const vec \&cond, int N) |
|---|
| 51 | \begin{CompactList}\small\item\em Returns. \item\end{CompactList}\item |
|---|
| 52 | \hypertarget{classbdm_1_1mpdf_6336a8a72462e2a56a3989a220f18b1b}{ |
|---|
| 53 | virtual double \hyperlink{classbdm_1_1mpdf_6336a8a72462e2a56a3989a220f18b1b}{evallogcond} (const vec \&dt, const vec \&cond)} |
|---|
| 54 | \label{classbdm_1_1mpdf_6336a8a72462e2a56a3989a220f18b1b} |
|---|
| 55 | |
|---|
| 56 | \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 |
|---|
| 57 | \hypertarget{classbdm_1_1mpdf_0b0ed1ed663071bb7cf4a1349eb94fcb}{ |
|---|
| 58 | virtual vec \hyperlink{classbdm_1_1mpdf_0b0ed1ed663071bb7cf4a1349eb94fcb}{evallogcond\_\-m} (const mat \&Dt, const vec \&cond)} |
|---|
| 59 | \label{classbdm_1_1mpdf_0b0ed1ed663071bb7cf4a1349eb94fcb} |
|---|
| 60 | |
|---|
| 61 | \begin{CompactList}\small\item\em Matrix version of evallogcond. \item\end{CompactList}\end{CompactItemize} |
|---|
| 62 | \end{Indent} |
|---|
| 63 | \begin{Indent}{\bf Access to attributes}\par |
|---|
| 64 | \begin{CompactItemize} |
|---|
| 65 | \item |
|---|
| 66 | \hypertarget{classbdm_1_1mpdf_5571482d150fbcb72cc36f6694ce1a10}{ |
|---|
| 67 | \hyperlink{classbdm_1_1RV}{RV} \textbf{\_\-rv} ()} |
|---|
| 68 | \label{classbdm_1_1mpdf_5571482d150fbcb72cc36f6694ce1a10} |
|---|
| 69 | |
|---|
| 70 | \item |
|---|
| 71 | \hypertarget{classbdm_1_1mpdf_26001264236846897bd11e4baad47245}{ |
|---|
| 72 | \hyperlink{classbdm_1_1RV}{RV} \textbf{\_\-rvc} ()} |
|---|
| 73 | \label{classbdm_1_1mpdf_26001264236846897bd11e4baad47245} |
|---|
| 74 | |
|---|
| 75 | \item |
|---|
| 76 | \hypertarget{classbdm_1_1mpdf_1c2bae3e1e90874e72941863974ec0ed}{ |
|---|
| 77 | int \textbf{dimension} ()} |
|---|
| 78 | \label{classbdm_1_1mpdf_1c2bae3e1e90874e72941863974ec0ed} |
|---|
| 79 | |
|---|
| 80 | \item |
|---|
| 81 | \hypertarget{classbdm_1_1mpdf_35e135910aed187b7290742f50e61bc8}{ |
|---|
| 82 | int \textbf{dimensionc} ()} |
|---|
| 83 | \label{classbdm_1_1mpdf_35e135910aed187b7290742f50e61bc8} |
|---|
| 84 | |
|---|
| 85 | \item |
|---|
| 86 | \hypertarget{classbdm_1_1mpdf_1892fe3933488942253679f068e9e7f6}{ |
|---|
| 87 | \hyperlink{classbdm_1_1epdf}{epdf} \& \textbf{\_\-epdf} ()} |
|---|
| 88 | \label{classbdm_1_1mpdf_1892fe3933488942253679f068e9e7f6} |
|---|
| 89 | |
|---|
| 90 | \item |
|---|
| 91 | \hypertarget{classbdm_1_1mpdf_05e843fd11c410a99dad2b88c55aca80}{ |
|---|
| 92 | \hyperlink{classbdm_1_1epdf}{epdf} $\ast$ \textbf{\_\-e} ()} |
|---|
| 93 | \label{classbdm_1_1mpdf_05e843fd11c410a99dad2b88c55aca80} |
|---|
| 94 | |
|---|
| 95 | \end{CompactItemize} |
|---|
| 96 | \end{Indent} |
|---|
| 97 | \begin{Indent}{\bf Connection to other objects}\par |
|---|
| 98 | \begin{CompactItemize} |
|---|
| 99 | \item |
|---|
| 100 | \hypertarget{classbdm_1_1mpdf_7631a5570e4ade1420065e8df78f4401}{ |
|---|
| 101 | void \textbf{set\_\-rvc} (const \hyperlink{classbdm_1_1RV}{RV} \&rvc0)} |
|---|
| 102 | \label{classbdm_1_1mpdf_7631a5570e4ade1420065e8df78f4401} |
|---|
| 103 | |
|---|
| 104 | \item |
|---|
| 105 | \hypertarget{classbdm_1_1mpdf_18ac26bc2f96ae01ef4eb06178abbd75}{ |
|---|
| 106 | void \textbf{set\_\-rv} (const \hyperlink{classbdm_1_1RV}{RV} \&rv0)} |
|---|
| 107 | \label{classbdm_1_1mpdf_18ac26bc2f96ae01ef4eb06178abbd75} |
|---|
| 108 | |
|---|
| 109 | \item |
|---|
| 110 | \hypertarget{classbdm_1_1mpdf_f8e3798150b42fd1f3e16ddbbe0e7045}{ |
|---|
| 111 | bool \textbf{isnamed} ()} |
|---|
| 112 | \label{classbdm_1_1mpdf_f8e3798150b42fd1f3e16ddbbe0e7045} |
|---|
| 113 | |
|---|
| 114 | \end{CompactItemize} |
|---|
| 115 | \end{Indent} |
|---|
| 116 | \subsection*{Protected Attributes} |
|---|
| 117 | \begin{CompactItemize} |
|---|
| 118 | \item |
|---|
| 119 | \hypertarget{classbdm_1_1migamma__fix_e1c344accac36d7ccc3ffa502e8d2f4e}{ |
|---|
| 120 | double \hyperlink{classbdm_1_1migamma__fix_e1c344accac36d7ccc3ffa502e8d2f4e}{l}} |
|---|
| 121 | \label{classbdm_1_1migamma__fix_e1c344accac36d7ccc3ffa502e8d2f4e} |
|---|
| 122 | |
|---|
| 123 | \begin{CompactList}\small\item\em parameter l \item\end{CompactList}\item |
|---|
| 124 | \hypertarget{classbdm_1_1migamma__fix_5d453e5a2bdfc9a16c8acb8842dc9780}{ |
|---|
| 125 | vec \hyperlink{classbdm_1_1migamma__fix_5d453e5a2bdfc9a16c8acb8842dc9780}{refl}} |
|---|
| 126 | \label{classbdm_1_1migamma__fix_5d453e5a2bdfc9a16c8acb8842dc9780} |
|---|
| 127 | |
|---|
| 128 | \begin{CompactList}\small\item\em reference vector \item\end{CompactList}\item |
|---|
| 129 | \hypertarget{classbdm_1_1migamma_a31b39d4179551b593c9e0d7d756783a}{ |
|---|
| 130 | \hyperlink{classbdm_1_1eigamma}{eigamma} \hyperlink{classbdm_1_1migamma_a31b39d4179551b593c9e0d7d756783a}{epdf}} |
|---|
| 131 | \label{classbdm_1_1migamma_a31b39d4179551b593c9e0d7d756783a} |
|---|
| 132 | |
|---|
| 133 | \begin{CompactList}\small\item\em Internal \hyperlink{classbdm_1_1epdf}{epdf} that arise by conditioning on {\tt rvc}. \item\end{CompactList}\item |
|---|
| 134 | \hypertarget{classbdm_1_1migamma_dc56bc9da542e0103ec16b9be8e5e38c}{ |
|---|
| 135 | double \hyperlink{classbdm_1_1migamma_dc56bc9da542e0103ec16b9be8e5e38c}{k}} |
|---|
| 136 | \label{classbdm_1_1migamma_dc56bc9da542e0103ec16b9be8e5e38c} |
|---|
| 137 | |
|---|
| 138 | \begin{CompactList}\small\item\em Constant $k$. \item\end{CompactList}\item |
|---|
| 139 | \hypertarget{classbdm_1_1migamma_c9847093da59a9ba0ebb68d2c592f5dc}{ |
|---|
| 140 | vec \& \hyperlink{classbdm_1_1migamma_c9847093da59a9ba0ebb68d2c592f5dc}{\_\-alpha}} |
|---|
| 141 | \label{classbdm_1_1migamma_c9847093da59a9ba0ebb68d2c592f5dc} |
|---|
| 142 | |
|---|
| 143 | \begin{CompactList}\small\item\em cache of epdf.alpha \item\end{CompactList}\item |
|---|
| 144 | \hypertarget{classbdm_1_1migamma_0d854c047001b5465cf1ba21f52904b5}{ |
|---|
| 145 | vec \& \hyperlink{classbdm_1_1migamma_0d854c047001b5465cf1ba21f52904b5}{\_\-beta}} |
|---|
| 146 | \label{classbdm_1_1migamma_0d854c047001b5465cf1ba21f52904b5} |
|---|
| 147 | |
|---|
| 148 | \begin{CompactList}\small\item\em cache of epdf.beta \item\end{CompactList}\item |
|---|
| 149 | \hypertarget{classbdm_1_1mpdf_7c1900976ff13dbc09c9729b3bbff9e6}{ |
|---|
| 150 | int \hyperlink{classbdm_1_1mpdf_7c1900976ff13dbc09c9729b3bbff9e6}{dimc}} |
|---|
| 151 | \label{classbdm_1_1mpdf_7c1900976ff13dbc09c9729b3bbff9e6} |
|---|
| 152 | |
|---|
| 153 | \begin{CompactList}\small\item\em dimension of the condition \item\end{CompactList}\item |
|---|
| 154 | \hypertarget{classbdm_1_1mpdf_5a5f08950daa08b85b01ddf4e1c36288}{ |
|---|
| 155 | \hyperlink{classbdm_1_1RV}{RV} \hyperlink{classbdm_1_1mpdf_5a5f08950daa08b85b01ddf4e1c36288}{rvc}} |
|---|
| 156 | \label{classbdm_1_1mpdf_5a5f08950daa08b85b01ddf4e1c36288} |
|---|
| 157 | |
|---|
| 158 | \begin{CompactList}\small\item\em random variable in condition \item\end{CompactList}\item |
|---|
| 159 | \hypertarget{classbdm_1_1mpdf_5eea43c56d38e4441bfb30270db949c0}{ |
|---|
| 160 | \hyperlink{classbdm_1_1epdf}{epdf} $\ast$ \hyperlink{classbdm_1_1mpdf_5eea43c56d38e4441bfb30270db949c0}{ep}} |
|---|
| 161 | \label{classbdm_1_1mpdf_5eea43c56d38e4441bfb30270db949c0} |
|---|
| 162 | |
|---|
| 163 | \begin{CompactList}\small\item\em pointer to internal \hyperlink{classbdm_1_1epdf}{epdf} \item\end{CompactList}\end{CompactItemize} |
|---|
| 164 | |
|---|
| 165 | |
|---|
| 166 | \subsection{Member Function Documentation} |
|---|
| 167 | \hypertarget{classbdm_1_1mpdf_f0c1db6fcbb3aae2dd6123884457a367}{ |
|---|
| 168 | \index{bdm::migamma\_\-fix@{bdm::migamma\_\-fix}!samplecond@{samplecond}} |
|---|
| 169 | \index{samplecond@{samplecond}!bdm::migamma_fix@{bdm::migamma\_\-fix}} |
|---|
| 170 | \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{]}}}} |
|---|
| 171 | \label{classbdm_1_1mpdf_f0c1db6fcbb3aae2dd6123884457a367} |
|---|
| 172 | |
|---|
| 173 | |
|---|
| 174 | Returns a sample from the density conditioned on {\tt cond}, $x \sim epdf(rv|cond)$. |
|---|
| 175 | |
|---|
| 176 | \begin{Desc} |
|---|
| 177 | \item[Parameters:] |
|---|
| 178 | \begin{description} |
|---|
| 179 | \item[{\em cond}]is numeric value of {\tt rv} \end{description} |
|---|
| 180 | \end{Desc} |
|---|
| 181 | |
|---|
| 182 | |
|---|
| 183 | Reimplemented in \hyperlink{classbdm_1_1mprod_ee715a8013acf9892f6cb489db595555}{bdm::mprod}. |
|---|
| 184 | |
|---|
| 185 | References bdm::mpdf::condition(), bdm::mpdf::ep, and bdm::epdf::sample(). |
|---|
| 186 | |
|---|
| 187 | Referenced by bdm::MPF$<$ BM\_\-T $>$::bayes(), bdm::PF::bayes(), and bdm::ArxDS::step().\hypertarget{classbdm_1_1mpdf_afe4185b26baeb03688202e254d3b005}{ |
|---|
| 188 | \index{bdm::migamma\_\-fix@{bdm::migamma\_\-fix}!samplecond\_\-m@{samplecond\_\-m}} |
|---|
| 189 | \index{samplecond\_\-m@{samplecond\_\-m}!bdm::migamma_fix@{bdm::migamma\_\-fix}} |
|---|
| 190 | \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{]}}}} |
|---|
| 191 | \label{classbdm_1_1mpdf_afe4185b26baeb03688202e254d3b005} |
|---|
| 192 | |
|---|
| 193 | |
|---|
| 194 | Returns. |
|---|
| 195 | |
|---|
| 196 | \begin{Desc} |
|---|
| 197 | \item[Parameters:] |
|---|
| 198 | \begin{description} |
|---|
| 199 | \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} |
|---|
| 200 | \end{Desc} |
|---|
| 201 | |
|---|
| 202 | |
|---|
| 203 | References bdm::mpdf::condition(), bdm::epdf::dimension(), bdm::mpdf::ep, and bdm::epdf::sample(). |
|---|
| 204 | |
|---|
| 205 | The documentation for this class was generated from the following file:\begin{CompactItemize} |
|---|
| 206 | \item |
|---|
| 207 | \hyperlink{libEF_8h}{libEF.h}\end{CompactItemize} |
|---|