root/doc/html/classmgamma.html @ 91

Revision 91, 12.2 kB (checked in by smidl, 16 years ago)

drobnosti a dokumentace

Line 
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 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.5 -->
8<div class="navigation" id="top">
9  <div class="tabs">
10    <ul>
11      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
12      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
13      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
14      <li><a href="files.html"><span>Files</span></a></li>
15    </ul>
16  </div>
17  <div class="tabs">
18    <ul>
19      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
20      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
21      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
22    </ul>
23  </div>
24</div>
25<div class="contents">
26<h1>mgamma Class Reference</h1><!-- doxytag: class="mgamma" --><!-- doxytag: inherits="mEF" -->Gamma random walk. 
27<a href="#_details">More...</a>
28<p>
29<code>#include &lt;<a class="el" href="libEF_8h-source.html">libEF.h</a>&gt;</code>
30<p>
31<div class="dynheader">
32Inheritance diagram for mgamma:</div>
33<div class="dynsection">
34<p><center><img src="classmgamma__inherit__graph.png" border="0" usemap="#mgamma__inherit__map" alt="Inheritance graph"></center>
35<map name="mgamma__inherit__map">
36<area shape="rect" href="classmgamma__fix.html" title="Gamma random walk around a fixed point." alt="" coords="5,230,101,254"><area shape="rect" href="classmEF.html" title="Exponential family model." alt="" coords="29,81,77,105"><area shape="rect" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies." alt="" coords="28,6,79,30"></map>
37<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>
38<div class="dynheader">
39Collaboration diagram for mgamma:</div>
40<div class="dynsection">
41<p><center><img src="classmgamma__coll__graph.png" border="0" usemap="#mgamma__coll__map" alt="Collaboration graph"></center>
42<map name="mgamma__coll__map">
43<area shape="rect" href="classmEF.html" title="Exponential family model." alt="" coords="5,262,53,286"><area shape="rect" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies." alt="" coords="8,185,59,209"><area shape="rect" href="classRV.html" title="Class representing variables, most often random variables." alt="" coords="41,6,79,30"><area shape="rect" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density." alt="" coords="75,96,120,120"><area shape="rect" href="classeEF.html" title="General conjugate exponential family posterior density." alt="" coords="88,185,133,209"><area shape="rect" href="classegamma.html" title="Gamma posterior density." alt="" coords="77,262,149,286"></map>
44<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>
45
46<p>
47<a href="classmgamma-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
48<tr><td></td></tr>
49<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
50<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="af43e61b86900c0398d5c0ffc83b94e6"></a><!-- doxytag: member="mgamma::mgamma" ref="af43e61b86900c0398d5c0ffc83b94e6" args="(const RV &amp;rv, const RV &amp;rvc)" -->
51&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmgamma.html#af43e61b86900c0398d5c0ffc83b94e6">mgamma</a> (const <a class="el" href="classRV.html">RV</a> &amp;<a class="el" href="classmpdf.html#f6687c07ff07d47812dd565368ca59eb">rv</a>, const <a class="el" href="classRV.html">RV</a> &amp;<a class="el" href="classmpdf.html#acb7dda792b3cd5576f39fa3129abbab">rvc</a>)</td></tr>
52
53<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor. <br></td></tr>
54<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a9d646cf758a70126dde7c48790b6e94"></a><!-- doxytag: member="mgamma::set_parameters" ref="a9d646cf758a70126dde7c48790b6e94" args="(double k)" -->
55void&nbsp;</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>
56
57<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set value of <code>k</code>. <br></td></tr>
58<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9f40dc43885085fad8e3d6652b79e139"></a><!-- doxytag: member="mgamma::samplecond" ref="9f40dc43885085fad8e3d6652b79e139" args="(vec &amp;cond, double &amp;lik)" -->
59vec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmgamma.html#9f40dc43885085fad8e3d6652b79e139">samplecond</a> (vec &amp;cond, double &amp;lik)</td></tr>
60
61<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Generate one sample of the posterior. <br></td></tr>
62<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e9d52749793f40aad85b70c6db4435ae"></a><!-- doxytag: member="mgamma::samplecond" ref="e9d52749793f40aad85b70c6db4435ae" args="(vec &amp;cond, vec &amp;lik, int n)" -->
63mat&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmgamma.html#e9d52749793f40aad85b70c6db4435ae">samplecond</a> (vec &amp;cond, vec &amp;lik, int n)</td></tr>
64
65<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Generate matrix of samples of the posterior. <br></td></tr>
66<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a61094c9f7a2d64ea77b130cbc031f97"></a><!-- doxytag: member="mgamma::condition" ref="a61094c9f7a2d64ea77b130cbc031f97" args="(const vec &amp;val)" -->
67void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmgamma.html#a61094c9f7a2d64ea77b130cbc031f97">condition</a> (const vec &amp;val)</td></tr>
68
69<tr><td class="mdescLeft">&nbsp;</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>
70<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="80b738ece5bd4f8c4edaee4b38906f91"></a><!-- doxytag: member="mgamma::evalcond" ref="80b738ece5bd4f8c4edaee4b38906f91" args="(const vec &amp;dt, const vec &amp;cond)" -->
71virtual double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmpdf.html#80b738ece5bd4f8c4edaee4b38906f91">evalcond</a> (const vec &amp;dt, const vec &amp;cond)</td></tr>
72
73<tr><td class="mdescLeft">&nbsp;</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>
74<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ec9c850305984582548e8deb64f0ffe8"></a><!-- doxytag: member="mgamma::_rvc" ref="ec9c850305984582548e8deb64f0ffe8" args="()" -->
75<a class="el" href="classRV.html">RV</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmpdf.html#ec9c850305984582548e8deb64f0ffe8">_rvc</a> ()</td></tr>
76
77<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">access function <br></td></tr>
78<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e17780ee5b2cfe05922a6c56af1462f8"></a><!-- doxytag: member="mgamma::_epdf" ref="e17780ee5b2cfe05922a6c56af1462f8" args="()" -->
79<a class="el" href="classepdf.html">epdf</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmpdf.html#e17780ee5b2cfe05922a6c56af1462f8">_epdf</a> ()</td></tr>
80
81<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">access function <br></td></tr>
82<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
83<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="612dbf35c770a780027619aaac2c443e"></a><!-- doxytag: member="mgamma::epdf" ref="612dbf35c770a780027619aaac2c443e" args="" -->
84<a class="el" href="classegamma.html">egamma</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmgamma.html#612dbf35c770a780027619aaac2c443e">epdf</a></td></tr>
85
86<tr><td class="mdescLeft">&nbsp;</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>
87<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="43f733cce0245a52363d566099add687"></a><!-- doxytag: member="mgamma::k" ref="43f733cce0245a52363d566099add687" args="" -->
88double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmgamma.html#43f733cce0245a52363d566099add687">k</a></td></tr>
89
90<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constant <img class="formulaInl" alt="$k$" src="form_41.png">. <br></td></tr>
91<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5e90652837448bcc29707e7412f99691"></a><!-- doxytag: member="mgamma::_beta" ref="5e90652837448bcc29707e7412f99691" args="" -->
92vec *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmgamma.html#5e90652837448bcc29707e7412f99691">_beta</a></td></tr>
93
94<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">cache of epdf.beta <br></td></tr>
95<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f6687c07ff07d47812dd565368ca59eb"></a><!-- doxytag: member="mgamma::rv" ref="f6687c07ff07d47812dd565368ca59eb" args="" -->
96<a class="el" href="classRV.html">RV</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmpdf.html#f6687c07ff07d47812dd565368ca59eb">rv</a></td></tr>
97
98<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">modeled random variable <br></td></tr>
99<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="acb7dda792b3cd5576f39fa3129abbab"></a><!-- doxytag: member="mgamma::rvc" ref="acb7dda792b3cd5576f39fa3129abbab" args="" -->
100<a class="el" href="classRV.html">RV</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmpdf.html#acb7dda792b3cd5576f39fa3129abbab">rvc</a></td></tr>
101
102<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">random variable in condition <br></td></tr>
103<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7aa894208a32f3487827df6d5054424c"></a><!-- doxytag: member="mgamma::ep" ref="7aa894208a32f3487827df6d5054424c" args="" -->
104<a class="el" href="classepdf.html">epdf</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmpdf.html#7aa894208a32f3487827df6d5054424c">ep</a></td></tr>
105
106<tr><td class="mdescLeft">&nbsp;</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>
107</table>
108<hr><a name="_details"></a><h2>Detailed Description</h2>
109Gamma random walk.
110<p>
111Mean value, <img class="formulaInl" alt="$\mu$" src="form_14.png">, of this density is given by <code>rvc</code> . Standard deviation of the random walk is proportional to one <img class="formulaInl" alt="$k$" src="form_41.png">-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>
112The 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 files:<ul>
113<li>work/mixpp/bdm/stat/<a class="el" href="libEF_8h-source.html">libEF.h</a><li>work/mixpp/bdm/stat/libEF.cpp</ul>
114</div>
115<hr size="1"><address style="text-align: right;"><small>Generated on Tue Apr 29 20:46:55 2008 for mixpp by&nbsp;
116<a href="http://www.doxygen.org/index.html">
117<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
118</body>
119</html>
Note: See TracBrowser for help on using the browser.