root/doc/html/classbdm_1_1BM.html @ 275

Revision 275, 18.0 kB (checked in by smidl, 15 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::BM 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<script type="text/javascript">
9<!--
10function changeDisplayState (e){
11  var num=this.id.replace(/[^[0-9]/g,'');
12  var button=this.firstChild;
13  var sectionDiv=document.getElementById('dynsection'+num);
14  if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){
15    sectionDiv.style.display='block';
16    button.src='open.gif';
17  }else{
18    sectionDiv.style.display='none';
19    button.src='closed.gif';
20  }
21}
22function initDynSections(){
23  var divs=document.getElementsByTagName('div');
24  var sectionCounter=1;
25  for(var i=0;i<divs.length-1;i++){
26    if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){
27      var header=divs[i];
28      var section=divs[i+1];
29      var button=header.firstChild;
30      if (button!='IMG'){
31        divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild);
32        button=document.createElement('img');
33        divs[i].insertBefore(button,divs[i].firstChild);
34      }
35      header.style.cursor='pointer';
36      header.onclick=changeDisplayState;
37      header.id='dynheader'+sectionCounter;
38      button.src='closed.gif';
39      section.id='dynsection'+sectionCounter;
40      section.style.display='none';
41      section.style.marginLeft='14px';
42      sectionCounter++;
43    }
44  }
45}
46window.onload = initDynSections;
47-->
48</script>
49<div class="navigation" id="top">
50  <div class="tabs">
51    <ul>
52      <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
53      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
54      <li><a href="modules.html"><span>Modules</span></a></li>
55      <li class="current"><a href="classes.html"><span>Classes</span></a></li>
56      <li><a href="files.html"><span>Files</span></a></li>
57    </ul>
58  </div>
59  <div class="tabs">
60    <ul>
61      <li><a href="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
62      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
63      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
64      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
65    </ul>
66  </div>
67  <div class="navpath"><b>bdm</b>::<a class="el" href="classbdm_1_1BM.html">BM</a>
68  </div>
69</div>
70<div class="contents">
71<h1>bdm::BM Class Reference</h1><!-- doxytag: class="bdm::BM" --><!-- doxytag: inherits="bdm::bdmroot" --><code>#include &lt;<a class="el" href="libBM_8h-source.html">libBM.h</a>&gt;</code>
72<p>
73<div class="dynheader">
74Inheritance diagram for bdm::BM:</div>
75<div class="dynsection">
76
77<p><center><img src="classbdm_1_1BM.png" usemap="#bdm::BM_map" border="0" alt=""></center>
78<map name="bdm::BM_map">
79<area href="classbdm_1_1bdmroot.html" alt="bdm::bdmroot" shape="rect" coords="604,0,745,24">
80<area href="classbdm_1_1BMEF.html" alt="bdm::BMEF" shape="rect" coords="0,112,141,136">
81<area href="classbdm_1_1EKFfull.html" alt="bdm::EKFfull" shape="rect" coords="302,112,443,136">
82<area href="classbdm_1_1Kalman.html" alt="bdm::Kalman< sq_T >" shape="rect" coords="453,112,594,136">
83<area href="classbdm_1_1PF.html" alt="bdm::PF" shape="rect" coords="604,112,745,136">
84<area href="classbdm_1_1Kalman.html" alt="bdm::Kalman< chmat >" shape="rect" coords="755,112,896,136">
85<area href="classbdm_1_1Kalman.html" alt="bdm::Kalman< fsqmat >" shape="rect" coords="906,112,1047,136">
86<area href="classbdm_1_1Kalman.html" alt="bdm::Kalman< ldmat >" shape="rect" coords="1057,112,1198,136">
87<area href="classbdm_1_1ARX.html" alt="bdm::ARX" shape="rect" coords="151,168,292,192">
88<area href="classbdm_1_1MixEF.html" alt="bdm::MixEF" shape="rect" coords="151,224,292,248">
89<area href="classbdm_1_1multiBM.html" alt="bdm::multiBM" shape="rect" coords="151,280,292,304">
90<area href="classbdm_1_1EKFful__unQR.html" alt="bdm::EKFful_unQR" shape="rect" coords="302,168,443,192">
91<area href="classbdm_1_1MPF.html" alt="bdm::MPF< BM_T >" shape="rect" coords="604,168,745,192">
92<area href="classbdm_1_1KalmanCh.html" alt="bdm::KalmanCh" shape="rect" coords="755,168,896,192">
93<area href="classbdm_1_1EKF.html" alt="bdm::EKF< sq_T >" shape="rect" coords="906,168,1047,192">
94<area href="classbdm_1_1KFcondQR.html" alt="bdm::KFcondQR" shape="rect" coords="1208,168,1349,192">
95<area href="classbdm_1_1KFcondR.html" alt="bdm::KFcondR" shape="rect" coords="1208,224,1349,248">
96</map>
97</div>
98
99<p>
100<a href="classbdm_1_1BM-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
101Bayesian Model of a system, i.e. all uncertainty is modeled by probabilities.
102<p>
103<table border="0" cellpadding="0" cellspacing="0">
104<tr><td></td></tr>
105<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
106<tr><td colspan="2"><div class="groupHeader">Constructors</div></td></tr>
107<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="db12aecc3135e7868c664e39e7133756"></a><!-- doxytag: member="bdm::BM::BM" ref="db12aecc3135e7868c664e39e7133756" args="()" -->
108&nbsp;</td><td class="memItemRight" valign="bottom"><b>BM</b> ()</td></tr>
109
110<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="241b3701190ff1f729fe873a2eef0055"></a><!-- doxytag: member="bdm::BM::BM" ref="241b3701190ff1f729fe873a2eef0055" args="(const BM &amp;B)" -->
111&nbsp;</td><td class="memItemRight" valign="bottom"><b>BM</b> (const <a class="el" href="classbdm_1_1BM.html">BM</a> &amp;B)</td></tr>
112
113<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>
114
115<tr><td colspan="2"><div class="groupHeader">Mathematical operations</div></td></tr>
116<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#60b1779a577367c369a932cabd3a6188">bayes</a> (const vec &amp;dt)=0</td></tr>
117
118<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Incremental Bayes rule.  <a href="#60b1779a577367c369a932cabd3a6188"></a><br></td></tr>
119<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1dee3fddaf021e62d925289660a707dc"></a><!-- doxytag: member="bdm::BM::bayesB" ref="1dee3fddaf021e62d925289660a707dc" args="(const mat &amp;Dt)" -->
120virtual 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>
121
122<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Batch Bayes rule (columns of Dt are observations). <br></td></tr>
123<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>
124
125<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0e8ebe61fb14990abe1254bd3dda5fae"></a><!-- doxytag: member="bdm::BM::logpred_m" ref="0e8ebe61fb14990abe1254bd3dda5fae" args="(const mat &amp;dt) const " -->
126vec&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>
127
128<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Matrix version of logpred. <br></td></tr>
129<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="688d7a2aced1e06aa1c468d73a9e5eba"></a><!-- doxytag: member="bdm::BM::epredictor" ref="688d7a2aced1e06aa1c468d73a9e5eba" args="() const " -->
130virtual <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>
131
132<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_49.png">. <br></td></tr>
133<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="598b25e3f3d96a5bc00a5faeb5b3c912"></a><!-- doxytag: member="bdm::BM::predictor" ref="598b25e3f3d96a5bc00a5faeb5b3c912" args="() const " -->
134virtual <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>
135
136<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructs a conditional density 1-step ahead predictor. <br></td></tr>
137<tr><td colspan="2"><div class="groupHeader">Access to attributes</div></td></tr>
138<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ff2d8755ba0b3def927d31305c03b09c"></a><!-- doxytag: member="bdm::BM::_drv" ref="ff2d8755ba0b3def927d31305c03b09c" args="() const " -->
139const <a class="el" href="classbdm_1_1RV.html">RV</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><b>_drv</b> () const </td></tr>
140
141<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f135ae6dce7e9f30c9f88229c7930b96"></a><!-- doxytag: member="bdm::BM::set_drv" ref="f135ae6dce7e9f30c9f88229c7930b96" args="(const RV &amp;rv)" -->
142void&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>
143
144<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b38d92f17620813ad872d86e01a26e5e"></a><!-- doxytag: member="bdm::BM::set_rv" ref="b38d92f17620813ad872d86e01a26e5e" args="(const RV &amp;rv)" -->
145void&nbsp;</td><td class="memItemRight" valign="bottom"><b>set_rv</b> (const <a class="el" href="classbdm_1_1RV.html">RV</a> &amp;rv)</td></tr>
146
147<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5be65d37dedfe33a3671e7065f523a70"></a><!-- doxytag: member="bdm::BM::_ll" ref="5be65d37dedfe33a3671e7065f523a70" args="() const " -->
148double&nbsp;</td><td class="memItemRight" valign="bottom"><b>_ll</b> () const </td></tr>
149
150<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="236b3abbcc93594fc97cd86d82c1a83f"></a><!-- doxytag: member="bdm::BM::set_evalll" ref="236b3abbcc93594fc97cd86d82c1a83f" args="(bool evl0)" -->
151void&nbsp;</td><td class="memItemRight" valign="bottom"><b>set_evalll</b> (bool evl0)</td></tr>
152
153<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bb7b0065d6cb722a66b371a8260121e1"></a><!-- doxytag: member="bdm::BM::posterior" ref="bb7b0065d6cb722a66b371a8260121e1" args="() const =0" -->
154virtual const <a class="el" href="classbdm_1_1epdf.html">epdf</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><b>posterior</b> () const =0</td></tr>
155
156<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4ed0f8b880e606316ae800f3a011c3a6"></a><!-- doxytag: member="bdm::BM::_e" ref="4ed0f8b880e606316ae800f3a011c3a6" args="() const =0" -->
157virtual 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>
158
159<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
160<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c400357e37d27a4834b2b1d9211009ed"></a><!-- doxytag: member="bdm::BM::drv" ref="c400357e37d27a4834b2b1d9211009ed" args="" -->
161<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>
162
163<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Random variable of the data (optional). <br></td></tr>
164<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4064b6559d962633e4372b12f4cd204a"></a><!-- doxytag: member="bdm::BM::ll" ref="4064b6559d962633e4372b12f4cd204a" args="" -->
165double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#4064b6559d962633e4372b12f4cd204a">ll</a></td></tr>
166
167<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Logarithm of marginalized data likelihood. <br></td></tr>
168<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="faff0ad12556fe7dc0e2807d4fd938ee"></a><!-- doxytag: member="bdm::BM::evalll" ref="faff0ad12556fe7dc0e2807d4fd938ee" args="" -->
169bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#faff0ad12556fe7dc0e2807d4fd938ee">evalll</a></td></tr>
170
171<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>
172</table>
173<hr><h2>Member Function Documentation</h2>
174<a class="anchor" name="c0f027ff91d8459937c6f60ff8e553ff"></a><!-- doxytag: member="bdm::BM::_copy_" ref="c0f027ff91d8459937c6f60ff8e553ff" args="()" -->
175<div class="memitem">
176<div class="memproto">
177      <table class="memname">
178        <tr>
179          <td class="memname">virtual <a class="el" href="classbdm_1_1BM.html">BM</a>* bdm::BM::_copy_           </td>
180          <td>(</td>
181          <td class="paramname">          </td>
182          <td>&nbsp;)&nbsp;</td>
183          <td><code> [inline, virtual]</code></td>
184        </tr>
185      </table>
186</div>
187<div class="memdoc">
188
189<p>
190Copy 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>);}
191</pre></div> 
192<p>Reimplemented in <a class="el" href="classbdm_1_1ARX.html#60c40b5c6abc4c7e464b4ccae64a5a61">bdm::ARX</a>.</p>
193
194</div>
195</div><p>
196<a class="anchor" name="60b1779a577367c369a932cabd3a6188"></a><!-- doxytag: member="bdm::BM::bayes" ref="60b1779a577367c369a932cabd3a6188" args="(const vec &amp;dt)=0" -->
197<div class="memitem">
198<div class="memproto">
199      <table class="memname">
200        <tr>
201          <td class="memname">virtual void bdm::BM::bayes           </td>
202          <td>(</td>
203          <td class="paramtype">const vec &amp;&nbsp;</td>
204          <td class="paramname"> <em>dt</em>          </td>
205          <td>&nbsp;)&nbsp;</td>
206          <td><code> [pure virtual]</code></td>
207        </tr>
208      </table>
209</div>
210<div class="memdoc">
211
212<p>
213Incremental Bayes rule.
214<p>
215<dl compact><dt><b>Parameters:</b></dt><dd>
216  <table border="0" cellspacing="2" cellpadding="0">
217    <tr><td valign="top"></td><td valign="top"><em>dt</em>&nbsp;</td><td>vector of input data </td></tr>
218  </table>
219</dl>
220
221<p>Implemented in <a class="el" href="classbdm_1_1ARX.html#8bdf2974052e8ce74eb0d4f3791c58a3">bdm::ARX</a>, <a class="el" href="classbdm_1_1Kalman.html#4a39330c14eff8d13179e868a1d1aa8c">bdm::Kalman&lt; sq_T &gt;</a>, <a class="el" href="classbdm_1_1KalmanCh.html#b41fe5540548100b08e1684c3be767b6">bdm::KalmanCh</a>, <a class="el" href="classbdm_1_1EKFfull.html#f149ae8e9ce14d9931a7bb2850736699">bdm::EKFfull</a>, <a class="el" href="classbdm_1_1EKF.html#3fb182ecc29b10ca1163cecbf3bcccfa">bdm::EKF&lt; sq_T &gt;</a>, <a class="el" href="classbdm_1_1EKFCh.html#4c8609c37290b158f88a31dae4047225">bdm::EKFCh</a>, <a class="el" href="classbdm_1_1PF.html#638946eea22d4964bf9350286bb4efd8">bdm::PF</a>, <a class="el" href="classbdm_1_1MPF.html#286d040770d08bd7ff416cea617b1b14">bdm::MPF&lt; BM_T &gt;</a>, <a class="el" href="classbdm_1_1MixEF.html#5bd7da667da183eed1577f11dff0c1f1">bdm::MixEF</a>, <a class="el" href="classbdm_1_1BMEF.html#c287f4c0c1ea31b91572ec45351838f1">bdm::BMEF</a>, <a class="el" href="classbdm_1_1multiBM.html#1e4bf41b61937fd80f34049742e23f95">bdm::multiBM</a>, <a class="el" href="classbdm_1_1Kalman.html#4a39330c14eff8d13179e868a1d1aa8c">bdm::Kalman&lt; ldmat &gt;</a>, <a class="el" href="classbdm_1_1Kalman.html#4a39330c14eff8d13179e868a1d1aa8c">bdm::Kalman&lt; chmat &gt;</a>, and <a class="el" href="classbdm_1_1Kalman.html#4a39330c14eff8d13179e868a1d1aa8c">bdm::Kalman&lt; fsqmat &gt;</a>.</p>
222
223<p>Referenced by <a class="el" href="libBM_8cpp-source.html#l00229">bayesB()</a>.</p>
224
225</div>
226</div><p>
227<a class="anchor" name="50257e0c1e5b5c73153ea6e716ad8ae0"></a><!-- doxytag: member="bdm::BM::logpred" ref="50257e0c1e5b5c73153ea6e716ad8ae0" args="(const vec &amp;dt) const " -->
228<div class="memitem">
229<div class="memproto">
230      <table class="memname">
231        <tr>
232          <td class="memname">virtual double bdm::BM::logpred           </td>
233          <td>(</td>
234          <td class="paramtype">const vec &amp;&nbsp;</td>
235          <td class="paramname"> <em>dt</em>          </td>
236          <td>&nbsp;)&nbsp;</td>
237          <td> const<code> [inline, virtual]</code></td>
238        </tr>
239      </table>
240</div>
241<div class="memdoc">
242
243<p>
244Evaluates predictive log-likelihood of the given data record I.e. marginal likelihood of the data with the posterior integrated out.
245<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>
246
247<p>Referenced by <a class="el" href="libBM_8h-source.html#l00628">logpred_m()</a>.</p>
248
249</div>
250</div><p>
251<hr>The documentation for this class was generated from the following files:<ul>
252<li><a class="el" href="libBM_8h-source.html">libBM.h</a><li>libBM.cpp</ul>
253</div>
254<hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 16 10:06:41 2009 for mixpp by&nbsp;
255<a href="http://www.doxygen.org/index.html">
256<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
257</body>
258</html>
Note: See TracBrowser for help on using the browser.