Changeset 538 for library/doc/html/classbdm_1_1KalmanCh.html
- Timestamp:
- 08/16/09 18:14:04 (15 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
library/doc/html/classbdm_1_1KalmanCh.html
r472 r538 5 5 <link href="doxygen.css" rel="stylesheet" type="text/css"> 6 6 </head><body> 7 <!-- Generated by Doxygen 1.5. 9-->7 <!-- Generated by Doxygen 1.5.8 --> 8 8 <script type="text/javascript"> 9 9 <!-- … … 71 71 <a href="#_details">More...</a> 72 72 <p> 73 <code>#include <<a class="el" href="kalman_8h _source.html">kalman.h</a>></code>73 <code>#include <<a class="el" href="kalman_8h-source.html">kalman.h</a>></code> 74 74 <p> 75 75 … … 83 83 <tr><td class="mdescLeft"> </td><td class="mdescRight">copy constructor <br></td></tr> 84 84 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="20a4d4c664e8ac8a3f1bb7b0d11c6d87"></a><!-- doxytag: member="bdm::KalmanCh::set_parameters" ref="20a4d4c664e8ac8a3f1bb7b0d11c6d87" args="(const mat &A0, const mat &B0, const mat &C0, const mat &D0, const chmat &Q0, const chmat &R0)" --> 85 void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1KalmanCh.html#20a4d4c664e8ac8a3f1bb7b0d11c6d87">set_parameters</a> (const mat &A0, const mat &B0, const mat &C0, const mat &D0, const <a class="el" href="class chmat.html">chmat</a> &Q0, const <a class="el" href="classchmat.html">chmat</a> &R0)</td></tr>85 void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1KalmanCh.html#20a4d4c664e8ac8a3f1bb7b0d11c6d87">set_parameters</a> (const mat &A0, const mat &B0, const mat &C0, const mat &D0, const <a class="el" href="classbdm_1_1chmat.html">chmat</a> &Q0, const <a class="el" href="classbdm_1_1chmat.html">chmat</a> &R0)</td></tr> 86 86 87 87 <tr><td class="mdescLeft"> </td><td class="mdescRight">Set parameters with check of relevance. <br></td></tr> 88 88 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6e169272657ed101f3d128b49c59b890"></a><!-- doxytag: member="bdm::KalmanCh::set_statistics" ref="6e169272657ed101f3d128b49c59b890" args="(const vec &mu0, const chmat &P0)" --> 89 void </td><td class="memItemRight" valign="bottom"><b>set_statistics</b> (const vec &mu0, const <a class="el" href="class chmat.html">chmat</a> &P0)</td></tr>89 void </td><td class="memItemRight" valign="bottom"><b>set_statistics</b> (const vec &mu0, const <a class="el" href="classbdm_1_1chmat.html">chmat</a> &P0)</td></tr> 90 90 91 91 <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1KalmanCh.html#b41fe5540548100b08e1684c3be767b6">bayes</a> (const vec &dt)</td></tr> … … 93 93 <tr><td class="mdescLeft"> </td><td class="mdescRight">Here dt = [yt;ut] of appropriate dimensions. <a href="#b41fe5540548100b08e1684c3be767b6"></a><br></td></tr> 94 94 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9264fc6b173ecb803d2684b883f32c68"></a><!-- doxytag: member="bdm::KalmanCh::set_est" ref="9264fc6b173ecb803d2684b883f32c68" args="(const vec &mu0, const chmat &P0)" --> 95 void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1Kalman.html#9264fc6b173ecb803d2684b883f32c68">set_est</a> (const vec &mu0, const <a class="el" href="class chmat.html">chmat</a> &P0)</td></tr>95 void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1Kalman.html#9264fc6b173ecb803d2684b883f32c68">set_est</a> (const vec &mu0, const <a class="el" href="classbdm_1_1chmat.html">chmat</a> &P0)</td></tr> 96 96 97 97 <tr><td class="mdescLeft"> </td><td class="mdescRight">Set estimate values, used e.g. in initialization. <br></td></tr> … … 100 100 101 101 <tr><td class="mdescLeft"> </td><td class="mdescRight">access function <br></td></tr> 102 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c34989b1e53c7d4ecdaea63a95ddbd77"></a><!-- doxytag: member="bdm::KalmanCh::_e" ref="c34989b1e53c7d4ecdaea63a95ddbd77" args="() const" -->103 const <a class="el" href="classbdm_1_1enorm.html">enorm</a>< <a class="el" href="classchmat.html">chmat</a> > * </td><td class="memItemRight" valign="bottom"><b>_e</b> () const</td></tr>104 105 102 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c788ec6e6c6f5f5861ae8a56d8ede277"></a><!-- doxytag: member="bdm::KalmanCh::__K" ref="c788ec6e6c6f5f5861ae8a56d8ede277" args="()" --> 106 103 mat & </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1Kalman.html#c788ec6e6c6f5f5861ae8a56d8ede277">__K</a> ()</td></tr> … … 145 142 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> 146 143 147 <tr><td class="mdescLeft"> </td><td class="mdescRight">Constructs a conditional density 1-step ahead predictor. <br></td></tr>144 <tr><td class="mdescLeft"> </td><td class="mdescRight">Constructs conditional density of 1-step ahead predictor <img class="formulaInl" alt="$ f(d_{t+1} |d_{t+h-1}, \ldots d_{t}) $" src="form_131.png">. <br></td></tr> 148 145 <tr><td colspan="2"><div class="groupHeader">Access to attributes</div></td></tr> 149 146 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ff2d8755ba0b3def927d31305c03b09c"></a><!-- doxytag: member="bdm::KalmanCh::_drv" ref="ff2d8755ba0b3def927d31305c03b09c" args="() const " --> … … 208 205 <tr><td class="mdescLeft"> </td><td class="mdescRight">Matrix D. <br></td></tr> 209 206 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="70f8bf19e81b532c60fd3a7a152425ee"></a><!-- doxytag: member="bdm::KalmanCh::Q" ref="70f8bf19e81b532c60fd3a7a152425ee" args="" --> 210 <a class="el" href="class chmat.html">chmat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1Kalman.html#70f8bf19e81b532c60fd3a7a152425ee">Q</a></td></tr>207 <a class="el" href="classbdm_1_1chmat.html">chmat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1Kalman.html#70f8bf19e81b532c60fd3a7a152425ee">Q</a></td></tr> 211 208 212 209 <tr><td class="mdescLeft"> </td><td class="mdescRight">Matrix Q in square-root form. <br></td></tr> 213 210 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="475b088287cdfbba4dc60a3d027728b7"></a><!-- doxytag: member="bdm::KalmanCh::R" ref="475b088287cdfbba4dc60a3d027728b7" args="" --> 214 <a class="el" href="class chmat.html">chmat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1Kalman.html#475b088287cdfbba4dc60a3d027728b7">R</a></td></tr>211 <a class="el" href="classbdm_1_1chmat.html">chmat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1Kalman.html#475b088287cdfbba4dc60a3d027728b7">R</a></td></tr> 215 212 216 213 <tr><td class="mdescLeft"> </td><td class="mdescRight">Matrix R in square-root form. <br></td></tr> 217 214 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="383f329ff18bbe219254c8b3b916f40d"></a><!-- doxytag: member="bdm::KalmanCh::est" ref="383f329ff18bbe219254c8b3b916f40d" args="" --> 218 <a class="el" href="classbdm_1_1enorm.html">enorm</a>< <a class="el" href="class chmat.html">chmat</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1Kalman.html#383f329ff18bbe219254c8b3b916f40d">est</a></td></tr>215 <a class="el" href="classbdm_1_1enorm.html">enorm</a>< <a class="el" href="classbdm_1_1chmat.html">chmat</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1Kalman.html#383f329ff18bbe219254c8b3b916f40d">est</a></td></tr> 219 216 220 217 <tr><td class="mdescLeft"> </td><td class="mdescRight">posterior density on $x_t$ <br></td></tr> 221 218 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ba555c394c429f6831c9bbabfa2c944c"></a><!-- doxytag: member="bdm::KalmanCh::fy" ref="ba555c394c429f6831c9bbabfa2c944c" args="" --> 222 <a class="el" href="classbdm_1_1enorm.html">enorm</a>< <a class="el" href="class chmat.html">chmat</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1Kalman.html#ba555c394c429f6831c9bbabfa2c944c">fy</a></td></tr>219 <a class="el" href="classbdm_1_1enorm.html">enorm</a>< <a class="el" href="classbdm_1_1chmat.html">chmat</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1Kalman.html#ba555c394c429f6831c9bbabfa2c944c">fy</a></td></tr> 223 220 224 221 <tr><td class="mdescLeft"> </td><td class="mdescRight">preditive density on $y_t$ <br></td></tr> … … 232 229 <tr><td class="mdescLeft"> </td><td class="mdescRight">cache of fy.mu <br></td></tr> 233 230 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2dd268f2d7fbe6382cb8825a1114192a"></a><!-- doxytag: member="bdm::KalmanCh::_Ry" ref="2dd268f2d7fbe6382cb8825a1114192a" args="" --> 234 <a class="el" href="class chmat.html">chmat</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1Kalman.html#2dd268f2d7fbe6382cb8825a1114192a">_Ry</a></td></tr>231 <a class="el" href="classbdm_1_1chmat.html">chmat</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1Kalman.html#2dd268f2d7fbe6382cb8825a1114192a">_Ry</a></td></tr> 235 232 236 233 <tr><td class="mdescLeft"> </td><td class="mdescRight">cache of fy.R <br></td></tr> … … 240 237 <tr><td class="mdescLeft"> </td><td class="mdescRight">cache of est.mu <br></td></tr> 241 238 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="00c27b0bf324f0018497921ca23c71ed"></a><!-- doxytag: member="bdm::KalmanCh::_P" ref="00c27b0bf324f0018497921ca23c71ed" args="" --> 242 <a class="el" href="class chmat.html">chmat</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1Kalman.html#00c27b0bf324f0018497921ca23c71ed">_P</a></td></tr>239 <a class="el" href="classbdm_1_1chmat.html">chmat</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1Kalman.html#00c27b0bf324f0018497921ca23c71ed">_P</a></td></tr> 243 240 244 241 <tr><td class="mdescLeft"> </td><td class="mdescRight">cache of est.R <br></td></tr> … … 295 292 Trivial example: <div class="fragment"><pre class="fragment"><span class="preprocessor">#include "<a class="code" href="kalman_8h.html" title="Bayesian Filtering for linear Gaussian models (Kalman Filter) and extensions.">estim/kalman.h</a>"</span> 296 293 <span class="keyword">using namespace </span>bdm; 297 294 298 295 <span class="comment">// estimation of AR(0) model</span> 299 296 <span class="keywordtype">int</span> main() { 300 297 <span class="comment">//dimensions</span> 301 <span class="keywordtype">int</span> dx =3, dy=3, du=1;298 <span class="keywordtype">int</span> dx = 3, dy = 3, du = 1; 302 299 <span class="comment">// matrices</span> 303 mat A = eye (dx);304 mat B = zeros (dx,du);305 mat C = eye (dx);306 mat D = zeros (dy,du);307 mat Q = eye (dx);308 mat R = 0.1 *eye(dy);300 mat A = eye ( dx ); 301 mat B = zeros ( dx, du ); 302 mat C = eye ( dx ); 303 mat D = zeros ( dy, du ); 304 mat Q = eye ( dx ); 305 mat R = 0.1 * eye ( dy ); 309 306 <span class="comment">//prior</span> 310 mat P0 = 100 *eye(dx);311 vec mu0 = zeros (dx);307 mat P0 = 100 * eye ( dx ); 308 vec mu0 = zeros ( dx ); 312 309 <span class="comment">// Estimator</span> 313 310 KalmanCh KF; 314 KF.set_parameters (A,B,C,D,<span class="comment">/*covariances*/</span> Q,R);315 KF.set_statistics (mu0,P0);311 KF.set_parameters ( A, B, C, D,<span class="comment">/*covariances*/</span> Q, R ); 312 KF.set_statistics ( mu0, P0 ); 316 313 <span class="comment">// Estimation loop</span> 317 <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i=0;i<100;i++){318 KF.bayes (randn(dx+du));314 <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i = 0; i < 100; i++ ) { 315 KF.bayes ( randn ( dx + du ) ); 319 316 } 320 317 <span class="comment">//print results</span> 321 318 cout << <span class="stringliteral">"Posterior estimate of x is: "</span> << endl; 322 cout << <span class="stringliteral">"mean: "</span> << KF.posterior().mean()<< endl;323 cout << <span class="stringliteral">"variance: "</span> << KF.posterior().variance()<< endl;319 cout << <span class="stringliteral">"mean: "</span> << KF.posterior().mean() << endl; 320 cout << <span class="stringliteral">"variance: "</span> << KF.posterior().variance() << endl; 324 321 } 325 322 </pre></div> <hr><h2>Member Function Documentation</h2> … … 352 349 <p>Reimplemented in <a class="el" href="classbdm_1_1EKFCh.html#4c8609c37290b158f88a31dae4047225">bdm::EKFCh</a>.</p> 353 350 354 <p>References <a class="el" href="chmat_8h _source.html#l00073">chmat::_Ch()</a>, <a class="el" href="kalman_8h_source.html#l00099">bdm::Kalman< chmat >::_K</a>, <a class="el" href="kalman_8h_source.html#l00105">bdm::Kalman< chmat >::_mu</a>, <a class="el" href="kalman_8h_source.html#l00107">bdm::Kalman< chmat >::_P</a>, <a class="el" href="kalman_8h_source.html#l00103">bdm::Kalman< chmat >::_Ry</a>, <a class="el" href="kalman_8h_source.html#l00101">bdm::Kalman< chmat >::_yp</a>, <a class="el" href="kalman_8h_source.html#l00081">bdm::Kalman< chmat >::A</a>, <a class="el" href="kalman_8h_source.html#l00083">bdm::Kalman< chmat >::B</a>, <a class="el" href="kalman_8h_source.html#l00085">bdm::Kalman< chmat >::C</a>, <a class="el" href="kalman_8h_source.html#l00087">bdm::Kalman< chmat >::D</a>, <a class="el" href="kalman_8h_source.html#l00079">bdm::Kalman< chmat >::dimu</a>, <a class="el" href="kalman_8h_source.html#l00075">bdm::Kalman< chmat >::dimx</a>, <a class="el" href="kalman_8h_source.html#l00077">bdm::Kalman< chmat >::dimy</a>, <a class="el" href="bdmbase_8h_source.html#l00741">bdm::BM::evalll</a>, <a class="el" href="exp__family_8h_source.html#l00051">bdm::eEF::evallog()</a>, <a class="el" href="kalman_8h_source.html#l00096">bdm::Kalman< chmat >::fy</a>, <a class="el" href="bdmbase_8h_source.html#l00739">bdm::BM::ll</a>, <a class="el" href="kalman_8h_source.html#l00148">postA</a>, and <a class="el" href="kalman_8h_source.html#l00146">preA</a>.</p>351 <p>References <a class="el" href="chmat_8h-source.html#l00084">bdm::chmat::_Ch()</a>, <a class="el" href="kalman_8h-source.html#l00096">bdm::Kalman< chmat >::_K</a>, <a class="el" href="kalman_8h-source.html#l00102">bdm::Kalman< chmat >::_mu</a>, <a class="el" href="kalman_8h-source.html#l00104">bdm::Kalman< chmat >::_P</a>, <a class="el" href="kalman_8h-source.html#l00100">bdm::Kalman< chmat >::_Ry</a>, <a class="el" href="kalman_8h-source.html#l00098">bdm::Kalman< chmat >::_yp</a>, <a class="el" href="kalman_8h-source.html#l00078">bdm::Kalman< chmat >::A</a>, <a class="el" href="kalman_8h-source.html#l00080">bdm::Kalman< chmat >::B</a>, <a class="el" href="kalman_8h-source.html#l00082">bdm::Kalman< chmat >::C</a>, <a class="el" href="kalman_8h-source.html#l00084">bdm::Kalman< chmat >::D</a>, <a class="el" href="kalman_8h-source.html#l00076">bdm::Kalman< chmat >::dimu</a>, <a class="el" href="kalman_8h-source.html#l00072">bdm::Kalman< chmat >::dimx</a>, <a class="el" href="kalman_8h-source.html#l00074">bdm::Kalman< chmat >::dimy</a>, <a class="el" href="bdmbase_8h-source.html#l00852">bdm::BM::evalll</a>, <a class="el" href="exp__family_8h-source.html#l00049">bdm::eEF::evallog()</a>, <a class="el" href="kalman_8h-source.html#l00093">bdm::Kalman< chmat >::fy</a>, <a class="el" href="bdmbase_8h-source.html#l00850">bdm::BM::ll</a>, <a class="el" href="kalman_8h-source.html#l00148">postA</a>, and <a class="el" href="kalman_8h-source.html#l00146">preA</a>.</p> 355 352 356 353 </div> … … 376 373 <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> 377 374 378 <p>Referenced by <a class="el" href="bdmbase_8h _source.html#l00770">bdm::BM::logpred_m()</a>.</p>375 <p>Referenced by <a class="el" href="bdmbase_8h-source.html#l00886">bdm::BM::logpred_m()</a>.</p> 379 376 380 377 </div> 381 378 </div><p> 382 379 <hr>The documentation for this class was generated from the following files:<ul> 383 <li><a class="el" href="kalman_8h _source.html">kalman.h</a><li>kalman.cpp</ul>384 </div> 385 <hr size="1"><address style="text-align: right;"><small>Generated on Wed Aug 5 00:06:582009 for mixpp by 380 <li><a class="el" href="kalman_8h-source.html">kalman.h</a><li>kalman.cpp</ul> 381 </div> 382 <hr size="1"><address style="text-align: right;"><small>Generated on Sun Aug 16 17:58:19 2009 for mixpp by 386 383 <a href="http://www.doxygen.org/index.html"> 387 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5. 9</small></address>384 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address> 388 385 </body> 389 386 </html>