[84] | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
---|
| 2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> |
---|
| 3 | <title>mixpp: mgamma_fix Class Reference</title> |
---|
| 4 | <link href="doxygen.css" rel="stylesheet" type="text/css"> |
---|
| 5 | <link href="tabs.css" rel="stylesheet" type="text/css"> |
---|
| 6 | </head><body> |
---|
| 7 | <!-- Generated by Doxygen 1.5.3 --> |
---|
| 8 | <div class="tabs"> |
---|
| 9 | <ul> |
---|
| 10 | <li><a href="index.html"><span>Main Page</span></a></li> |
---|
| 11 | <li class="current"><a href="annotated.html"><span>Classes</span></a></li> |
---|
| 12 | <li><a href="files.html"><span>Files</span></a></li> |
---|
| 13 | <li><a href="pages.html"><span>Related Pages</span></a></li> |
---|
| 14 | </ul> |
---|
| 15 | </div> |
---|
| 16 | <div class="tabs"> |
---|
| 17 | <ul> |
---|
| 18 | <li><a href="annotated.html"><span>Class List</span></a></li> |
---|
| 19 | <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> |
---|
| 20 | <li><a href="functions.html"><span>Class Members</span></a></li> |
---|
| 21 | </ul> |
---|
| 22 | </div> |
---|
| 23 | <h1>mgamma_fix Class Reference</h1><!-- doxytag: class="mgamma_fix" --><!-- doxytag: inherits="mgamma" -->Gamma random walk around a fixed point. |
---|
| 24 | <a href="#_details">More...</a> |
---|
| 25 | <p> |
---|
| 26 | <code>#include <<a class="el" href="libEF_8h-source.html">libEF.h</a>></code> |
---|
| 27 | <p> |
---|
| 28 | <div class="dynheader"> |
---|
| 29 | Inheritance diagram for mgamma_fix:</div> |
---|
| 30 | <div class="dynsection"> |
---|
| 31 | <p><center><img src="classmgamma__fix__inherit__graph.png" border="0" usemap="#mgamma__fix__inherit__map" alt="Inheritance graph"></center> |
---|
| 32 | <map name="mgamma__fix__inherit__map"> |
---|
| 33 | <area shape="rect" href="classmgamma.html" title="Gamma random walk." alt="" coords="16,161,101,188"><area shape="rect" href="classmEF.html" title="Exponential family model." alt="" coords="33,84,84,111"><area shape="rect" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies." alt="" coords="31,7,87,33"></map> |
---|
| 34 | <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> |
---|
| 35 | <div class="dynheader"> |
---|
| 36 | Collaboration diagram for mgamma_fix:</div> |
---|
| 37 | <div class="dynsection"> |
---|
| 38 | <p><center><img src="classmgamma__fix__coll__graph.png" border="0" usemap="#mgamma__fix__coll__map" alt="Collaboration graph"></center> |
---|
| 39 | <map name="mgamma__fix__coll__map"> |
---|
| 40 | <area shape="rect" href="classmgamma.html" title="Gamma random walk." alt="" coords="20,380,105,407"><area shape="rect" href="classmEF.html" title="Exponential family model." alt="" coords="5,284,56,311"><area shape="rect" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies." alt="" coords="8,204,64,231"><area shape="rect" href="classRV.html" title="Class representing variables, most often random variables." alt="" coords="45,7,83,33"><area shape="rect" title="rv\nrvc" alt="" coords="57,31,65,39"><area shape="rect" title="rv\nrvc" alt="" coords="33,200,41,208"><area shape="rect" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density." alt="" coords="80,105,131,132"><area shape="rect" title="rv" alt="" coords="67,31,75,39"><area shape="rect" title="rv" alt="" coords="96,101,104,109"><area shape="rect" title="ep" alt="" coords="91,129,99,137"><area shape="rect" title="ep" alt="" coords="41,200,49,208"><area shape="rect" href="classeEF.html" title="General conjugate exponential family posterior density." alt="" coords="93,204,139,231"><area shape="rect" href="classegamma.html" title="Gamma posterior density." alt="" coords="80,284,160,311"><area shape="rect" title="epdf" alt="" coords="107,308,115,316"><area shape="rect" title="epdf" alt="" coords="67,376,75,384"></map> |
---|
| 41 | <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> |
---|
| 42 | |
---|
| 43 | <p> |
---|
| 44 | <a href="classmgamma__fix-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> |
---|
| 45 | <tr><td></td></tr> |
---|
| 46 | <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> |
---|
| 47 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b92c3d2e5fd0381033a072e5ef3bcf80"></a><!-- doxytag: member="mgamma_fix::mgamma_fix" ref="b92c3d2e5fd0381033a072e5ef3bcf80" args="(const RV &rv, const RV &rvc)" --> |
---|
| 48 | </td><td class="memItemRight" valign="bottom"><a class="el" href="classmgamma__fix.html#b92c3d2e5fd0381033a072e5ef3bcf80">mgamma_fix</a> (const <a class="el" href="classRV.html">RV</a> &<a class="el" href="classmpdf.html#f6687c07ff07d47812dd565368ca59eb">rv</a>, const <a class="el" href="classRV.html">RV</a> &<a class="el" href="classmpdf.html#acb7dda792b3cd5576f39fa3129abbab">rvc</a>)</td></tr> |
---|
| 49 | |
---|
| 50 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <br></td></tr> |
---|
| 51 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ec6f846896749e27cb7be9fa48dd1cb1"></a><!-- doxytag: member="mgamma_fix::set_parameters" ref="ec6f846896749e27cb7be9fa48dd1cb1" args="(double k0, vec ref0, double l0)" --> |
---|
| 52 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classmgamma__fix.html#ec6f846896749e27cb7be9fa48dd1cb1">set_parameters</a> (double k0, vec ref0, double l0)</td></tr> |
---|
| 53 | |
---|
| 54 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Set value of <code>k</code>. <br></td></tr> |
---|
| 55 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6ea3931eec7b7da7b693e45981052460"></a><!-- doxytag: member="mgamma_fix::condition" ref="6ea3931eec7b7da7b693e45981052460" args="(const vec &val)" --> |
---|
| 56 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classmgamma__fix.html#6ea3931eec7b7da7b693e45981052460">condition</a> (const vec &val)</td></tr> |
---|
| 57 | |
---|
| 58 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Update <code>ep</code> so that it represents this <a class="el" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> conditioned on <code>rvc</code> = cond. <br></td></tr> |
---|
| 59 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a9d646cf758a70126dde7c48790b6e94"></a><!-- doxytag: member="mgamma_fix::set_parameters" ref="a9d646cf758a70126dde7c48790b6e94" args="(double k)" --> |
---|
| 60 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classmgamma.html#a9d646cf758a70126dde7c48790b6e94">set_parameters</a> (double <a class="el" href="classmgamma.html#43f733cce0245a52363d566099add687">k</a>)</td></tr> |
---|
| 61 | |
---|
| 62 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Set value of <code>k</code>. <br></td></tr> |
---|
| 63 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9f40dc43885085fad8e3d6652b79e139"></a><!-- doxytag: member="mgamma_fix::samplecond" ref="9f40dc43885085fad8e3d6652b79e139" args="(vec &cond, double &lik)" --> |
---|
| 64 | vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classmgamma.html#9f40dc43885085fad8e3d6652b79e139">samplecond</a> (vec &cond, double &lik)</td></tr> |
---|
| 65 | |
---|
| 66 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Generate one sample of the posterior. <br></td></tr> |
---|
| 67 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e9d52749793f40aad85b70c6db4435ae"></a><!-- doxytag: member="mgamma_fix::samplecond" ref="e9d52749793f40aad85b70c6db4435ae" args="(vec &cond, vec &lik, int n)" --> |
---|
| 68 | mat </td><td class="memItemRight" valign="bottom"><a class="el" href="classmgamma.html#e9d52749793f40aad85b70c6db4435ae">samplecond</a> (vec &cond, vec &lik, int n)</td></tr> |
---|
| 69 | |
---|
| 70 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Generate matrix of samples of the posterior. <br></td></tr> |
---|
| 71 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="80b738ece5bd4f8c4edaee4b38906f91"></a><!-- doxytag: member="mgamma_fix::evalcond" ref="80b738ece5bd4f8c4edaee4b38906f91" args="(const vec &dt, const vec &cond)" --> |
---|
| 72 | virtual double </td><td class="memItemRight" valign="bottom"><a class="el" href="classmpdf.html#80b738ece5bd4f8c4edaee4b38906f91">evalcond</a> (const vec &dt, const vec &cond)</td></tr> |
---|
| 73 | |
---|
| 74 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Shortcut for conditioning and evaluation of the internal <a class="el" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>. In some cases, this operation can be implemented efficiently. <br></td></tr> |
---|
| 75 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ec9c850305984582548e8deb64f0ffe8"></a><!-- doxytag: member="mgamma_fix::_rvc" ref="ec9c850305984582548e8deb64f0ffe8" args="()" --> |
---|
| 76 | <a class="el" href="classRV.html">RV</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmpdf.html#ec9c850305984582548e8deb64f0ffe8">_rvc</a> ()</td></tr> |
---|
| 77 | |
---|
| 78 | <tr><td class="mdescLeft"> </td><td class="mdescRight">access function <br></td></tr> |
---|
| 79 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e17780ee5b2cfe05922a6c56af1462f8"></a><!-- doxytag: member="mgamma_fix::_epdf" ref="e17780ee5b2cfe05922a6c56af1462f8" args="()" --> |
---|
| 80 | <a class="el" href="classepdf.html">epdf</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classmpdf.html#e17780ee5b2cfe05922a6c56af1462f8">_epdf</a> ()</td></tr> |
---|
| 81 | |
---|
| 82 | <tr><td class="mdescLeft"> </td><td class="mdescRight">access function <br></td></tr> |
---|
| 83 | <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> |
---|
| 84 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3f48c09caddc298901ad75fe7c0529f6"></a><!-- doxytag: member="mgamma_fix::l" ref="3f48c09caddc298901ad75fe7c0529f6" args="" --> |
---|
| 85 | double </td><td class="memItemRight" valign="bottom"><b>l</b></td></tr> |
---|
| 86 | |
---|
| 87 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="81ce49029ecc385418619b200dcafeb0"></a><!-- doxytag: member="mgamma_fix::refl" ref="81ce49029ecc385418619b200dcafeb0" args="" --> |
---|
| 88 | vec </td><td class="memItemRight" valign="bottom"><b>refl</b></td></tr> |
---|
| 89 | |
---|
| 90 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="612dbf35c770a780027619aaac2c443e"></a><!-- doxytag: member="mgamma_fix::epdf" ref="612dbf35c770a780027619aaac2c443e" args="" --> |
---|
| 91 | <a class="el" href="classegamma.html">egamma</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmgamma.html#612dbf35c770a780027619aaac2c443e">epdf</a></td></tr> |
---|
| 92 | |
---|
| 93 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Internal <a class="el" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> that arise by conditioning on <code>rvc</code>. <br></td></tr> |
---|
| 94 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="43f733cce0245a52363d566099add687"></a><!-- doxytag: member="mgamma_fix::k" ref="43f733cce0245a52363d566099add687" args="" --> |
---|
| 95 | double </td><td class="memItemRight" valign="bottom"><a class="el" href="classmgamma.html#43f733cce0245a52363d566099add687">k</a></td></tr> |
---|
| 96 | |
---|
| 97 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Constant $k$. <br></td></tr> |
---|
| 98 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5e90652837448bcc29707e7412f99691"></a><!-- doxytag: member="mgamma_fix::_beta" ref="5e90652837448bcc29707e7412f99691" args="" --> |
---|
| 99 | vec * </td><td class="memItemRight" valign="bottom"><a class="el" href="classmgamma.html#5e90652837448bcc29707e7412f99691">_beta</a></td></tr> |
---|
| 100 | |
---|
| 101 | <tr><td class="mdescLeft"> </td><td class="mdescRight">cache of epdf.beta <br></td></tr> |
---|
| 102 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f6687c07ff07d47812dd565368ca59eb"></a><!-- doxytag: member="mgamma_fix::rv" ref="f6687c07ff07d47812dd565368ca59eb" args="" --> |
---|
| 103 | <a class="el" href="classRV.html">RV</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmpdf.html#f6687c07ff07d47812dd565368ca59eb">rv</a></td></tr> |
---|
| 104 | |
---|
| 105 | <tr><td class="mdescLeft"> </td><td class="mdescRight">modeled random variable <br></td></tr> |
---|
| 106 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="acb7dda792b3cd5576f39fa3129abbab"></a><!-- doxytag: member="mgamma_fix::rvc" ref="acb7dda792b3cd5576f39fa3129abbab" args="" --> |
---|
| 107 | <a class="el" href="classRV.html">RV</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmpdf.html#acb7dda792b3cd5576f39fa3129abbab">rvc</a></td></tr> |
---|
| 108 | |
---|
| 109 | <tr><td class="mdescLeft"> </td><td class="mdescRight">random variable in condition <br></td></tr> |
---|
| 110 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7aa894208a32f3487827df6d5054424c"></a><!-- doxytag: member="mgamma_fix::ep" ref="7aa894208a32f3487827df6d5054424c" args="" --> |
---|
| 111 | <a class="el" href="classepdf.html">epdf</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classmpdf.html#7aa894208a32f3487827df6d5054424c">ep</a></td></tr> |
---|
| 112 | |
---|
| 113 | <tr><td class="mdescLeft"> </td><td class="mdescRight">pointer to internal <a class="el" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> <br></td></tr> |
---|
| 114 | </table> |
---|
| 115 | <hr><a name="_details"></a><h2>Detailed Description</h2> |
---|
| 116 | Gamma random walk around a fixed point. |
---|
| 117 | <p> |
---|
| 118 | Mean value, <img class="formulaInl" alt="$\mu$" src="form_14.png">, of this density is given by a geometric combination of <code>rvc</code> and given fixed point, $p$. $k$ is the coefficient of the geometric combimation <p class="formulaDsp"> |
---|
| 119 | <img class="formulaDsp" alt="\[ \mu = \mu_{t-1} ^{l} p^{1-l}\]" src="form_18.png"> |
---|
| 120 | <p> |
---|
| 121 | <p> |
---|
| 122 | Standard deviation of the random walk is proportional to one $k$-th the mean. This is achieved by setting <img class="formulaInl" alt="$\alpha=k$" src="form_11.png"> and <img class="formulaInl" alt="$\beta=k/\mu$" src="form_12.png">.<p> |
---|
| 123 | The standard deviation of the walk is then: <img class="formulaInl" alt="$\mu/\sqrt(k)$" src="form_13.png">. <hr>The documentation for this class was generated from the following file:<ul> |
---|
| 124 | <li>work/mixpp/bdm/stat/<a class="el" href="libEF_8h-source.html">libEF.h</a></ul> |
---|
| 125 | <hr size="1"><address style="text-align: right;"><small>Generated on Fri Apr 18 11:15:21 2008 for mixpp by |
---|
| 126 | <a href="http://www.doxygen.org/index.html"> |
---|
| 127 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> |
---|
| 128 | </body> |
---|
| 129 | </html> |
---|