Changeset 270 for doc/html/classbdm_1_1eigamma.html
- Timestamp:
- 02/16/09 10:02:08 (16 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
doc/html/classbdm_1_1eigamma.html
r269 r270 29 29 </div> 30 30 <div class="contents"> 31 <h1>bdm::eigamma Class Reference</h1><!-- doxytag: class="bdm::eigamma" --><!-- doxytag: inherits="bdm::eEF" -->Inverse-Gamma posterior density. 32 <a href="#_details">More...</a> 33 <p> 34 <code>#include <<a class="el" href="libEF_8h-source.html">libEF.h</a>></code> 31 <h1>bdm::eigamma Class Reference</h1><!-- doxytag: class="bdm::eigamma" --><!-- doxytag: inherits="bdm::eEF" --><code>#include <<a class="el" href="libEF_8h-source.html">libEF.h</a>></code> 35 32 <p> 36 33 <div class="dynheader"> … … 41 38 <area shape="rect" href="classbdm_1_1eEF.html" title="General conjugate exponential family posterior density." alt="" coords="25,161,105,188"><area shape="rect" href="classbdm_1_1epdf.html" title="Probability density function with numerical statistics, e.g. posterior density." alt="" coords="23,84,108,111"><area shape="rect" href="classbdm_1_1bdmroot.html" title="Root class of BDM objects." alt="" coords="9,7,121,33"></map> 42 39 <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> 43 <div class="dynheader">44 Collaboration diagram for bdm::eigamma:</div>45 <div class="dynsection">46 <p><center><img src="classbdm_1_1eigamma__coll__graph.png" border="0" usemap="#bdm_1_1eigamma__coll__map" alt="Collaboration graph"></center>47 <map name="bdm_1_1eigamma__coll__map">48 <area shape="rect" href="classbdm_1_1eEF.html" title="General conjugate exponential family posterior density." alt="" coords="16,263,96,289"><area shape="rect" href="classbdm_1_1egamma.html" title="Gamma posterior density." alt="" coords="77,343,192,369"><area shape="rect" href="classbdm_1_1epdf.html" title="Probability density function with numerical statistics, e.g. posterior density." alt="" coords="13,183,99,209"><area shape="rect" href="classbdm_1_1bdmroot.html" title="Root class of BDM objects." alt="" coords="5,7,117,33"><area shape="rect" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables." alt="" coords="72,87,147,113"></map>49 <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>50 40 51 41 <p> 52 <a href="classbdm_1_1eigamma-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> 42 <a href="classbdm_1_1eigamma-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2> 43 Inverse-Gamma posterior density. 44 <p> 45 Multivariate inverse-Gamma density as product of independent univariate densities. <p class="formulaDsp"> 46 <img class="formulaDsp" alt="\[ f(x|\alpha,\beta) = \prod f(x_i|\alpha_i,\beta_i) \]" src="form_8.png"> 47 <p> 48 <p> 49 Inverse Gamma can be converted to Gamma using <p class="formulaDsp"> 50 <img class="formulaDsp" alt="\[ x\sim iG(a,b) => 1/x\sim G(a,1/b) \]" src="form_93.png"> 51 <p> 52 This relation is used in sampling. <table border="0" cellpadding="0" cellspacing="0"> 53 53 <tr><td></td></tr> 54 54 <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> 55 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name=" 34a8d2cd08399c3449e2efcda6ea2f89"></a><!-- doxytag: member="bdm::eigamma::eigamma" ref="34a8d2cd08399c3449e2efcda6ea2f89" args="(const RV &rv)" -->56 </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1eigamma.html# 34a8d2cd08399c3449e2efcda6ea2f89">eigamma</a> (const <a class="el" href="classbdm_1_1RV.html">RV</a> &<a class="el" href="classbdm_1_1epdf.html#62c5b8ff71d9ebe6cd58d3c342eb1dc8">rv</a>)</td></tr>55 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b496396f3511ce87d7ae3830ba94262c"></a><!-- doxytag: member="bdm::eigamma::eigamma" ref="b496396f3511ce87d7ae3830ba94262c" args="()" --> 56 </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1eigamma.html#b496396f3511ce87d7ae3830ba94262c">eigamma</a> ()</td></tr> 57 57 58 58 <tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <br></td></tr> … … 64 64 vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1eigamma.html#3aff7bf25ddac27731c60826fcfd878f">sample</a> () const </td></tr> 65 65 66 <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns a sample, <img class="formulaInl" alt="$ x$" src="form_28.png"> from density <img class="formulaInl" alt="$epdf(rv)$" src="form_59.png">. <br></td></tr>66 <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns a sample, <img class="formulaInl" alt="$ x $" src="form_106.png"> from density <img class="formulaInl" alt="$ f_x()$" src="form_107.png">. <br></td></tr> 67 67 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9e26c80c8e6708bfcf2e684958af6f91"></a><!-- doxytag: member="bdm::eigamma::evallog" ref="9e26c80c8e6708bfcf2e684958af6f91" args="(const vec &val) const " --> 68 68 double </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1eigamma.html#9e26c80c8e6708bfcf2e684958af6f91">evallog</a> (const vec &val) const </td></tr> … … 73 73 74 74 <tr><td class="mdescLeft"> </td><td class="mdescRight">logarithm of the normalizing constant, <img class="formulaInl" alt="$\mathcal{I}$" src="form_60.png"> <br></td></tr> 75 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="57b9ee79ef5d2cea243bbe6b274a2abe"></a><!-- doxytag: member="bdm::eigamma::_param" ref="57b9ee79ef5d2cea243bbe6b274a2abe" args="(vec *&a, vec *&b)" -->76 void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1eigamma.html#57b9ee79ef5d2cea243bbe6b274a2abe">_param</a> (vec *&a, vec *&b)</td></tr>77 78 <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns poiter to alpha and beta. Potentially dangerous: use with care! <br></td></tr>79 75 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="46cecb295edbabd28120cb0f6f572bcb"></a><!-- doxytag: member="bdm::eigamma::mean" ref="46cecb295edbabd28120cb0f6f572bcb" args="() const " --> 80 76 vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1eigamma.html#46cecb295edbabd28120cb0f6f572bcb">mean</a> () const </td></tr> 81 77 82 <tr><td class="mdescLeft"> </td><td class="mdescRight"> return expected value<br></td></tr>78 <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns poiter to alpha and beta. Potentially dangerous: use with care! <br></td></tr> 83 79 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c2c696f8c668e9f65392c9449f6a5133"></a><!-- doxytag: member="bdm::eigamma::variance" ref="c2c696f8c668e9f65392c9449f6a5133" args="() const " --> 84 80 vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1eigamma.html#c2c696f8c668e9f65392c9449f6a5133">variance</a> () const </td></tr> 85 81 86 82 <tr><td class="mdescLeft"> </td><td class="mdescRight">return expected variance (not covariance!) <br></td></tr> 83 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0b3693d30bcc8c6bd873f9c49825cdeb"></a><!-- doxytag: member="bdm::eigamma::_alpha" ref="0b3693d30bcc8c6bd873f9c49825cdeb" args="()" --> 84 vec & </td><td class="memItemRight" valign="bottom"><b>_alpha</b> ()</td></tr> 85 86 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d5aa95bce22824f16b46f8cd3ace9dae"></a><!-- doxytag: member="bdm::eigamma::_beta" ref="d5aa95bce22824f16b46f8cd3ace9dae" args="()" --> 87 vec & </td><td class="memItemRight" valign="bottom"><b>_beta</b> ()</td></tr> 88 87 89 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="deef7d6273ba4d5a5cf0bbd91ec7277a"></a><!-- doxytag: member="bdm::eigamma::dupdate" ref="deef7d6273ba4d5a5cf0bbd91ec7277a" args="(mat &v)" --> 88 90 virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1eEF.html#deef7d6273ba4d5a5cf0bbd91ec7277a">dupdate</a> (mat &v)</td></tr> … … 101 103 102 104 <tr><td class="mdescLeft"> </td><td class="mdescRight">Power of the density, used e.g. to flatten the density. <br></td></tr> 105 <tr><td colspan="2"><div class="groupHeader">Matematical Operations</div></td></tr> 103 106 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b4cf45fd83cc7573ede9fe1215256058"></a><!-- doxytag: member="bdm::eigamma::sample_m" ref="b4cf45fd83cc7573ede9fe1215256058" args="(int N) const " --> 104 107 virtual mat </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#b4cf45fd83cc7573ede9fe1215256058">sample_m</a> (int N) const </td></tr> 105 108 106 <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns N samples from density <img class="formulaInl" alt="$epdf(rv)$" src="form_59.png">. <br></td></tr>109 <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns N samples, <img class="formulaInl" alt="$ [x_1 , x_2 , \ldots \ $" src="form_108.png"> from density <img class="formulaInl" alt="$ f_x(rv)$" src="form_109.png">. <br></td></tr> 107 110 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="34956d4dd3176eeb5937cf48a1546b62"></a><!-- doxytag: member="bdm::eigamma::evallog_m" ref="34956d4dd3176eeb5937cf48a1546b62" args="(const mat &Val) const " --> 108 111 virtual vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#34956d4dd3176eeb5937cf48a1546b62">evallog_m</a> (const mat &Val) const </td></tr> … … 117 120 118 121 <tr><td class="mdescLeft"> </td><td class="mdescRight">Return marginal density on the given <a class="el" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a>, the remainig rvs are intergrated out. <br></td></tr> 122 <tr><td colspan="2"><div class="groupHeader">Connection to other classes</div></td></tr> 123 <tr><td colspan="2"><div class="groupText">Description of the random quantity via attribute <code>rv</code> is optional. For operations such as sampling <code>rv</code> does not need to be set. However, for <code>marginalization</code> and <code>conditioning</code> <code>rv</code> has to be set. NB: <br><br></div></td></tr> 124 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f423e28448dbb69ef4905295ec8de8ff"></a><!-- doxytag: member="bdm::eigamma::set_rv" ref="f423e28448dbb69ef4905295ec8de8ff" args="(const RV &rv0)" --> 125 void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#f423e28448dbb69ef4905295ec8de8ff">set_rv</a> (const <a class="el" href="classbdm_1_1RV.html">RV</a> &rv0)</td></tr> 126 127 <tr><td class="mdescLeft"> </td><td class="mdescRight">Name its rv. <br></td></tr> 128 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c4b863ff84c7a4882fb3ad18556027f9"></a><!-- doxytag: member="bdm::eigamma::isnamed" ref="c4b863ff84c7a4882fb3ad18556027f9" args="() const " --> 129 bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#c4b863ff84c7a4882fb3ad18556027f9">isnamed</a> () const </td></tr> 130 131 <tr><td class="mdescLeft"> </td><td class="mdescRight">True if rv is assigned. <br></td></tr> 119 132 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a4ab378d5e004c3ff3e2d4e64f7bba21"></a><!-- doxytag: member="bdm::eigamma::_rv" ref="a4ab378d5e004c3ff3e2d4e64f7bba21" args="() const " --> 120 133 const <a class="el" href="classbdm_1_1RV.html">RV</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#a4ab378d5e004c3ff3e2d4e64f7bba21">_rv</a> () const </td></tr> 121 134 122 <tr><td class="mdescLeft"> </td><td class="mdescRight">access function, possibly dangerous! <br></td></tr> 123 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="62e88cbce0ce77a8692f5e15d76e805f"></a><!-- doxytag: member="bdm::eigamma::_renewrv" ref="62e88cbce0ce77a8692f5e15d76e805f" args="(const RV &in_rv)" --> 124 void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#62e88cbce0ce77a8692f5e15d76e805f">_renewrv</a> (const <a class="el" href="classbdm_1_1RV.html">RV</a> &in_rv)</td></tr> 135 <tr><td class="mdescLeft"> </td><td class="mdescRight">Return name (fails when isnamed is false). <br></td></tr> 136 <tr><td colspan="2"><div class="groupHeader">Access to attributes</div></td></tr> 137 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="46dfe100cd621716ee5c7ee25a20f24b"></a><!-- doxytag: member="bdm::eigamma::dimension" ref="46dfe100cd621716ee5c7ee25a20f24b" args="() const " --> 138 bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#46dfe100cd621716ee5c7ee25a20f24b">dimension</a> () const </td></tr> 125 139 126 <tr><td class="mdescLeft"> </td><td class="mdescRight"> modifier function - useful when copying epdfs<br></td></tr>140 <tr><td class="mdescLeft"> </td><td class="mdescRight">Size of the random variable. <br></td></tr> 127 141 <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> 128 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e2c49c77e04a96a9e6a4a628318ceb73"></a><!-- doxytag: member="bdm::eigamma::alpha" ref="e2c49c77e04a96a9e6a4a628318ceb73" args="" -->129 vec * </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1eigamma.html#e2c49c77e04a96a9e6a4a628318ceb73">alpha</a></td></tr>130 131 <tr><td class="mdescLeft"> </td><td class="mdescRight">Vector <img class="formulaInl" alt="$\alpha$" src="form_15.png">. <br></td></tr>132 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b2c62f2e869d1304a4055f6a7ac59cde"></a><!-- doxytag: member="bdm::eigamma::beta" ref="b2c62f2e869d1304a4055f6a7ac59cde" args="" -->133 vec * </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1eigamma.html#b2c62f2e869d1304a4055f6a7ac59cde">beta</a></td></tr>134 135 <tr><td class="mdescLeft"> </td><td class="mdescRight">Vector <img class="formulaInl" alt="$\beta$" src="form_16.png"> (in fact it is 1/beta as used in definition of iG). <br></td></tr>136 142 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3e5c03201f073033a7db894fa15ddb96"></a><!-- doxytag: member="bdm::eigamma::eg" ref="3e5c03201f073033a7db894fa15ddb96" args="" --> 137 143 <a class="el" href="classbdm_1_1egamma.html">egamma</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1eigamma.html#3e5c03201f073033a7db894fa15ddb96">eg</a></td></tr> 138 144 139 145 <tr><td class="mdescLeft"> </td><td class="mdescRight">internal <a class="el" href="classbdm_1_1egamma.html" title="Gamma posterior density.">egamma</a> <br></td></tr> 146 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="494fafd76d9448395efe160c9ba11ab6"></a><!-- doxytag: member="bdm::eigamma::alpha" ref="494fafd76d9448395efe160c9ba11ab6" args="" --> 147 vec & </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1eigamma.html#494fafd76d9448395efe160c9ba11ab6">alpha</a></td></tr> 148 149 <tr><td class="mdescLeft"> </td><td class="mdescRight">Vector <img class="formulaInl" alt="$\alpha$" src="form_15.png">. <br></td></tr> 150 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e32ff12ba6b2fdc22068c35dace23fa6"></a><!-- doxytag: member="bdm::eigamma::beta" ref="e32ff12ba6b2fdc22068c35dace23fa6" args="" --> 151 vec & </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1eigamma.html#e32ff12ba6b2fdc22068c35dace23fa6">beta</a></td></tr> 152 153 <tr><td class="mdescLeft"> </td><td class="mdescRight">Vector <img class="formulaInl" alt="$\beta$" src="form_16.png"> (in fact it is 1/beta as used in definition of iG). <br></td></tr> 154 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="16adac20ec7fe07e1ea0b27d917788ce"></a><!-- doxytag: member="bdm::eigamma::dim" ref="16adac20ec7fe07e1ea0b27d917788ce" args="" --> 155 int </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#16adac20ec7fe07e1ea0b27d917788ce">dim</a></td></tr> 156 157 <tr><td class="mdescLeft"> </td><td class="mdescRight">dimension of the random variable <br></td></tr> 140 158 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="62c5b8ff71d9ebe6cd58d3c342eb1dc8"></a><!-- doxytag: member="bdm::eigamma::rv" ref="62c5b8ff71d9ebe6cd58d3c342eb1dc8" args="" --> 141 159 <a class="el" href="classbdm_1_1RV.html">RV</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#62c5b8ff71d9ebe6cd58d3c342eb1dc8">rv</a></td></tr> 142 160 143 <tr><td class="mdescLeft"> </td><td class="mdescRight"> Identifiedof the random variable. <br></td></tr>161 <tr><td class="mdescLeft"> </td><td class="mdescRight">Description of the random variable. <br></td></tr> 144 162 </table> 145 <hr><a name="_details"></a><h2>Detailed Description</h2> 146 Inverse-Gamma posterior density. 147 <p> 148 Multivariate inverse-Gamma density as product of independent univariate densities. <p class="formulaDsp"> 149 <img class="formulaDsp" alt="\[ f(x|\alpha,\beta) = \prod f(x_i|\alpha_i,\beta_i) \]" src="form_8.png"> 150 <p> 151 <p> 152 Inverse Gamma can be converted to Gamma using <p class="formulaDsp"> 153 <img class="formulaDsp" alt="\[ x\sim iG(a,b) => 1/x\sim G(a,1/b) \]" src="form_93.png"> 154 <p> 155 This relation is used in sampling. <hr>The documentation for this class was generated from the following file:<ul> 163 <hr>The documentation for this class was generated from the following file:<ul> 156 164 <li><a class="el" href="libEF_8h-source.html">libEF.h</a></ul> 157 165 </div> 158 <hr size="1"><address style="text-align: right;"><small>Generated on Wed Feb 11 10:21:072009 for mixpp by 166 <hr size="1"><address style="text-align: right;"><small>Generated on Wed Feb 11 23:34:06 2009 for mixpp by 159 167 <a href="http://www.doxygen.org/index.html"> 160 168 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>