root/doc/html/classbdm_1_1BMEF.html @ 270

Revision 270, 18.5 kB (checked in by smidl, 16 years ago)

Changes in the very root classes!
* rv and rvc are no longer compulsory,
* samplecond does not return ll
* BM has drv

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::BMEF 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><a href="namespaces.html"><span>Namespaces</span></a></li>
15      <li class="current"><a href="classes.html"><span>Classes</span></a></li>
16      <li><a href="files.html"><span>Files</span></a></li>
17    </ul>
18  </div>
19  <div class="tabs">
20    <ul>
21      <li><a href="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
22      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
23      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
24      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
25    </ul>
26  </div>
27  <div class="navpath"><a class="el" href="namespacebdm.html">bdm</a>::<a class="el" href="classbdm_1_1BMEF.html">BMEF</a>
28  </div>
29</div>
30<div class="contents">
31<h1>bdm::BMEF Class Reference</h1><!-- doxytag: class="bdm::BMEF" --><!-- doxytag: inherits="bdm::BM" --><code>#include &lt;<a class="el" href="libEF_8h-source.html">libEF.h</a>&gt;</code>
32<p>
33<div class="dynheader">
34Inheritance diagram for bdm::BMEF:</div>
35<div class="dynsection">
36<p><center><img src="classbdm_1_1BMEF__inherit__graph.png" border="0" usemap="#bdm_1_1BMEF__inherit__map" alt="Inheritance graph"></center>
37<map name="bdm_1_1BMEF__inherit__map">
38<area shape="rect" href="classbdm_1_1ARX.html" title="Linear Autoregressive model with Gaussian noise." alt="" coords="5,239,88,265"><area shape="rect" href="classbdm_1_1MixEF.html" title="Mixture of Exponential Family Densities." alt="" coords="112,239,205,265"><area shape="rect" href="classbdm_1_1multiBM.html" title="Estimator for Multinomial density." alt="" coords="229,239,339,265"><area shape="rect" href="classbdm_1_1BM.html" title="Bayesian Model of a system, i.e. all uncertainty is modeled by probabilities." alt="" coords="120,84,197,111"><area shape="rect" href="classbdm_1_1bdmroot.html" title="Root class of BDM objects." alt="" coords="103,7,215,33"></map>
39<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>
40
41<p>
42<a href="classbdm_1_1BMEF-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
43Estimator for Exponential family. <table border="0" cellpadding="0" cellspacing="0">
44<tr><td></td></tr>
45<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
46<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2def512872ed8a4fc3b702371ec0be55"></a><!-- doxytag: member="bdm::BMEF::BMEF" ref="2def512872ed8a4fc3b702371ec0be55" args="(double frg0=1.0)" -->
47&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BMEF.html#2def512872ed8a4fc3b702371ec0be55">BMEF</a> (double frg0=1.0)</td></tr>
48
49<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default constructor (=empty constructor). <br></td></tr>
50<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9662379513101405e159e76717104e62"></a><!-- doxytag: member="bdm::BMEF::BMEF" ref="9662379513101405e159e76717104e62" args="(const BMEF &amp;B)" -->
51&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BMEF.html#9662379513101405e159e76717104e62">BMEF</a> (const <a class="el" href="classbdm_1_1BMEF.html">BMEF</a> &amp;B)</td></tr>
52
53<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Copy constructor. <br></td></tr>
54<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d2b528b7a41ca67163152142f5404051"></a><!-- doxytag: member="bdm::BMEF::set_statistics" ref="d2b528b7a41ca67163152142f5404051" args="(const BMEF *BM0)" -->
55virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BMEF.html#d2b528b7a41ca67163152142f5404051">set_statistics</a> (const <a class="el" href="classbdm_1_1BMEF.html">BMEF</a> *BM0)</td></tr>
56
57<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">get statistics from another model <br></td></tr>
58<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bf58deb99af2a6cc674f13ff90300de6"></a><!-- doxytag: member="bdm::BMEF::bayes" ref="bf58deb99af2a6cc674f13ff90300de6" args="(const vec &amp;data, const double w)" -->
59virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BMEF.html#bf58deb99af2a6cc674f13ff90300de6">bayes</a> (const vec &amp;data, const double w)</td></tr>
60
61<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Weighted update of sufficient statistics (Bayes rule). <br></td></tr>
62<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BMEF.html#c287f4c0c1ea31b91572ec45351838f1">bayes</a> (const vec &amp;dt)</td></tr>
63
64<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Incremental Bayes rule.  <a href="#c287f4c0c1ea31b91572ec45351838f1"></a><br></td></tr>
65<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b2916a2e71a958665054473124d5e749"></a><!-- doxytag: member="bdm::BMEF::flatten" ref="b2916a2e71a958665054473124d5e749" args="(const BMEF *B)" -->
66virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BMEF.html#b2916a2e71a958665054473124d5e749">flatten</a> (const <a class="el" href="classbdm_1_1BMEF.html">BMEF</a> *B)</td></tr>
67
68<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Flatten the posterior according to the given <a class="el" href="classbdm_1_1BMEF.html" title="Estimator for Exponential family.">BMEF</a> (of the same type!). <br></td></tr>
69<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5912dbcf28ae711e30b08c2fa766a3e6"></a><!-- doxytag: member="bdm::BMEF::_copy_" ref="5912dbcf28ae711e30b08c2fa766a3e6" args="(bool changerv=false)" -->
70<a class="el" href="classbdm_1_1BMEF.html">BMEF</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BMEF.html#5912dbcf28ae711e30b08c2fa766a3e6">_copy_</a> (bool changerv=false)</td></tr>
71
72<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Flatten the posterior as if to keep nu0 data. <br></td></tr>
73<tr><td colspan="2"><div class="groupHeader">Constructors</div></td></tr>
74<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classbdm_1_1BM.html">BM</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#c0f027ff91d8459937c6f60ff8e553ff">_copy_</a> ()</td></tr>
75
76<tr><td colspan="2"><div class="groupHeader">Mathematical operations</div></td></tr>
77<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1dee3fddaf021e62d925289660a707dc"></a><!-- doxytag: member="bdm::BMEF::bayesB" ref="1dee3fddaf021e62d925289660a707dc" args="(const mat &amp;Dt)" -->
78virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#1dee3fddaf021e62d925289660a707dc">bayesB</a> (const mat &amp;Dt)</td></tr>
79
80<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Batch Bayes rule (columns of Dt are observations). <br></td></tr>
81<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#50257e0c1e5b5c73153ea6e716ad8ae0">logpred</a> (const vec &amp;dt) const </td></tr>
82
83<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0e8ebe61fb14990abe1254bd3dda5fae"></a><!-- doxytag: member="bdm::BMEF::logpred_m" ref="0e8ebe61fb14990abe1254bd3dda5fae" args="(const mat &amp;dt) const " -->
84vec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#0e8ebe61fb14990abe1254bd3dda5fae">logpred_m</a> (const mat &amp;dt) const </td></tr>
85
86<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Matrix version of logpred. <br></td></tr>
87<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="688d7a2aced1e06aa1c468d73a9e5eba"></a><!-- doxytag: member="bdm::BMEF::epredictor" ref="688d7a2aced1e06aa1c468d73a9e5eba" args="() const " -->
88virtual <a class="el" href="classbdm_1_1epdf.html">epdf</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#688d7a2aced1e06aa1c468d73a9e5eba">epredictor</a> () const </td></tr>
89
90<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructs a predictive density <img class="formulaInl" alt="$ f(d_{t+1} |d_{t}, \ldots d_{0}) $" src="form_112.png">. <br></td></tr>
91<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="598b25e3f3d96a5bc00a5faeb5b3c912"></a><!-- doxytag: member="bdm::BMEF::predictor" ref="598b25e3f3d96a5bc00a5faeb5b3c912" args="() const " -->
92virtual <a class="el" href="classbdm_1_1mpdf.html">mpdf</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#598b25e3f3d96a5bc00a5faeb5b3c912">predictor</a> () const </td></tr>
93
94<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructs a conditional density 1-step ahead predictor. <br></td></tr>
95<tr><td colspan="2"><div class="groupHeader">Access to attributes</div></td></tr>
96<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ff2d8755ba0b3def927d31305c03b09c"></a><!-- doxytag: member="bdm::BMEF::_drv" ref="ff2d8755ba0b3def927d31305c03b09c" args="() const " -->
97const <a class="el" href="classbdm_1_1RV.html">RV</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><b>_drv</b> () const </td></tr>
98
99<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f135ae6dce7e9f30c9f88229c7930b96"></a><!-- doxytag: member="bdm::BMEF::set_drv" ref="f135ae6dce7e9f30c9f88229c7930b96" args="(const RV &amp;rv)" -->
100void&nbsp;</td><td class="memItemRight" valign="bottom"><b>set_drv</b> (const <a class="el" href="classbdm_1_1RV.html">RV</a> &amp;rv)</td></tr>
101
102<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5be65d37dedfe33a3671e7065f523a70"></a><!-- doxytag: member="bdm::BMEF::_ll" ref="5be65d37dedfe33a3671e7065f523a70" args="() const " -->
103double&nbsp;</td><td class="memItemRight" valign="bottom"><b>_ll</b> () const </td></tr>
104
105<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="236b3abbcc93594fc97cd86d82c1a83f"></a><!-- doxytag: member="bdm::BMEF::set_evalll" ref="236b3abbcc93594fc97cd86d82c1a83f" args="(bool evl0)" -->
106void&nbsp;</td><td class="memItemRight" valign="bottom"><b>set_evalll</b> (bool evl0)</td></tr>
107
108<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="963258c4c2dd05be001003b19aceefef"></a><!-- doxytag: member="bdm::BMEF::_epdf" ref="963258c4c2dd05be001003b19aceefef" args="() const =0" -->
109virtual const <a class="el" href="classbdm_1_1epdf.html">epdf</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><b>_epdf</b> () const =0</td></tr>
110
111<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4ed0f8b880e606316ae800f3a011c3a6"></a><!-- doxytag: member="bdm::BMEF::_e" ref="4ed0f8b880e606316ae800f3a011c3a6" args="() const =0" -->
112virtual const <a class="el" href="classbdm_1_1epdf.html">epdf</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><b>_e</b> () const =0</td></tr>
113
114<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
115<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1331865e10fb1ccef65bb4c47fa3be64"></a><!-- doxytag: member="bdm::BMEF::frg" ref="1331865e10fb1ccef65bb4c47fa3be64" args="" -->
116double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BMEF.html#1331865e10fb1ccef65bb4c47fa3be64">frg</a></td></tr>
117
118<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">forgetting factor <br></td></tr>
119<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="06e7b3ac03e10017d4288c76888e2865"></a><!-- doxytag: member="bdm::BMEF::last_lognc" ref="06e7b3ac03e10017d4288c76888e2865" args="" -->
120double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BMEF.html#06e7b3ac03e10017d4288c76888e2865">last_lognc</a></td></tr>
121
122<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">cached value of lognc() in the previous step (used in evaluation of <code>ll</code> ) <br></td></tr>
123<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c400357e37d27a4834b2b1d9211009ed"></a><!-- doxytag: member="bdm::BMEF::drv" ref="c400357e37d27a4834b2b1d9211009ed" args="" -->
124<a class="el" href="classbdm_1_1RV.html">RV</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#c400357e37d27a4834b2b1d9211009ed">drv</a></td></tr>
125
126<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Random variable of the data (optional). <br></td></tr>
127<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4064b6559d962633e4372b12f4cd204a"></a><!-- doxytag: member="bdm::BMEF::ll" ref="4064b6559d962633e4372b12f4cd204a" args="" -->
128double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#4064b6559d962633e4372b12f4cd204a">ll</a></td></tr>
129
130<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Logarithm of marginalized data likelihood. <br></td></tr>
131<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="faff0ad12556fe7dc0e2807d4fd938ee"></a><!-- doxytag: member="bdm::BMEF::evalll" ref="faff0ad12556fe7dc0e2807d4fd938ee" args="" -->
132bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#faff0ad12556fe7dc0e2807d4fd938ee">evalll</a></td></tr>
133
134<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">If true, the filter will compute likelihood of the data record and store it in <code>ll</code> . Set to false if you want to save computational time. <br></td></tr>
135</table>
136<hr><h2>Member Function Documentation</h2>
137<a class="anchor" name="c287f4c0c1ea31b91572ec45351838f1"></a><!-- doxytag: member="bdm::BMEF::bayes" ref="c287f4c0c1ea31b91572ec45351838f1" args="(const vec &amp;dt)" -->
138<div class="memitem">
139<div class="memproto">
140      <table class="memname">
141        <tr>
142          <td class="memname">void bdm::BMEF::bayes           </td>
143          <td>(</td>
144          <td class="paramtype">const vec &amp;&nbsp;</td>
145          <td class="paramname"> <em>dt</em>          </td>
146          <td>&nbsp;)&nbsp;</td>
147          <td><code> [virtual]</code></td>
148        </tr>
149      </table>
150</div>
151<div class="memdoc">
152
153<p>
154Incremental Bayes rule.
155<p>
156<dl compact><dt><b>Parameters:</b></dt><dd>
157  <table border="0" cellspacing="2" cellpadding="0">
158    <tr><td valign="top"></td><td valign="top"><em>dt</em>&nbsp;</td><td>vector of input data </td></tr>
159  </table>
160</dl>
161
162<p>Implements <a class="el" href="classbdm_1_1BM.html#60b1779a577367c369a932cabd3a6188">bdm::BM</a>.</p>
163
164<p>Reimplemented in <a class="el" href="classbdm_1_1ARX.html#8bdf2974052e8ce74eb0d4f3791c58a3">bdm::ARX</a>, <a class="el" href="classbdm_1_1MixEF.html#5bd7da667da183eed1577f11dff0c1f1">bdm::MixEF</a>, and <a class="el" href="classbdm_1_1multiBM.html#1e4bf41b61937fd80f34049742e23f95">bdm::multiBM</a>.</p>
165
166<p>References <a class="el" href="libEF_8h-source.html#l00088">bayes()</a>.</p>
167
168</div>
169</div><p>
170<a class="anchor" name="c0f027ff91d8459937c6f60ff8e553ff"></a><!-- doxytag: member="bdm::BMEF::_copy_" ref="c0f027ff91d8459937c6f60ff8e553ff" args="()" -->
171<div class="memitem">
172<div class="memproto">
173      <table class="memname">
174        <tr>
175          <td class="memname">virtual <a class="el" href="classbdm_1_1BM.html">BM</a>* bdm::BM::_copy_           </td>
176          <td>(</td>
177          <td class="paramname">          </td>
178          <td>&nbsp;)&nbsp;</td>
179          <td><code> [inline, virtual, inherited]</code></td>
180        </tr>
181      </table>
182</div>
183<div class="memdoc">
184
185<p>
186Copy function required in vectors, Arrays of <a class="el" href="classbdm_1_1BM.html" title="Bayesian Model of a system, i.e. all uncertainty is modeled by probabilities.">BM</a> etc. Have to be DELETED manually! Prototype: <div class="fragment"><pre class="fragment"> BM* <a class="code" href="classbdm_1_1BM.html#c0f027ff91d8459937c6f60ff8e553ff">_copy_</a>(){<span class="keywordflow">return</span> <span class="keyword">new</span> BM(*<span class="keyword">this</span>);}
187</pre></div> 
188<p>Reimplemented in <a class="el" href="classbdm_1_1ARX.html#60c40b5c6abc4c7e464b4ccae64a5a61">bdm::ARX</a>.</p>
189
190</div>
191</div><p>
192<a class="anchor" name="50257e0c1e5b5c73153ea6e716ad8ae0"></a><!-- doxytag: member="bdm::BMEF::logpred" ref="50257e0c1e5b5c73153ea6e716ad8ae0" args="(const vec &amp;dt) const " -->
193<div class="memitem">
194<div class="memproto">
195      <table class="memname">
196        <tr>
197          <td class="memname">virtual double bdm::BM::logpred           </td>
198          <td>(</td>
199          <td class="paramtype">const vec &amp;&nbsp;</td>
200          <td class="paramname"> <em>dt</em>          </td>
201          <td>&nbsp;)&nbsp;</td>
202          <td> const<code> [inline, virtual, inherited]</code></td>
203        </tr>
204      </table>
205</div>
206<div class="memdoc">
207
208<p>
209Evaluates predictive log-likelihood of the given data record I.e. marginal likelihood of the data with the posterior integrated out.
210<p>Reimplemented in <a class="el" href="classbdm_1_1ARX.html#080a7e531e3aa06694112863b15bc6a4">bdm::ARX</a>, <a class="el" href="classbdm_1_1MixEF.html#da724da464a75e07521941e430929efa">bdm::MixEF</a>, and <a class="el" href="classbdm_1_1multiBM.html#e157b607c1e3fa91d42aeea44458e2bf">bdm::multiBM</a>.</p>
211
212<p>Referenced by <a class="el" href="libBM_8h-source.html#l00608">bdm::BM::logpred_m()</a>.</p>
213
214</div>
215</div><p>
216<hr>The documentation for this class was generated from the following files:<ul>
217<li><a class="el" href="libEF_8h-source.html">libEF.h</a><li>libEF.cpp</ul>
218</div>
219<hr size="1"><address style="text-align: right;"><small>Generated on Wed Feb 11 23:34:06 2009 for mixpp by&nbsp;
220<a href="http://www.doxygen.org/index.html">
221<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
222</body>
223</html>
Note: See TracBrowser for help on using the browser.