[171] | 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: eDirich 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.6 --> |
---|
| 8 | <div class="navigation" id="top"> |
---|
| 9 | <div class="tabs"> |
---|
| 10 | <ul> |
---|
| 11 | <li><a href="index.html"><span>Main Page</span></a></li> |
---|
| 12 | <li><a href="pages.html"><span>Related Pages</span></a></li> |
---|
[219] | 13 | <li><a href="modules.html"><span>Modules</span></a></li> |
---|
[171] | 14 | <li class="current"><a href="annotated.html"><span>Classes</span></a></li> |
---|
| 15 | <li><a href="files.html"><span>Files</span></a></li> |
---|
| 16 | </ul> |
---|
| 17 | </div> |
---|
| 18 | <div class="tabs"> |
---|
| 19 | <ul> |
---|
| 20 | <li><a href="annotated.html"><span>Class List</span></a></li> |
---|
| 21 | <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> |
---|
| 22 | <li><a href="functions.html"><span>Class Members</span></a></li> |
---|
| 23 | </ul> |
---|
| 24 | </div> |
---|
| 25 | </div> |
---|
| 26 | <div class="contents"> |
---|
| 27 | <h1>eDirich Class Reference</h1><!-- doxytag: class="eDirich" --><!-- doxytag: inherits="eEF" -->Dirichlet posterior density. |
---|
| 28 | <a href="#_details">More...</a> |
---|
| 29 | <p> |
---|
| 30 | <code>#include <<a class="el" href="libEF_8h-source.html">libEF.h</a>></code> |
---|
| 31 | <p> |
---|
| 32 | <div class="dynheader"> |
---|
| 33 | Inheritance diagram for eDirich:</div> |
---|
| 34 | <div class="dynsection"> |
---|
| 35 | <p><center><img src="classeDirich__inherit__graph.png" border="0" usemap="#eDirich__inherit__map" alt="Inheritance graph"></center> |
---|
| 36 | <map name="eDirich__inherit__map"> |
---|
| 37 | <area shape="rect" href="classeEF.html" title="General conjugate exponential family posterior density." alt="" coords="16,84,59,111"><area shape="rect" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density." alt="" coords="13,7,61,33"></map> |
---|
| 38 | <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> |
---|
| 39 | <div class="dynheader"> |
---|
| 40 | Collaboration diagram for eDirich:</div> |
---|
| 41 | <div class="dynsection"> |
---|
| 42 | <p><center><img src="classeDirich__coll__graph.png" border="0" usemap="#eDirich__coll__map" alt="Collaboration graph"></center> |
---|
| 43 | <map name="eDirich__coll__map"> |
---|
| 44 | <area shape="rect" href="classeEF.html" title="General conjugate exponential family posterior density." alt="" coords="16,183,59,209"><area shape="rect" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density." alt="" coords="13,103,61,129"><area shape="rect" href="classRV.html" title="Class representing variables, most often random variables." alt="" coords="19,7,56,33"></map> |
---|
| 45 | <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> |
---|
| 46 | |
---|
| 47 | <p> |
---|
| 48 | <a href="classeDirich-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> |
---|
| 49 | <tr><td></td></tr> |
---|
| 50 | <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> |
---|
| 51 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ac7e6116f3575c3860d07355e96cd4af"></a><!-- doxytag: member="eDirich::eDirich" ref="ac7e6116f3575c3860d07355e96cd4af" args="(const RV &rv, const vec &beta0)" --> |
---|
| 52 | </td><td class="memItemRight" valign="bottom"><a class="el" href="classeDirich.html#ac7e6116f3575c3860d07355e96cd4af">eDirich</a> (const <a class="el" href="classRV.html">RV</a> &<a class="el" href="classepdf.html#74da992e3f5d598da8850b646b79b9d9">rv</a>, const vec &beta0)</td></tr> |
---|
| 53 | |
---|
| 54 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <br></td></tr> |
---|
| 55 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="55cccbc5eb44764dce722567acf5fd58"></a><!-- doxytag: member="eDirich::eDirich" ref="55cccbc5eb44764dce722567acf5fd58" args="(const eDirich &D0)" --> |
---|
| 56 | </td><td class="memItemRight" valign="bottom"><a class="el" href="classeDirich.html#55cccbc5eb44764dce722567acf5fd58">eDirich</a> (const <a class="el" href="classeDirich.html">eDirich</a> &D0)</td></tr> |
---|
| 57 | |
---|
| 58 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Copy constructor. <br></td></tr> |
---|
| 59 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="23dff79110822e9639343fe8e177fd80"></a><!-- doxytag: member="eDirich::sample" ref="23dff79110822e9639343fe8e177fd80" args="() const " --> |
---|
| 60 | vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classeDirich.html#23dff79110822e9639343fe8e177fd80">sample</a> () const </td></tr> |
---|
| 61 | |
---|
| 62 | <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> |
---|
| 63 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4206e1da149d51ff3b663c9241096b73"></a><!-- doxytag: member="eDirich::mean" ref="4206e1da149d51ff3b663c9241096b73" args="() const " --> |
---|
| 64 | vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classeDirich.html#4206e1da149d51ff3b663c9241096b73">mean</a> () const </td></tr> |
---|
| 65 | |
---|
| 66 | <tr><td class="mdescLeft"> </td><td class="mdescRight">return expected value <br></td></tr> |
---|
[219] | 67 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bb4b14ed7794777386de10608a83d142"></a><!-- doxytag: member="eDirich::evallog_nn" ref="bb4b14ed7794777386de10608a83d142" args="(const vec &val) const " --> |
---|
| 68 | double </td><td class="memItemRight" valign="bottom"><a class="el" href="classeDirich.html#bb4b14ed7794777386de10608a83d142">evallog_nn</a> (const vec &val) const </td></tr> |
---|
[171] | 69 | |
---|
[180] | 70 | <tr><td class="mdescLeft"> </td><td class="mdescRight">In this instance, val is ... <br></td></tr> |
---|
[171] | 71 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7ce60be7119ffc639ede4e583c1f6e77"></a><!-- doxytag: member="eDirich::lognc" ref="7ce60be7119ffc639ede4e583c1f6e77" args="() const " --> |
---|
| 72 | double </td><td class="memItemRight" valign="bottom"><a class="el" href="classeDirich.html#7ce60be7119ffc639ede4e583c1f6e77">lognc</a> () const </td></tr> |
---|
| 73 | |
---|
| 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="6409d0362143a23976b43641ff19e53a"></a><!-- doxytag: member="eDirich::_beta" ref="6409d0362143a23976b43641ff19e53a" args="()" --> |
---|
| 76 | vec & </td><td class="memItemRight" valign="bottom"><a class="el" href="classeDirich.html#6409d0362143a23976b43641ff19e53a">_beta</a> ()</td></tr> |
---|
| 77 | |
---|
| 78 | <tr><td class="mdescLeft"> </td><td class="mdescRight">access function <br></td></tr> |
---|
[180] | 79 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c842acb2e1cce5cc9000769ff06c086d"></a><!-- doxytag: member="eDirich::set_parameters" ref="c842acb2e1cce5cc9000769ff06c086d" args="(const vec &beta0)" --> |
---|
| 80 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classeDirich.html#c842acb2e1cce5cc9000769ff06c086d">set_parameters</a> (const vec &beta0)</td></tr> |
---|
| 81 | |
---|
| 82 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Set internal parameters. <br></td></tr> |
---|
[171] | 83 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a89bef8996410609004fa019b5b48964"></a><!-- doxytag: member="eDirich::dupdate" ref="a89bef8996410609004fa019b5b48964" args="(mat &v)" --> |
---|
| 84 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classeEF.html#a89bef8996410609004fa019b5b48964">dupdate</a> (mat &v)</td></tr> |
---|
| 85 | |
---|
| 86 | <tr><td class="mdescLeft"> </td><td class="mdescRight">TODO decide if it is really needed. <br></td></tr> |
---|
[219] | 87 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="357512dd565e199904d367294b7dd862"></a><!-- doxytag: member="eDirich::evallog" ref="357512dd565e199904d367294b7dd862" args="(const vec &val) const " --> |
---|
| 88 | virtual double </td><td class="memItemRight" valign="bottom"><a class="el" href="classeEF.html#357512dd565e199904d367294b7dd862">evallog</a> (const vec &val) const </td></tr> |
---|
[171] | 89 | |
---|
| 90 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Evaluate normalized log-probability. <br></td></tr> |
---|
[219] | 91 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="cff03a658aec11b806c3e3d48f37b81f"></a><!-- doxytag: member="eDirich::evallog" ref="cff03a658aec11b806c3e3d48f37b81f" args="(const mat &Val) const " --> |
---|
| 92 | virtual vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classeEF.html#cff03a658aec11b806c3e3d48f37b81f">evallog</a> (const mat &Val) const </td></tr> |
---|
[171] | 93 | |
---|
| 94 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Evaluate normalized log-probability for many samples. <br></td></tr> |
---|
| 95 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4f8385dd1cc9740522dc373b1dc3cbf5"></a><!-- doxytag: member="eDirich::pow" ref="4f8385dd1cc9740522dc373b1dc3cbf5" args="(double p)" --> |
---|
| 96 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classeEF.html#4f8385dd1cc9740522dc373b1dc3cbf5">pow</a> (double p)</td></tr> |
---|
| 97 | |
---|
| 98 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Power of the density, used e.g. to flatten the density. <br></td></tr> |
---|
[210] | 99 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="76608914c3b19e150292d5c56e93e508"></a><!-- doxytag: member="eDirich::sample_m" ref="76608914c3b19e150292d5c56e93e508" args="(int N) const " --> |
---|
| 100 | virtual mat </td><td class="memItemRight" valign="bottom"><a class="el" href="classepdf.html#76608914c3b19e150292d5c56e93e508">sample_m</a> (int N) const </td></tr> |
---|
[171] | 101 | |
---|
| 102 | <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> |
---|
[219] | 103 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2495a04bbacb9b55fe5a3a59b78affca"></a><!-- doxytag: member="eDirich::evallog_m" ref="2495a04bbacb9b55fe5a3a59b78affca" args="(const mat &Val) const " --> |
---|
| 104 | virtual vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classepdf.html#2495a04bbacb9b55fe5a3a59b78affca">evallog_m</a> (const mat &Val) const </td></tr> |
---|
[180] | 105 | |
---|
| 106 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Compute log-probability of multiple values argument <code>val</code>. <br></td></tr> |
---|
[210] | 107 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e87dc8260a5c37bc1b03eb66174741a0"></a><!-- doxytag: member="eDirich::condition" ref="e87dc8260a5c37bc1b03eb66174741a0" args="(const RV &rv) const " --> |
---|
| 108 | virtual <a class="el" href="classmpdf.html">mpdf</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classepdf.html#e87dc8260a5c37bc1b03eb66174741a0">condition</a> (const <a class="el" href="classRV.html">RV</a> &<a class="el" href="classepdf.html#74da992e3f5d598da8850b646b79b9d9">rv</a>) const </td></tr> |
---|
[181] | 109 | |
---|
| 110 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Return conditional density on the given <a class="el" href="classRV.html" title="Class representing variables, most often random variables.">RV</a>, the remaining rvs will be in conditioning. <br></td></tr> |
---|
[210] | 111 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="38de9f59b65ee06028554f3f74b66025"></a><!-- doxytag: member="eDirich::marginal" ref="38de9f59b65ee06028554f3f74b66025" args="(const RV &rv) const " --> |
---|
| 112 | virtual <a class="el" href="classepdf.html">epdf</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classepdf.html#38de9f59b65ee06028554f3f74b66025">marginal</a> (const <a class="el" href="classRV.html">RV</a> &<a class="el" href="classepdf.html#74da992e3f5d598da8850b646b79b9d9">rv</a>) const </td></tr> |
---|
[181] | 113 | |
---|
| 114 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Return marginal density on the given <a class="el" href="classRV.html" title="Class representing variables, most often random variables.">RV</a>, the remainig rvs are intergrated out. <br></td></tr> |
---|
[171] | 115 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ca0d32aabb4cbba347e0c37fe8607562"></a><!-- doxytag: member="eDirich::_rv" ref="ca0d32aabb4cbba347e0c37fe8607562" args="() const " --> |
---|
| 116 | const <a class="el" href="classRV.html">RV</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classepdf.html#ca0d32aabb4cbba347e0c37fe8607562">_rv</a> () const </td></tr> |
---|
| 117 | |
---|
| 118 | <tr><td class="mdescLeft"> </td><td class="mdescRight">access function, possibly dangerous! <br></td></tr> |
---|
| 119 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7fb94ce90d1ac7077d29f7d6a6c3e0a5"></a><!-- doxytag: member="eDirich::_renewrv" ref="7fb94ce90d1ac7077d29f7d6a6c3e0a5" args="(const RV &in_rv)" --> |
---|
| 120 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classepdf.html#7fb94ce90d1ac7077d29f7d6a6c3e0a5">_renewrv</a> (const <a class="el" href="classRV.html">RV</a> &in_rv)</td></tr> |
---|
| 121 | |
---|
| 122 | <tr><td class="mdescLeft"> </td><td class="mdescRight">modifier function - useful when copying epdfs <br></td></tr> |
---|
| 123 | <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> |
---|
| 124 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="15e6b65e9595eedc8a1286c6cecd36d7"></a><!-- doxytag: member="eDirich::beta" ref="15e6b65e9595eedc8a1286c6cecd36d7" args="" --> |
---|
| 125 | vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classeDirich.html#15e6b65e9595eedc8a1286c6cecd36d7">beta</a></td></tr> |
---|
| 126 | |
---|
| 127 | <tr><td class="mdescLeft"> </td><td class="mdescRight">sufficient statistics <br></td></tr> |
---|
| 128 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="74da992e3f5d598da8850b646b79b9d9"></a><!-- doxytag: member="eDirich::rv" ref="74da992e3f5d598da8850b646b79b9d9" args="" --> |
---|
| 129 | <a class="el" href="classRV.html">RV</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classepdf.html#74da992e3f5d598da8850b646b79b9d9">rv</a></td></tr> |
---|
| 130 | |
---|
| 131 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Identified of the random variable. <br></td></tr> |
---|
| 132 | </table> |
---|
| 133 | <hr><a name="_details"></a><h2>Detailed Description</h2> |
---|
| 134 | Dirichlet posterior density. |
---|
| 135 | <p> |
---|
| 136 | Continuous Dirichlet density of <img class="formulaInl" alt="$n$" src="form_73.png">-dimensional variable <img class="formulaInl" alt="$x$" src="form_28.png"> <p class="formulaDsp"> |
---|
| 137 | <img class="formulaDsp" alt="\[ f(x|\beta) = \frac{\Gamma[\gamma]}{\prod_{i=1}^{n}\Gamma(\beta_i)} \prod_{i=1}^{n}x_i^{\beta_i-1} \]" src="form_76.png"> |
---|
| 138 | <p> |
---|
| 139 | where <img class="formulaInl" alt="$\gamma=\sum_i \beta_i$" src="form_77.png">. <hr>The documentation for this class was generated from the following file:<ul> |
---|
| 140 | <li>work/git/mixpp/bdm/stat/<a class="el" href="libEF_8h-source.html">libEF.h</a></ul> |
---|
| 141 | </div> |
---|
[224] | 142 | <hr size="1"><address style="text-align: right;"><small>Generated on Mon Jan 5 19:29:15 2009 for mixpp by |
---|
[171] | 143 | <a href="http://www.doxygen.org/index.html"> |
---|
| 144 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address> |
---|
| 145 | </body> |
---|
| 146 | </html> |
---|