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 | <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> |
---|
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 List</span></a></li> |
---|
22 | <li><a href="annotated.html"><span>Class List</span></a></li> |
---|
23 | <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> |
---|
24 | <li><a href="functions.html"><span>Class 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_1BM.html">BM</a> |
---|
28 | </div> |
---|
29 | </div> |
---|
30 | <div class="contents"> |
---|
31 | <h1>bdm::BM Class Reference</h1><!-- doxytag: class="bdm::BM" --><!-- doxytag: inherits="bdm::bdmroot" --><code>#include <<a class="el" href="libBM_8h-source.html">libBM.h</a>></code> |
---|
32 | <p> |
---|
33 | <div class="dynheader"> |
---|
34 | Inheritance diagram for bdm::BM:</div> |
---|
35 | <div class="dynsection"> |
---|
36 | <p><center><img src="classbdm_1_1BM__inherit__graph.png" border="0" usemap="#bdm_1_1BM__inherit__map" alt="Inheritance graph"></center> |
---|
37 | <map name="bdm_1_1BM__inherit__map"> |
---|
38 | <area shape="rect" href="classbdm_1_1BMEF.html" title="Estimator for Exponential family." alt="" coords="337,73,431,100"><area shape="rect" href="classbdm_1_1EKFfull.html" title="Extended Kalman Filter in full matrices." alt="" coords="335,140,433,167"><area shape="rect" href="classbdm_1_1Kalman.html" title="Kalman filter with covariance matrices in square root form." alt="" coords="301,303,467,329"><area shape="rect" href="classbdm_1_1Kalman.html" title="bdm::Kalman\< ldmat \>" alt="" coords="593,300,767,327"><area shape="rect" href="classbdm_1_1Kalman.html" title="bdm::Kalman\< chmat \>" alt="" coords="592,229,768,256"><area shape="rect" href="classbdm_1_1Kalman.html" title="bdm::Kalman\< fsqmat \>" alt="" coords="589,397,771,424"><area shape="rect" href="classbdm_1_1PF.html" title="Trivial particle filter with proposal density equal to parameter evolution model..." alt="" coords="348,453,420,480"><area shape="rect" href="classbdm_1_1bdmroot.html" title="Root class of BDM objects." alt="" coords="7,241,119,268"><area shape="rect" href="classbdm_1_1ARX.html" title="Linear Autoregressive model with Gaussian noise." alt="" coords="639,5,721,32"><area shape="rect" href="classbdm_1_1MixEF.html" title="Mixture of Exponential Family Densities." alt="" coords="633,56,727,83"><area shape="rect" href="classbdm_1_1multiBM.html" title="Estimator for Multinomial density." alt="" coords="625,107,735,133"><area shape="rect" href="classbdm_1_1EKFful__unQR.html" title="Extended Kalman filter with unknown Q and R." alt="" coords="612,157,748,184"><area shape="rect" href="classbdm_1_1KFcondQR.html" title="Kalman Filter with conditional diagonal matrices R and Q." alt="" coords="831,336,953,363"><area shape="rect" href="classbdm_1_1KFcondR.html" title="Kalman Filter with conditional diagonal matrices R and Q." alt="" coords="836,285,948,312"><area shape="rect" href="classbdm_1_1KalmanCh.html" title="Kalman filter in square root form." alt="" coords="831,229,953,256"><area shape="rect" href="classbdm_1_1EKFCh.html" title="Extended Kalman Filter in Square root." alt="" coords="1013,229,1112,256"><area shape="rect" href="classbdm_1_1EKFCh__cond.html" title="Extended Kalman filter with unknown parameters in IM." alt="" coords="1163,204,1299,231"><area shape="rect" href="classbdm_1_1EKFCh__unQ.html" title="Extended Kalman filter in Choleski form with unknown Q." alt="" coords="1165,255,1296,281"><area shape="rect" href="classbdm_1_1EKF.html" title="Extended Kalman Filter." alt="" coords="823,397,961,424"><area shape="rect" href="classbdm_1_1MPF.html" title="Marginalized Particle filter." alt="" coords="607,453,753,480"></map> |
---|
39 | <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> |
---|
40 | |
---|
41 | <p> |
---|
42 | <a href="classbdm_1_1BM-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2> |
---|
43 | Bayesian Model of a system, i.e. all uncertainty is modeled by probabilities. |
---|
44 | <p> |
---|
45 | <table border="0" cellpadding="0" cellspacing="0"> |
---|
46 | <tr><td></td></tr> |
---|
47 | <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> |
---|
48 | <tr><td colspan="2"><div class="groupHeader">Constructors</div></td></tr> |
---|
49 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="db12aecc3135e7868c664e39e7133756"></a><!-- doxytag: member="bdm::BM::BM" ref="db12aecc3135e7868c664e39e7133756" args="()" --> |
---|
50 | </td><td class="memItemRight" valign="bottom"><b>BM</b> ()</td></tr> |
---|
51 | |
---|
52 | <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 &B)" --> |
---|
53 | </td><td class="memItemRight" valign="bottom"><b>BM</b> (const <a class="el" href="classbdm_1_1BM.html">BM</a> &B)</td></tr> |
---|
54 | |
---|
55 | <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classbdm_1_1BM.html">BM</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#c0f027ff91d8459937c6f60ff8e553ff">_copy_</a> ()</td></tr> |
---|
56 | |
---|
57 | <tr><td colspan="2"><div class="groupHeader">Mathematical operations</div></td></tr> |
---|
58 | <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#60b1779a577367c369a932cabd3a6188">bayes</a> (const vec &dt)=0</td></tr> |
---|
59 | |
---|
60 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Incremental Bayes rule. <a href="#60b1779a577367c369a932cabd3a6188"></a><br></td></tr> |
---|
61 | <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 &Dt)" --> |
---|
62 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#1dee3fddaf021e62d925289660a707dc">bayesB</a> (const mat &Dt)</td></tr> |
---|
63 | |
---|
64 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Batch Bayes rule (columns of Dt are observations). <br></td></tr> |
---|
65 | <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual double </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#50257e0c1e5b5c73153ea6e716ad8ae0">logpred</a> (const vec &dt) const </td></tr> |
---|
66 | |
---|
67 | <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 &dt) const " --> |
---|
68 | vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#0e8ebe61fb14990abe1254bd3dda5fae">logpred_m</a> (const mat &dt) const </td></tr> |
---|
69 | |
---|
70 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Matrix version of logpred. <br></td></tr> |
---|
71 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="688d7a2aced1e06aa1c468d73a9e5eba"></a><!-- doxytag: member="bdm::BM::epredictor" ref="688d7a2aced1e06aa1c468d73a9e5eba" args="() const " --> |
---|
72 | virtual <a class="el" href="classbdm_1_1epdf.html">epdf</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#688d7a2aced1e06aa1c468d73a9e5eba">epredictor</a> () const </td></tr> |
---|
73 | |
---|
74 | <tr><td class="mdescLeft"> </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> |
---|
75 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="598b25e3f3d96a5bc00a5faeb5b3c912"></a><!-- doxytag: member="bdm::BM::predictor" ref="598b25e3f3d96a5bc00a5faeb5b3c912" args="() const " --> |
---|
76 | virtual <a class="el" href="classbdm_1_1mpdf.html">mpdf</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#598b25e3f3d96a5bc00a5faeb5b3c912">predictor</a> () const </td></tr> |
---|
77 | |
---|
78 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Constructs a conditional density 1-step ahead predictor. <br></td></tr> |
---|
79 | <tr><td colspan="2"><div class="groupHeader">Access to attributes</div></td></tr> |
---|
80 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ff2d8755ba0b3def927d31305c03b09c"></a><!-- doxytag: member="bdm::BM::_drv" ref="ff2d8755ba0b3def927d31305c03b09c" args="() const " --> |
---|
81 | const <a class="el" href="classbdm_1_1RV.html">RV</a> & </td><td class="memItemRight" valign="bottom"><b>_drv</b> () const </td></tr> |
---|
82 | |
---|
83 | <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 &rv)" --> |
---|
84 | void </td><td class="memItemRight" valign="bottom"><b>set_drv</b> (const <a class="el" href="classbdm_1_1RV.html">RV</a> &rv)</td></tr> |
---|
85 | |
---|
86 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5be65d37dedfe33a3671e7065f523a70"></a><!-- doxytag: member="bdm::BM::_ll" ref="5be65d37dedfe33a3671e7065f523a70" args="() const " --> |
---|
87 | double </td><td class="memItemRight" valign="bottom"><b>_ll</b> () const </td></tr> |
---|
88 | |
---|
89 | <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)" --> |
---|
90 | void </td><td class="memItemRight" valign="bottom"><b>set_evalll</b> (bool evl0)</td></tr> |
---|
91 | |
---|
92 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="963258c4c2dd05be001003b19aceefef"></a><!-- doxytag: member="bdm::BM::_epdf" ref="963258c4c2dd05be001003b19aceefef" args="() const =0" --> |
---|
93 | virtual const <a class="el" href="classbdm_1_1epdf.html">epdf</a> & </td><td class="memItemRight" valign="bottom"><b>_epdf</b> () const =0</td></tr> |
---|
94 | |
---|
95 | <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" --> |
---|
96 | virtual const <a class="el" href="classbdm_1_1epdf.html">epdf</a> * </td><td class="memItemRight" valign="bottom"><b>_e</b> () const =0</td></tr> |
---|
97 | |
---|
98 | <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> |
---|
99 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c400357e37d27a4834b2b1d9211009ed"></a><!-- doxytag: member="bdm::BM::drv" ref="c400357e37d27a4834b2b1d9211009ed" args="" --> |
---|
100 | <a class="el" href="classbdm_1_1RV.html">RV</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#c400357e37d27a4834b2b1d9211009ed">drv</a></td></tr> |
---|
101 | |
---|
102 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Random variable of the data (optional). <br></td></tr> |
---|
103 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4064b6559d962633e4372b12f4cd204a"></a><!-- doxytag: member="bdm::BM::ll" ref="4064b6559d962633e4372b12f4cd204a" args="" --> |
---|
104 | double </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#4064b6559d962633e4372b12f4cd204a">ll</a></td></tr> |
---|
105 | |
---|
106 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Logarithm of marginalized data likelihood. <br></td></tr> |
---|
107 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="faff0ad12556fe7dc0e2807d4fd938ee"></a><!-- doxytag: member="bdm::BM::evalll" ref="faff0ad12556fe7dc0e2807d4fd938ee" args="" --> |
---|
108 | bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#faff0ad12556fe7dc0e2807d4fd938ee">evalll</a></td></tr> |
---|
109 | |
---|
110 | <tr><td class="mdescLeft"> </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> |
---|
111 | </table> |
---|
112 | <hr><h2>Member Function Documentation</h2> |
---|
113 | <a class="anchor" name="c0f027ff91d8459937c6f60ff8e553ff"></a><!-- doxytag: member="bdm::BM::_copy_" ref="c0f027ff91d8459937c6f60ff8e553ff" args="()" --> |
---|
114 | <div class="memitem"> |
---|
115 | <div class="memproto"> |
---|
116 | <table class="memname"> |
---|
117 | <tr> |
---|
118 | <td class="memname">virtual <a class="el" href="classbdm_1_1BM.html">BM</a>* bdm::BM::_copy_ </td> |
---|
119 | <td>(</td> |
---|
120 | <td class="paramname"> </td> |
---|
121 | <td> ) </td> |
---|
122 | <td><code> [inline, virtual]</code></td> |
---|
123 | </tr> |
---|
124 | </table> |
---|
125 | </div> |
---|
126 | <div class="memdoc"> |
---|
127 | |
---|
128 | <p> |
---|
129 | Copy 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>);} |
---|
130 | </pre></div> |
---|
131 | <p>Reimplemented in <a class="el" href="classbdm_1_1ARX.html#60c40b5c6abc4c7e464b4ccae64a5a61">bdm::ARX</a>.</p> |
---|
132 | |
---|
133 | </div> |
---|
134 | </div><p> |
---|
135 | <a class="anchor" name="60b1779a577367c369a932cabd3a6188"></a><!-- doxytag: member="bdm::BM::bayes" ref="60b1779a577367c369a932cabd3a6188" args="(const vec &dt)=0" --> |
---|
136 | <div class="memitem"> |
---|
137 | <div class="memproto"> |
---|
138 | <table class="memname"> |
---|
139 | <tr> |
---|
140 | <td class="memname">virtual void bdm::BM::bayes </td> |
---|
141 | <td>(</td> |
---|
142 | <td class="paramtype">const vec & </td> |
---|
143 | <td class="paramname"> <em>dt</em> </td> |
---|
144 | <td> ) </td> |
---|
145 | <td><code> [pure virtual]</code></td> |
---|
146 | </tr> |
---|
147 | </table> |
---|
148 | </div> |
---|
149 | <div class="memdoc"> |
---|
150 | |
---|
151 | <p> |
---|
152 | Incremental Bayes rule. |
---|
153 | <p> |
---|
154 | <dl compact><dt><b>Parameters:</b></dt><dd> |
---|
155 | <table border="0" cellspacing="2" cellpadding="0"> |
---|
156 | <tr><td valign="top"></td><td valign="top"><em>dt</em> </td><td>vector of input data </td></tr> |
---|
157 | </table> |
---|
158 | </dl> |
---|
159 | |
---|
160 | <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< sq_T ></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< sq_T ></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< BM_T ></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< ldmat ></a>, <a class="el" href="classbdm_1_1Kalman.html#4a39330c14eff8d13179e868a1d1aa8c">bdm::Kalman< chmat ></a>, and <a class="el" href="classbdm_1_1Kalman.html#4a39330c14eff8d13179e868a1d1aa8c">bdm::Kalman< fsqmat ></a>.</p> |
---|
161 | |
---|
162 | <p>Referenced by <a class="el" href="libBM_8cpp-source.html#l00219">bayesB()</a>.</p> |
---|
163 | |
---|
164 | </div> |
---|
165 | </div><p> |
---|
166 | <a class="anchor" name="50257e0c1e5b5c73153ea6e716ad8ae0"></a><!-- doxytag: member="bdm::BM::logpred" ref="50257e0c1e5b5c73153ea6e716ad8ae0" args="(const vec &dt) const " --> |
---|
167 | <div class="memitem"> |
---|
168 | <div class="memproto"> |
---|
169 | <table class="memname"> |
---|
170 | <tr> |
---|
171 | <td class="memname">virtual double bdm::BM::logpred </td> |
---|
172 | <td>(</td> |
---|
173 | <td class="paramtype">const vec & </td> |
---|
174 | <td class="paramname"> <em>dt</em> </td> |
---|
175 | <td> ) </td> |
---|
176 | <td> const<code> [inline, virtual]</code></td> |
---|
177 | </tr> |
---|
178 | </table> |
---|
179 | </div> |
---|
180 | <div class="memdoc"> |
---|
181 | |
---|
182 | <p> |
---|
183 | Evaluates predictive log-likelihood of the given data record I.e. marginal likelihood of the data with the posterior integrated out. |
---|
184 | <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> |
---|
185 | |
---|
186 | <p>Referenced by <a class="el" href="libBM_8h-source.html#l00608">logpred_m()</a>.</p> |
---|
187 | |
---|
188 | </div> |
---|
189 | </div><p> |
---|
190 | <hr>The documentation for this class was generated from the following files:<ul> |
---|
191 | <li><a class="el" href="libBM_8h-source.html">libBM.h</a><li>libBM.cpp</ul> |
---|
192 | </div> |
---|
193 | <hr size="1"><address style="text-align: right;"><small>Generated on Wed Feb 11 23:34:05 2009 for mixpp by |
---|
194 | <a href="http://www.doxygen.org/index.html"> |
---|
195 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address> |
---|
196 | </body> |
---|
197 | </html> |
---|