root/doc/html/classbdm_1_1eDirich.html @ 259

Revision 259, 16.7 kB (checked in by smidl, 16 years ago)

doc

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: bdm::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&nbsp;Page</span></a></li>
12      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
13      <li><a href="modules.html"><span>Modules</span></a></li>
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&nbsp;List</span></a></li>
21      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
22      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
23    </ul>
24  </div>
25  <div class="navpath"><b>bdm</b>::<a class="el" href="classbdm_1_1eDirich.html">eDirich</a>
26  </div>
27</div>
28<div class="contents">
29<h1>bdm::eDirich Class Reference</h1><!-- doxytag: class="bdm::eDirich" --><!-- doxytag: inherits="bdm::eEF" -->Dirichlet posterior density. 
30<a href="#_details">More...</a>
31<p>
32<code>#include &lt;<a class="el" href="libEF_8h-source.html">libEF.h</a>&gt;</code>
33<p>
34<div class="dynheader">
35Inheritance diagram for bdm::eDirich:</div>
36<div class="dynsection">
37<p><center><img src="classbdm_1_1eDirich__inherit__graph.png" border="0" usemap="#bdm_1_1eDirich__inherit__map" alt="Inheritance graph"></center>
38<map name="bdm_1_1eDirich__inherit__map">
39<area shape="rect" href="classbdm_1_1eEF.html" title="General conjugate exponential family posterior density." alt="" coords="16,161,96,188"><area shape="rect" href="classbdm_1_1epdf.html" title="Probability density function with numerical statistics, e.g. posterior density." alt="" coords="13,84,99,111"><area shape="rect" href="classbdm_1_1base.html" title="Root class of BDM objects." alt="" coords="12,7,100,33"></map>
40<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>
41<div class="dynheader">
42Collaboration diagram for bdm::eDirich:</div>
43<div class="dynsection">
44<p><center><img src="classbdm_1_1eDirich__coll__graph.png" border="0" usemap="#bdm_1_1eDirich__coll__map" alt="Collaboration graph"></center>
45<map name="bdm_1_1eDirich__coll__map">
46<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_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_1base.html" title="Root class of BDM objects." alt="" coords="17,7,105,33"><area shape="rect" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables." alt="" coords="72,87,147,113"></map>
47<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>
48
49<p>
50<a href="classbdm_1_1eDirich-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
51<tr><td></td></tr>
52<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
53<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2ae893fe9167f67bca09bc159acbf957"></a><!-- doxytag: member="bdm::eDirich::eDirich" ref="2ae893fe9167f67bca09bc159acbf957" args="(const RV &amp;rv, const vec &amp;beta0)" -->
54&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1eDirich.html#2ae893fe9167f67bca09bc159acbf957">eDirich</a> (const <a class="el" href="classbdm_1_1RV.html">RV</a> &amp;<a class="el" href="classbdm_1_1epdf.html#62c5b8ff71d9ebe6cd58d3c342eb1dc8">rv</a>, const vec &amp;beta0)</td></tr>
55
56<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default constructor. <br></td></tr>
57<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="31cc8bf709552c9e7286ac16b27c8e2c"></a><!-- doxytag: member="bdm::eDirich::eDirich" ref="31cc8bf709552c9e7286ac16b27c8e2c" args="(const eDirich &amp;D0)" -->
58&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1eDirich.html#31cc8bf709552c9e7286ac16b27c8e2c">eDirich</a> (const <a class="el" href="classbdm_1_1eDirich.html">eDirich</a> &amp;D0)</td></tr>
59
60<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Copy constructor. <br></td></tr>
61<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3290613d31d58daa8a45a54b003871fc"></a><!-- doxytag: member="bdm::eDirich::sample" ref="3290613d31d58daa8a45a54b003871fc" args="() const " -->
62vec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1eDirich.html#3290613d31d58daa8a45a54b003871fc">sample</a> () const </td></tr>
63
64<tr><td class="mdescLeft">&nbsp;</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>
65<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="cb343355ec791298bb5a3404cd482fb6"></a><!-- doxytag: member="bdm::eDirich::mean" ref="cb343355ec791298bb5a3404cd482fb6" args="() const " -->
66vec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1eDirich.html#cb343355ec791298bb5a3404cd482fb6">mean</a> () const </td></tr>
67
68<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">return expected value <br></td></tr>
69<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="43c547a2507e233706f92712d8c2aacc"></a><!-- doxytag: member="bdm::eDirich::variance" ref="43c547a2507e233706f92712d8c2aacc" args="() const " -->
70vec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1eDirich.html#43c547a2507e233706f92712d8c2aacc">variance</a> () const </td></tr>
71
72<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">return expected variance (not covariance!) <br></td></tr>
73<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e09a24938e80c3d94b0ee842d1552318"></a><!-- doxytag: member="bdm::eDirich::evallog_nn" ref="e09a24938e80c3d94b0ee842d1552318" args="(const vec &amp;val) const " -->
74double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1eDirich.html#e09a24938e80c3d94b0ee842d1552318">evallog_nn</a> (const vec &amp;val) const </td></tr>
75
76<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">In this instance, val is ... <br></td></tr>
77<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="279a99f6266c82fe2273e83841f19eb2"></a><!-- doxytag: member="bdm::eDirich::lognc" ref="279a99f6266c82fe2273e83841f19eb2" args="() const " -->
78double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1eDirich.html#279a99f6266c82fe2273e83841f19eb2">lognc</a> () const </td></tr>
79
80<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">logarithm of the normalizing constant, <img class="formulaInl" alt="$\mathcal{I}$" src="form_60.png"> <br></td></tr>
81<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="175e0add26d2105c28d8121eefb9e324"></a><!-- doxytag: member="bdm::eDirich::_beta" ref="175e0add26d2105c28d8121eefb9e324" args="()" -->
82vec &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1eDirich.html#175e0add26d2105c28d8121eefb9e324">_beta</a> ()</td></tr>
83
84<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">access function <br></td></tr>
85<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a06af2376976a33e1eceaed7e8da75a5"></a><!-- doxytag: member="bdm::eDirich::set_parameters" ref="a06af2376976a33e1eceaed7e8da75a5" args="(const vec &amp;beta0)" -->
86void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1eDirich.html#a06af2376976a33e1eceaed7e8da75a5">set_parameters</a> (const vec &amp;beta0)</td></tr>
87
88<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set internal parameters. <br></td></tr>
89<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="deef7d6273ba4d5a5cf0bbd91ec7277a"></a><!-- doxytag: member="bdm::eDirich::dupdate" ref="deef7d6273ba4d5a5cf0bbd91ec7277a" args="(mat &amp;v)" -->
90virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1eEF.html#deef7d6273ba4d5a5cf0bbd91ec7277a">dupdate</a> (mat &amp;v)</td></tr>
91
92<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">TODO decide if it is really needed. <br></td></tr>
93<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a36d06ecdd6f4c79dc122510eaccc692"></a><!-- doxytag: member="bdm::eDirich::evallog" ref="a36d06ecdd6f4c79dc122510eaccc692" args="(const vec &amp;val) const " -->
94virtual double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1eEF.html#a36d06ecdd6f4c79dc122510eaccc692">evallog</a> (const vec &amp;val) const </td></tr>
95
96<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Evaluate normalized log-probability. <br></td></tr>
97<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="79a7c8ea8c02e45d410bd1d7ffd72b41"></a><!-- doxytag: member="bdm::eDirich::evallog" ref="79a7c8ea8c02e45d410bd1d7ffd72b41" args="(const mat &amp;Val) const " -->
98virtual vec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1eEF.html#79a7c8ea8c02e45d410bd1d7ffd72b41">evallog</a> (const mat &amp;Val) const </td></tr>
99
100<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Evaluate normalized log-probability for many samples. <br></td></tr>
101<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="cf38af29e8e3d650c640509a52396053"></a><!-- doxytag: member="bdm::eDirich::pow" ref="cf38af29e8e3d650c640509a52396053" args="(double p)" -->
102virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1eEF.html#cf38af29e8e3d650c640509a52396053">pow</a> (double p)</td></tr>
103
104<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Power of the density, used e.g. to flatten the density. <br></td></tr>
105<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b4cf45fd83cc7573ede9fe1215256058"></a><!-- doxytag: member="bdm::eDirich::sample_m" ref="b4cf45fd83cc7573ede9fe1215256058" args="(int N) const " -->
106virtual mat&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#b4cf45fd83cc7573ede9fe1215256058">sample_m</a> (int N) const </td></tr>
107
108<tr><td class="mdescLeft">&nbsp;</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="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="34956d4dd3176eeb5937cf48a1546b62"></a><!-- doxytag: member="bdm::eDirich::evallog_m" ref="34956d4dd3176eeb5937cf48a1546b62" args="(const mat &amp;Val) const " -->
110virtual vec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#34956d4dd3176eeb5937cf48a1546b62">evallog_m</a> (const mat &amp;Val) const </td></tr>
111
112<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compute log-probability of multiple values argument <code>val</code>. <br></td></tr>
113<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e584eac5579c1b6384947ecf66166c77"></a><!-- doxytag: member="bdm::eDirich::condition" ref="e584eac5579c1b6384947ecf66166c77" args="(const RV &amp;rv) const " -->
114virtual <a class="el" href="classbdm_1_1mpdf.html">mpdf</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#e584eac5579c1b6384947ecf66166c77">condition</a> (const <a class="el" href="classbdm_1_1RV.html">RV</a> &amp;<a class="el" href="classbdm_1_1epdf.html#62c5b8ff71d9ebe6cd58d3c342eb1dc8">rv</a>) const </td></tr>
115
116<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return conditional density on the given <a class="el" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a>, the remaining rvs will be in conditioning. <br></td></tr>
117<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3fb2ece54f720b62ad325e61214fa0a1"></a><!-- doxytag: member="bdm::eDirich::marginal" ref="3fb2ece54f720b62ad325e61214fa0a1" args="(const RV &amp;rv) const " -->
118virtual <a class="el" href="classbdm_1_1epdf.html">epdf</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#3fb2ece54f720b62ad325e61214fa0a1">marginal</a> (const <a class="el" href="classbdm_1_1RV.html">RV</a> &amp;<a class="el" href="classbdm_1_1epdf.html#62c5b8ff71d9ebe6cd58d3c342eb1dc8">rv</a>) const </td></tr>
119
120<tr><td class="mdescLeft">&nbsp;</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>
121<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a4ab378d5e004c3ff3e2d4e64f7bba21"></a><!-- doxytag: member="bdm::eDirich::_rv" ref="a4ab378d5e004c3ff3e2d4e64f7bba21" args="() const " -->
122const <a class="el" href="classbdm_1_1RV.html">RV</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#a4ab378d5e004c3ff3e2d4e64f7bba21">_rv</a> () const </td></tr>
123
124<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">access function, possibly dangerous! <br></td></tr>
125<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="62e88cbce0ce77a8692f5e15d76e805f"></a><!-- doxytag: member="bdm::eDirich::_renewrv" ref="62e88cbce0ce77a8692f5e15d76e805f" args="(const RV &amp;in_rv)" -->
126void&nbsp;</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> &amp;in_rv)</td></tr>
127
128<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">modifier function - useful when copying epdfs <br></td></tr>
129<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
130<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f25886a49b4667af61245de81c83b5d2"></a><!-- doxytag: member="bdm::eDirich::beta" ref="f25886a49b4667af61245de81c83b5d2" args="" -->
131vec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1eDirich.html#f25886a49b4667af61245de81c83b5d2">beta</a></td></tr>
132
133<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">sufficient statistics <br></td></tr>
134<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ee9db192a6f0ab7b29c33b2a18a5e1b4"></a><!-- doxytag: member="bdm::eDirich::gamma" ref="ee9db192a6f0ab7b29c33b2a18a5e1b4" args="" -->
135double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1eDirich.html#ee9db192a6f0ab7b29c33b2a18a5e1b4">gamma</a></td></tr>
136
137<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">speedup variable <br></td></tr>
138<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="62c5b8ff71d9ebe6cd58d3c342eb1dc8"></a><!-- doxytag: member="bdm::eDirich::rv" ref="62c5b8ff71d9ebe6cd58d3c342eb1dc8" args="" -->
139<a class="el" href="classbdm_1_1RV.html">RV</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1epdf.html#62c5b8ff71d9ebe6cd58d3c342eb1dc8">rv</a></td></tr>
140
141<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Identified of the random variable. <br></td></tr>
142</table>
143<hr><a name="_details"></a><h2>Detailed Description</h2>
144Dirichlet posterior density.
145<p>
146Continuous 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">
147<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">
148<p>
149 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>
150<li>work/git/mixpp/bdm/stat/<a class="el" href="libEF_8h-source.html">libEF.h</a></ul>
151</div>
152<hr size="1"><address style="text-align: right;"><small>Generated on Tue Jan 27 16:31:35 2009 for mixpp by&nbsp;
153<a href="http://www.doxygen.org/index.html">
154<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
155</body>
156</html>
Note: See TracBrowser for help on using the browser.