[8] | 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: 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> |
---|
[139] | 7 | <!-- Generated by Doxygen 1.5.6 --> |
---|
[91] | 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 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 List</span></a></li> |
---|
| 20 | <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> |
---|
| 21 | <li><a href="functions.html"><span>Class Members</span></a></li> |
---|
| 22 | </ul> |
---|
| 23 | </div> |
---|
[8] | 24 | </div> |
---|
[91] | 25 | <div class="contents"> |
---|
[8] | 26 | <h1>BM Class Reference</h1><!-- doxytag: class="BM" -->Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities. |
---|
| 27 | <a href="#_details">More...</a> |
---|
| 28 | <p> |
---|
| 29 | <code>#include <<a class="el" href="libBM_8h-source.html">libBM.h</a>></code> |
---|
| 30 | <p> |
---|
| 31 | <div class="dynheader"> |
---|
| 32 | Inheritance diagram for BM:</div> |
---|
| 33 | <div class="dynsection"> |
---|
[19] | 34 | <p><center><img src="classBM__inherit__graph.png" border="0" usemap="#BM__inherit__map" alt="Inheritance graph"></center> |
---|
| 35 | <map name="BM__inherit__map"> |
---|
[171] | 36 | <area shape="rect" href="classBMEF.html" title="Estimator for Exponential family." alt="" coords="135,48,191,75"><area shape="rect" href="classEKFfixed.html" title="Extended Kalman Filter with full matrices in fixed point arithmetic." alt="" coords="125,99,200,125"><area shape="rect" href="classEKFfull.html" title="Extended Kalman Filter in full matrices." alt="" coords="132,149,193,176"><area shape="rect" href="classKalman.html" title="Kalman filter with covariance matrices in square root form." alt="" coords="99,309,227,336"><area shape="rect" href="classKalman.html" title="Kalman\< ldmat \>" alt="" coords="353,308,489,335"><area shape="rect" href="classKalman.html" title="Kalman\< chmat \>" alt="" coords="352,237,491,264"><area shape="rect" href="classKalman.html" title="Kalman\< fsqmat \>" alt="" coords="349,405,493,432"><area shape="rect" href="classMixEF.html" title="Mixture of Exponential Family Densities." alt="" coords="135,461,191,488"><area shape="rect" href="classPF.html" title="Trivial particle filter with proposal density equal to parameter evolution model..." alt="" coords="144,512,181,539"><area shape="rect" href="classARX.html" title="Linear Autoregressive model with Gaussian noise." alt="" coords="399,56,444,83"><area shape="rect" href="classmultiBM.html" title="Estimator for Multinomial density." alt="" coords="385,5,457,32"><area shape="rect" href="classEKFful__unQR.html" title="Extended Kalman filter with unknown Q and R." alt="" coords="372,115,471,141"><area shape="rect" href="classKFcondQR.html" title="Kalman Filter with conditional diagonal matrices R and Q." alt="" coords="553,344,639,371"><area shape="rect" href="classKFcondR.html" title="Kalman Filter with conditional diagonal matrices R and Q." alt="" coords="559,293,633,320"><area shape="rect" href="classKalmanCh.html" title="Kalman filter in square root form." alt="" coords="553,237,639,264"><area shape="rect" href="classEKFCh.html" title="Extended Kalman Filter in Square root." alt="" coords="699,237,760,264"><area shape="rect" href="classEKF__unQ.html" title="Extended Kalman filter with unknown Q." alt="" coords="811,237,888,264"><area shape="rect" href="classEKF.html" title="Extended Kalman Filter." alt="" coords="544,405,648,432"><area shape="rect" href="classMPF.html" title="Marginalized Particle filter." alt="" coords="365,512,477,539"></map> |
---|
[19] | 37 | <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> |
---|
[32] | 38 | <div class="dynheader"> |
---|
| 39 | Collaboration diagram for BM:</div> |
---|
| 40 | <div class="dynsection"> |
---|
| 41 | <p><center><img src="classBM__coll__graph.png" border="0" usemap="#BM__coll__map" alt="Collaboration graph"></center> |
---|
| 42 | <map name="BM__coll__map"> |
---|
[91] | 43 | <area shape="rect" href="classRV.html" title="Class representing variables, most often random variables." alt="" coords="7,6,44,30"></map> |
---|
[32] | 44 | <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> |
---|
[8] | 45 | |
---|
| 46 | <p> |
---|
| 47 | <a href="classBM-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> |
---|
[171] | 50 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="43d2ad6a6c9f1bcd22fe8906c477e50e"></a><!-- doxytag: member="BM::BM" ref="43d2ad6a6c9f1bcd22fe8906c477e50e" args="(const RV &rv0, double ll0=0, bool evalll0=true)" --> |
---|
| 51 | </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#43d2ad6a6c9f1bcd22fe8906c477e50e">BM</a> (const <a class="el" href="classRV.html">RV</a> &rv0, double ll0=0, bool evalll0=true)</td></tr> |
---|
[22] | 52 | |
---|
| 53 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <br></td></tr> |
---|
[171] | 54 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e8fc5fae042f2b46d4d3827f9587d47d"></a><!-- doxytag: member="BM::BM" ref="e8fc5fae042f2b46d4d3827f9587d47d" args="(const BM &B)" --> |
---|
| 55 | </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#e8fc5fae042f2b46d4d3827f9587d47d">BM</a> (const <a class="el" href="classBM.html">BM</a> &B)</td></tr> |
---|
| 56 | |
---|
| 57 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Copy constructor. <br></td></tr> |
---|
[28] | 58 | <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#a892eff438aab2dd1a9e2efcb7fb5bdf">bayes</a> (const vec &dt)=0</td></tr> |
---|
[8] | 59 | |
---|
[28] | 60 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Incremental Bayes rule. <a href="#a892eff438aab2dd1a9e2efcb7fb5bdf"></a><br></td></tr> |
---|
[171] | 61 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0186270f75189677f390fe088a9947e9"></a><!-- doxytag: member="BM::bayesB" ref="0186270f75189677f390fe088a9947e9" args="(const mat &Dt)" --> |
---|
| 62 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#0186270f75189677f390fe088a9947e9">bayesB</a> (const mat &Dt)</td></tr> |
---|
[8] | 63 | |
---|
| 64 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Batch Bayes rule (columns of Dt are observations). <br></td></tr> |
---|
[171] | 65 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8554809fec160bee279bcd5fa14ead5c"></a><!-- doxytag: member="BM::_epdf" ref="8554809fec160bee279bcd5fa14ead5c" args="() const =0" --> |
---|
| 66 | virtual const <a class="el" href="classepdf.html">epdf</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#8554809fec160bee279bcd5fa14ead5c">_epdf</a> () const =0</td></tr> |
---|
[28] | 67 | |
---|
| 68 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns a pointer to the <a class="el" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> representing posterior density on parameters. Use with care! <br></td></tr> |
---|
[171] | 69 | <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual double </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#8a8ce6df431689964c41cc6c849cfd06">logpred</a> (const vec &dt) const </td></tr> |
---|
| 70 | |
---|
[32] | 71 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ca0f02b3b4144e0895cc14f7e0374bdd"></a><!-- doxytag: member="BM::~BM" ref="ca0f02b3b4144e0895cc14f7e0374bdd" args="()" --> |
---|
| 72 | virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#ca0f02b3b4144e0895cc14f7e0374bdd">~BM</a> ()</td></tr> |
---|
| 73 | |
---|
| 74 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor for future use;. <br></td></tr> |
---|
[33] | 75 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="126bd2595c48e311fc2a7ab72876092a"></a><!-- doxytag: member="BM::_rv" ref="126bd2595c48e311fc2a7ab72876092a" args="() const " --> |
---|
| 76 | const <a class="el" href="classRV.html">RV</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#126bd2595c48e311fc2a7ab72876092a">_rv</a> () const </td></tr> |
---|
| 77 | |
---|
| 78 | <tr><td class="mdescLeft"> </td><td class="mdescRight">access function <br></td></tr> |
---|
| 79 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="87f4a547d2c29180be88175e5eab9c88"></a><!-- doxytag: member="BM::_ll" ref="87f4a547d2c29180be88175e5eab9c88" args="() const " --> |
---|
| 80 | double </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#87f4a547d2c29180be88175e5eab9c88">_ll</a> () const </td></tr> |
---|
| 81 | |
---|
| 82 | <tr><td class="mdescLeft"> </td><td class="mdescRight">access function <br></td></tr> |
---|
[171] | 83 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1ffa9f23669aabecc3760c06c6987522"></a><!-- doxytag: member="BM::set_evalll" ref="1ffa9f23669aabecc3760c06c6987522" args="(bool evl0)" --> |
---|
| 84 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#1ffa9f23669aabecc3760c06c6987522">set_evalll</a> (bool evl0)</td></tr> |
---|
| 85 | |
---|
| 86 | <tr><td class="mdescLeft"> </td><td class="mdescRight">access function <br></td></tr> |
---|
| 87 | <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classBM.html">BM</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#eb58c81d6a7b75b05fc6f276eed78887">_copy_</a> (bool changerv=false)</td></tr> |
---|
| 88 | |
---|
[32] | 89 | <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> |
---|
| 90 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="af00f0612fabe66241dd507188cdbf88"></a><!-- doxytag: member="BM::rv" ref="af00f0612fabe66241dd507188cdbf88" args="" --> |
---|
| 91 | <a class="el" href="classRV.html">RV</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#af00f0612fabe66241dd507188cdbf88">rv</a></td></tr> |
---|
| 92 | |
---|
| 93 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Random variable of the posterior. <br></td></tr> |
---|
[8] | 94 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5623fef6572a08c2b53b8c87b82dc979"></a><!-- doxytag: member="BM::ll" ref="5623fef6572a08c2b53b8c87b82dc979" args="" --> |
---|
| 95 | double </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979">ll</a></td></tr> |
---|
| 96 | |
---|
| 97 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Logarithm of marginalized data likelihood. <br></td></tr> |
---|
[28] | 98 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bf6fb59b30141074f8ee1e2f43d03129"></a><!-- doxytag: member="BM::evalll" ref="bf6fb59b30141074f8ee1e2f43d03129" args="" --> |
---|
| 99 | bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129">evalll</a></td></tr> |
---|
| 100 | |
---|
[171] | 101 | <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> |
---|
[8] | 102 | </table> |
---|
| 103 | <hr><a name="_details"></a><h2>Detailed Description</h2> |
---|
[91] | 104 | Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities. |
---|
| 105 | <p> |
---|
| 106 | <hr><h2>Member Function Documentation</h2> |
---|
[28] | 107 | <a class="anchor" name="a892eff438aab2dd1a9e2efcb7fb5bdf"></a><!-- doxytag: member="BM::bayes" ref="a892eff438aab2dd1a9e2efcb7fb5bdf" args="(const vec &dt)=0" --> |
---|
[8] | 108 | <div class="memitem"> |
---|
| 109 | <div class="memproto"> |
---|
| 110 | <table class="memname"> |
---|
| 111 | <tr> |
---|
| 112 | <td class="memname">virtual void BM::bayes </td> |
---|
| 113 | <td>(</td> |
---|
| 114 | <td class="paramtype">const vec & </td> |
---|
[28] | 115 | <td class="paramname"> <em>dt</em> </td> |
---|
| 116 | <td> ) </td> |
---|
[139] | 117 | <td><code> [pure virtual]</code></td> |
---|
[8] | 118 | </tr> |
---|
| 119 | </table> |
---|
| 120 | </div> |
---|
| 121 | <div class="memdoc"> |
---|
| 122 | |
---|
| 123 | <p> |
---|
| 124 | Incremental Bayes rule. |
---|
| 125 | <p> |
---|
| 126 | <dl compact><dt><b>Parameters:</b></dt><dd> |
---|
| 127 | <table border="0" cellspacing="2" cellpadding="0"> |
---|
| 128 | <tr><td valign="top"></td><td valign="top"><em>dt</em> </td><td>vector of input data </td></tr> |
---|
| 129 | </table> |
---|
| 130 | </dl> |
---|
| 131 | |
---|
[171] | 132 | <p>Implemented in <a class="el" href="classARX.html#ba82c956ca893826811aefe1e4af465d">ARX</a>, <a class="el" href="classKalman.html#7750ffd73f261828a32c18aaeb65c75c">Kalman< sq_T ></a>, <a class="el" href="classKalmanCh.html#cca758192846940409822b9bd778d4e1">KalmanCh</a>, <a class="el" href="classEKFfull.html#8ca46f177e395fa714bbd8bd29ea43e0">EKFfull</a>, <a class="el" href="classEKF.html#c79c62c9b3e0b56b3aaa1b6f1d9a7af7">EKF< sq_T ></a>, <a class="el" href="classEKFCh.html#96f6edda324a0b7ef8b4e86cc7af60c1">EKFCh</a>, <a class="el" href="classPF.html#64f636bbd63bea9efd778214e6b631d3">PF</a>, <a class="el" href="classMPF.html#55daf8e4b6553dd9f47c692de7931623">MPF< BM_T ></a>, <a class="el" href="classMixEF.html#d520fb534aa43f3084ff1568ffe7573d">MixEF</a>, <a class="el" href="classBMEF.html#52b7719312d545215cca1ff87722a35a">BMEF</a>, <a class="el" href="classmultiBM.html#11eeba7e97954e316e959116f90d80e2">multiBM</a>, <a class="el" href="classEKFfixed.html#ddf5334bc1207658fd53698fffbac028">EKFfixed</a>, <a class="el" href="classKalman.html#7750ffd73f261828a32c18aaeb65c75c">Kalman< ldmat ></a>, <a class="el" href="classKalman.html#7750ffd73f261828a32c18aaeb65c75c">Kalman< chmat ></a>, and <a class="el" href="classKalman.html#7750ffd73f261828a32c18aaeb65c75c">Kalman< fsqmat ></a>.</p> |
---|
[32] | 133 | |
---|
[171] | 134 | <p>Referenced by <a class="el" href="libBM_8cpp-source.html#l00185">bayesB()</a>.</p> |
---|
| 135 | |
---|
[8] | 136 | </div> |
---|
| 137 | </div><p> |
---|
[171] | 138 | <a class="anchor" name="8a8ce6df431689964c41cc6c849cfd06"></a><!-- doxytag: member="BM::logpred" ref="8a8ce6df431689964c41cc6c849cfd06" args="(const vec &dt) const " --> |
---|
| 139 | <div class="memitem"> |
---|
| 140 | <div class="memproto"> |
---|
| 141 | <table class="memname"> |
---|
| 142 | <tr> |
---|
| 143 | <td class="memname">virtual double BM::logpred </td> |
---|
| 144 | <td>(</td> |
---|
| 145 | <td class="paramtype">const vec & </td> |
---|
| 146 | <td class="paramname"> <em>dt</em> </td> |
---|
| 147 | <td> ) </td> |
---|
| 148 | <td> const<code> [inline, virtual]</code></td> |
---|
| 149 | </tr> |
---|
| 150 | </table> |
---|
[91] | 151 | </div> |
---|
[171] | 152 | <div class="memdoc"> |
---|
| 153 | |
---|
| 154 | <p> |
---|
| 155 | Evaluates predictive log-likelihood of the given data record I.e. marginal likelihood of the data with the posterior integrated out. |
---|
| 156 | <p>Reimplemented in <a class="el" href="classARX.html#e7f9e7823aec9bf7ddc3b42d9b3304c4">ARX</a>, <a class="el" href="classMixEF.html#424ca64f36d4e41de7a7e7ae921d35ea">MixEF</a>, and <a class="el" href="classmultiBM.html#13e26a61757278981fd8cac9a7ef91eb">multiBM</a>.</p> |
---|
| 157 | |
---|
| 158 | </div> |
---|
| 159 | </div><p> |
---|
| 160 | <a class="anchor" name="eb58c81d6a7b75b05fc6f276eed78887"></a><!-- doxytag: member="BM::_copy_" ref="eb58c81d6a7b75b05fc6f276eed78887" args="(bool changerv=false)" --> |
---|
| 161 | <div class="memitem"> |
---|
| 162 | <div class="memproto"> |
---|
| 163 | <table class="memname"> |
---|
| 164 | <tr> |
---|
| 165 | <td class="memname">virtual <a class="el" href="classBM.html">BM</a>* BM::_copy_ </td> |
---|
| 166 | <td>(</td> |
---|
| 167 | <td class="paramtype">bool </td> |
---|
| 168 | <td class="paramname"> <em>changerv</em> = <code>false</code> </td> |
---|
| 169 | <td> ) </td> |
---|
| 170 | <td><code> [inline, virtual]</code></td> |
---|
| 171 | </tr> |
---|
| 172 | </table> |
---|
| 173 | </div> |
---|
| 174 | <div class="memdoc"> |
---|
| 175 | |
---|
| 176 | <p> |
---|
| 177 | Copy function required in vectors, Arrays of <a class="el" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities.">BM</a> etc. Have to be DELETED manually! Prototype: BM* <a class="el" href="classBM.html#eb58c81d6a7b75b05fc6f276eed78887">_copy_()</a>{<a class="el" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities.">BM</a> Tmp*=new Tmp(this*); return Tmp; } |
---|
| 178 | <p>Reimplemented in <a class="el" href="classARX.html#d2751057811c6fb8f4ff86e1648bcddc">ARX</a>.</p> |
---|
| 179 | |
---|
| 180 | <p>Referenced by <a class="el" href="mixef_8cpp-source.html#l00007">MixEF::MixEF()</a>.</p> |
---|
| 181 | |
---|
| 182 | </div> |
---|
| 183 | </div><p> |
---|
| 184 | <hr>The documentation for this class was generated from the following files:<ul> |
---|
| 185 | <li>work/git/mixpp/bdm/stat/<a class="el" href="libBM_8h-source.html">libBM.h</a><li>work/git/mixpp/bdm/stat/libBM.cpp</ul> |
---|
| 186 | </div> |
---|
| 187 | <hr size="1"><address style="text-align: right;"><small>Generated on Tue Sep 23 16:00:49 2008 for mixpp by |
---|
[8] | 188 | <a href="http://www.doxygen.org/index.html"> |
---|
[139] | 189 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address> |
---|
[8] | 190 | </body> |
---|
| 191 | </html> |
---|