[259] | 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::KalmanCh Class Reference</title> |
---|
| 4 | <link href="tabs.css" rel="stylesheet" type="text/css"> |
---|
[290] | 5 | <link href="doxygen.css" rel="stylesheet" type="text/css"> |
---|
[259] | 6 | </head><body> |
---|
[538] | 7 | <!-- Generated by Doxygen 1.5.8 --> |
---|
[271] | 8 | <script type="text/javascript"> |
---|
| 9 | <!-- |
---|
| 10 | function 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 | } |
---|
| 22 | function 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 | } |
---|
| 46 | window.onload = initDynSections; |
---|
| 47 | --> |
---|
| 48 | </script> |
---|
[259] | 49 | <div class="navigation" id="top"> |
---|
| 50 | <div class="tabs"> |
---|
| 51 | <ul> |
---|
[271] | 52 | <li><a href="main.html"><span>Main Page</span></a></li> |
---|
[259] | 53 | <li><a href="pages.html"><span>Related Pages</span></a></li> |
---|
[290] | 54 | <li class="current"><a href="annotated.html"><span>Classes</span></a></li> |
---|
[259] | 55 | <li><a href="files.html"><span>Files</span></a></li> |
---|
| 56 | </ul> |
---|
| 57 | </div> |
---|
| 58 | <div class="tabs"> |
---|
| 59 | <ul> |
---|
| 60 | <li><a href="annotated.html"><span>Class List</span></a></li> |
---|
[290] | 61 | <li><a href="classes.html"><span>Class Index</span></a></li> |
---|
[259] | 62 | <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> |
---|
| 63 | <li><a href="functions.html"><span>Class Members</span></a></li> |
---|
| 64 | </ul> |
---|
| 65 | </div> |
---|
[271] | 66 | <div class="navpath"><b>bdm</b>::<a class="el" href="classbdm_1_1KalmanCh.html">KalmanCh</a> |
---|
[259] | 67 | </div> |
---|
| 68 | </div> |
---|
| 69 | <div class="contents"> |
---|
[590] | 70 | <h1>bdm::KalmanCh Class Reference</h1><!-- doxytag: class="bdm::KalmanCh" --><!-- doxytag: inherits="Kalman< chmat >" --><a class="el" href="classbdm_1_1Kalman.html" title="Common abstract base for Kalman filters.">Kalman</a> filter in square <a class="el" href="classbdm_1_1root.html" title="Root class of BDM objects.">root</a> form. |
---|
[290] | 71 | <a href="#_details">More...</a> |
---|
[259] | 72 | <p> |
---|
[538] | 73 | <code>#include <<a class="el" href="kalman_8h-source.html">kalman.h</a>></code> |
---|
[290] | 74 | <p> |
---|
[259] | 75 | |
---|
| 76 | <p> |
---|
[290] | 77 | <a href="classbdm_1_1KalmanCh-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> |
---|
[259] | 78 | <tr><td></td></tr> |
---|
| 79 | <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> |
---|
[287] | 80 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="24ce65bdaa538d4d5153d709a929b996"></a><!-- doxytag: member="bdm::KalmanCh::_copy_" ref="24ce65bdaa538d4d5153d709a929b996" args="() const " --> |
---|
| 81 | <a class="el" href="classbdm_1_1BM.html">BM</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1KalmanCh.html#24ce65bdaa538d4d5153d709a929b996">_copy_</a> () const </td></tr> |
---|
[259] | 82 | |
---|
[287] | 83 | <tr><td class="mdescLeft"> </td><td class="mdescRight">copy constructor <br></td></tr> |
---|
[271] | 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)" --> |
---|
[538] | 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> |
---|
[259] | 86 | |
---|
[590] | 87 | <tr><td class="mdescLeft"> </td><td class="mdescRight">set parameters for adapt from <a class="el" href="classbdm_1_1Kalman.html" title="Common abstract base for Kalman filters.">Kalman</a> <br></td></tr> |
---|
| 88 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c983b1a2687312ab733d4c859cf83c1e"></a><!-- doxytag: member="bdm::KalmanCh::initialize" ref="c983b1a2687312ab733d4c859cf83c1e" args="()" --> |
---|
| 89 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1KalmanCh.html#c983b1a2687312ab733d4c859cf83c1e">initialize</a> ()</td></tr> |
---|
[259] | 90 | |
---|
[590] | 91 | <tr><td class="mdescLeft"> </td><td class="mdescRight">initialize internal parametetrs <br></td></tr> |
---|
[259] | 92 | <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 | |
---|
| 94 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Here dt = [yt;ut] of appropriate dimensions. <a href="#b41fe5540548100b08e1684c3be767b6"></a><br></td></tr> |
---|
[590] | 95 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="13f68cef5b14c8753012ad3ed695689d"></a><!-- doxytag: member="bdm::KalmanCh::from_setting" ref="13f68cef5b14c8753012ad3ed695689d" args="(const Setting &set)" --> |
---|
| 96 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1KalmanCh.html#13f68cef5b14c8753012ad3ed695689d">from_setting</a> (const Setting &set)</td></tr> |
---|
[259] | 97 | |
---|
[590] | 98 | <tr><td class="mdescLeft"> </td><td class="mdescRight">load basic elements of <a class="el" href="classbdm_1_1Kalman.html" title="Common abstract base for Kalman filters.">Kalman</a> from structure <br></td></tr> |
---|
| 99 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d9107617cd5482272ab046849cbfff49"></a><!-- doxytag: member="bdm::KalmanCh::set_statistics" ref="d9107617cd5482272ab046849cbfff49" args="(const vec &mu0, const mat &P0)" --> |
---|
| 100 | void </td><td class="memItemRight" valign="bottom"><b>set_statistics</b> (const vec &mu0, const mat &P0)</td></tr> |
---|
[271] | 101 | |
---|
[590] | 102 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="28cded9e5f44f654cd383503e4e9694c"></a><!-- doxytag: member="bdm::KalmanCh::set_statistics" ref="28cded9e5f44f654cd383503e4e9694c" args="(const vec &mu0, const chmat &P0)" --> |
---|
| 103 | 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> |
---|
[259] | 104 | |
---|
[590] | 105 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8b0c3db41eb292edb20b826832c9b5fa"></a><!-- doxytag: member="bdm::KalmanCh::posterior" ref="8b0c3db41eb292edb20b826832c9b5fa" args="() const" --> |
---|
| 106 | const <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#8b0c3db41eb292edb20b826832c9b5fa">posterior</a> () const</td></tr> |
---|
[259] | 107 | |
---|
[590] | 108 | <tr><td class="mdescLeft"> </td><td class="mdescRight">posterior <br></td></tr> |
---|
| 109 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4da2fdd01e9b335b133def9814eb0620"></a><!-- doxytag: member="bdm::KalmanCh::shared_posterior" ref="4da2fdd01e9b335b133def9814eb0620" args="()" --> |
---|
| 110 | <a class="el" href="classbdm_1_1shared__ptr.html">shared_ptr</a>< <a class="el" href="classbdm_1_1epdf.html">epdf</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1Kalman.html#4da2fdd01e9b335b133def9814eb0620">shared_posterior</a> ()</td></tr> |
---|
| 111 | |
---|
| 112 | <tr><td class="mdescLeft"> </td><td class="mdescRight">shared posterior <br></td></tr> |
---|
| 113 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="34c508e3a9081be46e57634c2079bff4"></a><!-- doxytag: member="bdm::KalmanCh::validate" ref="34c508e3a9081be46e57634c2079bff4" args="()" --> |
---|
| 114 | void </td><td class="memItemRight" valign="bottom"><b>validate</b> ()</td></tr> |
---|
| 115 | |
---|
[396] | 116 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="af0e6941ba5919cae1bc530e2181b109"></a><!-- doxytag: member="bdm::KalmanCh::to_string" ref="af0e6941ba5919cae1bc530e2181b109" args="()" --> |
---|
| 117 | virtual string </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1root.html#af0e6941ba5919cae1bc530e2181b109">to_string</a> ()</td></tr> |
---|
[353] | 118 | |
---|
| 119 | <tr><td class="mdescLeft"> </td><td class="mdescRight">This method returns a basic info about the current instance. <br></td></tr> |
---|
[396] | 120 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="67d954d255ede776eade7334d4895790"></a><!-- doxytag: member="bdm::KalmanCh::to_setting" ref="67d954d255ede776eade7334d4895790" args="(Setting &set) const " --> |
---|
| 121 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1root.html#67d954d255ede776eade7334d4895790">to_setting</a> (Setting &set) const </td></tr> |
---|
[353] | 122 | |
---|
| 123 | <tr><td class="mdescLeft"> </td><td class="mdescRight">This method save all the instance properties into the Setting structure. <br></td></tr> |
---|
[590] | 124 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b1972e00d9b9dd22a0f983c7cb0b8b40"></a><!-- doxytag: member="bdm::KalmanCh::_dimx" ref="b1972e00d9b9dd22a0f983c7cb0b8b40" args="()" --> |
---|
| 125 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1StateSpace.html#b1972e00d9b9dd22a0f983c7cb0b8b40">_dimx</a> ()</td></tr> |
---|
[368] | 126 | |
---|
[590] | 127 | <tr><td class="mdescLeft"> </td><td class="mdescRight">access function <br></td></tr> |
---|
| 128 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f3d83a4b39e05df9fb4246fd6ddc2a60"></a><!-- doxytag: member="bdm::KalmanCh::_dimy" ref="f3d83a4b39e05df9fb4246fd6ddc2a60" args="()" --> |
---|
| 129 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1StateSpace.html#f3d83a4b39e05df9fb4246fd6ddc2a60">_dimy</a> ()</td></tr> |
---|
| 130 | |
---|
| 131 | <tr><td class="mdescLeft"> </td><td class="mdescRight">access function <br></td></tr> |
---|
| 132 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a238842025a0eaade26d5d79a0e9000e"></a><!-- doxytag: member="bdm::KalmanCh::_dimu" ref="a238842025a0eaade26d5d79a0e9000e" args="()" --> |
---|
| 133 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1StateSpace.html#a238842025a0eaade26d5d79a0e9000e">_dimu</a> ()</td></tr> |
---|
| 134 | |
---|
| 135 | <tr><td class="mdescLeft"> </td><td class="mdescRight">access function <br></td></tr> |
---|
| 136 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a70f6c8ab37f955f408361150e13c47b"></a><!-- doxytag: member="bdm::KalmanCh::_A" ref="a70f6c8ab37f955f408361150e13c47b" args="()" --> |
---|
| 137 | mat </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1StateSpace.html#a70f6c8ab37f955f408361150e13c47b">_A</a> ()</td></tr> |
---|
| 138 | |
---|
| 139 | <tr><td class="mdescLeft"> </td><td class="mdescRight">access function <br></td></tr> |
---|
| 140 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4272982f976ea9d0ea7c9b7182ed7e3c"></a><!-- doxytag: member="bdm::KalmanCh::_B" ref="4272982f976ea9d0ea7c9b7182ed7e3c" args="()" --> |
---|
| 141 | mat </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1StateSpace.html#4272982f976ea9d0ea7c9b7182ed7e3c">_B</a> ()</td></tr> |
---|
| 142 | |
---|
| 143 | <tr><td class="mdescLeft"> </td><td class="mdescRight">access function <br></td></tr> |
---|
| 144 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ec4c0923e2b5d0c3e5dfe119ffee511e"></a><!-- doxytag: member="bdm::KalmanCh::_C" ref="ec4c0923e2b5d0c3e5dfe119ffee511e" args="()" --> |
---|
| 145 | mat </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1StateSpace.html#ec4c0923e2b5d0c3e5dfe119ffee511e">_C</a> ()</td></tr> |
---|
| 146 | |
---|
| 147 | <tr><td class="mdescLeft"> </td><td class="mdescRight">access function <br></td></tr> |
---|
| 148 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e0757fcc5e0ebaf0bd95f522bf405f06"></a><!-- doxytag: member="bdm::KalmanCh::_D" ref="e0757fcc5e0ebaf0bd95f522bf405f06" args="()" --> |
---|
| 149 | mat </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1StateSpace.html#e0757fcc5e0ebaf0bd95f522bf405f06">_D</a> ()</td></tr> |
---|
| 150 | |
---|
| 151 | <tr><td class="mdescLeft"> </td><td class="mdescRight">access function <br></td></tr> |
---|
| 152 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4c908775f27db8d869b93078862a4934"></a><!-- doxytag: member="bdm::KalmanCh::_Q" ref="4c908775f27db8d869b93078862a4934" args="()" --> |
---|
| 153 | <a class="el" href="classbdm_1_1chmat.html">chmat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1StateSpace.html#4c908775f27db8d869b93078862a4934">_Q</a> ()</td></tr> |
---|
| 154 | |
---|
| 155 | <tr><td class="mdescLeft"> </td><td class="mdescRight">access function <br></td></tr> |
---|
| 156 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8c94418779eb70f6199fa3467c45f316"></a><!-- doxytag: member="bdm::KalmanCh::_R" ref="8c94418779eb70f6199fa3467c45f316" args="()" --> |
---|
| 157 | <a class="el" href="classbdm_1_1chmat.html">chmat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1StateSpace.html#8c94418779eb70f6199fa3467c45f316">_R</a> ()</td></tr> |
---|
| 158 | |
---|
| 159 | <tr><td class="mdescLeft"> </td><td class="mdescRight">access function <br></td></tr> |
---|
[270] | 160 | <tr><td colspan="2"><div class="groupHeader">Mathematical operations</div></td></tr> |
---|
[259] | 161 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1dee3fddaf021e62d925289660a707dc"></a><!-- doxytag: member="bdm::KalmanCh::bayesB" ref="1dee3fddaf021e62d925289660a707dc" args="(const mat &Dt)" --> |
---|
| 162 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#1dee3fddaf021e62d925289660a707dc">bayesB</a> (const mat &Dt)</td></tr> |
---|
| 163 | |
---|
| 164 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Batch Bayes rule (columns of Dt are observations). <br></td></tr> |
---|
| 165 | <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> |
---|
| 166 | |
---|
| 167 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0e8ebe61fb14990abe1254bd3dda5fae"></a><!-- doxytag: member="bdm::KalmanCh::logpred_m" ref="0e8ebe61fb14990abe1254bd3dda5fae" args="(const mat &dt) const " --> |
---|
| 168 | 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> |
---|
| 169 | |
---|
| 170 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Matrix version of logpred. <br></td></tr> |
---|
[270] | 171 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="688d7a2aced1e06aa1c468d73a9e5eba"></a><!-- doxytag: member="bdm::KalmanCh::epredictor" ref="688d7a2aced1e06aa1c468d73a9e5eba" args="() const " --> |
---|
| 172 | 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> |
---|
[259] | 173 | |
---|
[397] | 174 | <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_14.png">. <br></td></tr> |
---|
[270] | 175 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="598b25e3f3d96a5bc00a5faeb5b3c912"></a><!-- doxytag: member="bdm::KalmanCh::predictor" ref="598b25e3f3d96a5bc00a5faeb5b3c912" args="() const " --> |
---|
| 176 | 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> |
---|
[259] | 177 | |
---|
[538] | 178 | <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> |
---|
[270] | 179 | <tr><td colspan="2"><div class="groupHeader">Access to attributes</div></td></tr> |
---|
[269] | 180 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ff2d8755ba0b3def927d31305c03b09c"></a><!-- doxytag: member="bdm::KalmanCh::_drv" ref="ff2d8755ba0b3def927d31305c03b09c" args="() const " --> |
---|
[270] | 181 | const <a class="el" href="classbdm_1_1RV.html">RV</a> & </td><td class="memItemRight" valign="bottom"><b>_drv</b> () const </td></tr> |
---|
[269] | 182 | |
---|
| 183 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f135ae6dce7e9f30c9f88229c7930b96"></a><!-- doxytag: member="bdm::KalmanCh::set_drv" ref="f135ae6dce7e9f30c9f88229c7930b96" args="(const RV &rv)" --> |
---|
[270] | 184 | 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> |
---|
[269] | 185 | |
---|
[271] | 186 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b38d92f17620813ad872d86e01a26e5e"></a><!-- doxytag: member="bdm::KalmanCh::set_rv" ref="b38d92f17620813ad872d86e01a26e5e" args="(const RV &rv)" --> |
---|
| 187 | void </td><td class="memItemRight" valign="bottom"><b>set_rv</b> (const <a class="el" href="classbdm_1_1RV.html">RV</a> &rv)</td></tr> |
---|
| 188 | |
---|
[259] | 189 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5be65d37dedfe33a3671e7065f523a70"></a><!-- doxytag: member="bdm::KalmanCh::_ll" ref="5be65d37dedfe33a3671e7065f523a70" args="() const " --> |
---|
[270] | 190 | double </td><td class="memItemRight" valign="bottom"><b>_ll</b> () const </td></tr> |
---|
[259] | 191 | |
---|
| 192 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="236b3abbcc93594fc97cd86d82c1a83f"></a><!-- doxytag: member="bdm::KalmanCh::set_evalll" ref="236b3abbcc93594fc97cd86d82c1a83f" args="(bool evl0)" --> |
---|
[270] | 193 | void </td><td class="memItemRight" valign="bottom"><b>set_evalll</b> (bool evl0)</td></tr> |
---|
[259] | 194 | |
---|
| 195 | <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> |
---|
[590] | 196 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="aac28e226fe6cbff5a9ae38d8d025d7a"></a><!-- doxytag: member="bdm::KalmanCh::yrv" ref="aac28e226fe6cbff5a9ae38d8d025d7a" args="" --> |
---|
| 197 | <a class="el" href="classbdm_1_1RV.html">RV</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1Kalman.html#aac28e226fe6cbff5a9ae38d8d025d7a">yrv</a></td></tr> |
---|
[259] | 198 | |
---|
[590] | 199 | <tr><td class="mdescLeft"> </td><td class="mdescRight">id of output <br></td></tr> |
---|
| 200 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="44d4a8ab05d5311286e1da78b831633e"></a><!-- doxytag: member="bdm::KalmanCh::urv" ref="44d4a8ab05d5311286e1da78b831633e" args="" --> |
---|
| 201 | <a class="el" href="classbdm_1_1RV.html">RV</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1Kalman.html#44d4a8ab05d5311286e1da78b831633e">urv</a></td></tr> |
---|
[259] | 202 | |
---|
[590] | 203 | <tr><td class="mdescLeft"> </td><td class="mdescRight">id of input <br></td></tr> |
---|
| 204 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bd69dfb802465f22dd84d73a180d5c92"></a><!-- doxytag: member="bdm::KalmanCh::_K" ref="bd69dfb802465f22dd84d73a180d5c92" args="" --> |
---|
| 205 | mat </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1Kalman.html#bd69dfb802465f22dd84d73a180d5c92">_K</a></td></tr> |
---|
[259] | 206 | |
---|
[590] | 207 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Kalman gain. <br></td></tr> |
---|
| 208 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c83599f2541eb01de329f7b0bb35bf43"></a><!-- doxytag: member="bdm::KalmanCh::est" ref="c83599f2541eb01de329f7b0bb35bf43" args="" --> |
---|
| 209 | <a class="el" href="classbdm_1_1shared__ptr.html">shared_ptr</a>< <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#c83599f2541eb01de329f7b0bb35bf43">est</a></td></tr> |
---|
[259] | 210 | |
---|
[590] | 211 | <tr><td class="mdescLeft"> </td><td class="mdescRight">posterior <br></td></tr> |
---|
| 212 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ba555c394c429f6831c9bbabfa2c944c"></a><!-- doxytag: member="bdm::KalmanCh::fy" ref="ba555c394c429f6831c9bbabfa2c944c" args="" --> |
---|
| 213 | <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> |
---|
[259] | 214 | |
---|
[590] | 215 | <tr><td class="mdescLeft"> </td><td class="mdescRight">marginal on data f(y|y) <br></td></tr> |
---|
| 216 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c400357e37d27a4834b2b1d9211009ed"></a><!-- doxytag: member="bdm::KalmanCh::drv" ref="c400357e37d27a4834b2b1d9211009ed" args="" --> |
---|
| 217 | <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> |
---|
| 218 | |
---|
| 219 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Random variable of the data (optional). <br></td></tr> |
---|
| 220 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4064b6559d962633e4372b12f4cd204a"></a><!-- doxytag: member="bdm::KalmanCh::ll" ref="4064b6559d962633e4372b12f4cd204a" args="" --> |
---|
| 221 | double </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#4064b6559d962633e4372b12f4cd204a">ll</a></td></tr> |
---|
| 222 | |
---|
| 223 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Logarithm of marginalized data likelihood. <br></td></tr> |
---|
| 224 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="faff0ad12556fe7dc0e2807d4fd938ee"></a><!-- doxytag: member="bdm::KalmanCh::evalll" ref="faff0ad12556fe7dc0e2807d4fd938ee" args="" --> |
---|
| 225 | bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#faff0ad12556fe7dc0e2807d4fd938ee">evalll</a></td></tr> |
---|
| 226 | |
---|
| 227 | <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> |
---|
| 228 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c3120f1c9cd7c3a0ba9944e4a2381f21"></a><!-- doxytag: member="bdm::KalmanCh::dimx" ref="c3120f1c9cd7c3a0ba9944e4a2381f21" args="" --> |
---|
| 229 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1StateSpace.html#c3120f1c9cd7c3a0ba9944e4a2381f21">dimx</a></td></tr> |
---|
| 230 | |
---|
[259] | 231 | <tr><td class="mdescLeft"> </td><td class="mdescRight">cache of rv.count() <br></td></tr> |
---|
[590] | 232 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3b784d85ca911866225a79193ae1441f"></a><!-- doxytag: member="bdm::KalmanCh::dimy" ref="3b784d85ca911866225a79193ae1441f" args="" --> |
---|
| 233 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1StateSpace.html#3b784d85ca911866225a79193ae1441f">dimy</a></td></tr> |
---|
[259] | 234 | |
---|
| 235 | <tr><td class="mdescLeft"> </td><td class="mdescRight">cache of rvy.count() <br></td></tr> |
---|
[590] | 236 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="95bb59ffbfd34c55d03d4d7a2a9b4faf"></a><!-- doxytag: member="bdm::KalmanCh::dimu" ref="95bb59ffbfd34c55d03d4d7a2a9b4faf" args="" --> |
---|
| 237 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1StateSpace.html#95bb59ffbfd34c55d03d4d7a2a9b4faf">dimu</a></td></tr> |
---|
[259] | 238 | |
---|
| 239 | <tr><td class="mdescLeft"> </td><td class="mdescRight">cache of rvu.count() <br></td></tr> |
---|
[590] | 240 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="de7d828a8d06cbbd5ac45afeaf9f0c7b"></a><!-- doxytag: member="bdm::KalmanCh::A" ref="de7d828a8d06cbbd5ac45afeaf9f0c7b" args="" --> |
---|
| 241 | mat </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1StateSpace.html#de7d828a8d06cbbd5ac45afeaf9f0c7b">A</a></td></tr> |
---|
[259] | 242 | |
---|
| 243 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Matrix A. <br></td></tr> |
---|
[590] | 244 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0cdaa906550290b759a1584d02b3ca51"></a><!-- doxytag: member="bdm::KalmanCh::B" ref="0cdaa906550290b759a1584d02b3ca51" args="" --> |
---|
| 245 | mat </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1StateSpace.html#0cdaa906550290b759a1584d02b3ca51">B</a></td></tr> |
---|
[259] | 246 | |
---|
| 247 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Matrix B. <br></td></tr> |
---|
[590] | 248 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c7ec82d2200c956cff6dff559bd32ff9"></a><!-- doxytag: member="bdm::KalmanCh::C" ref="c7ec82d2200c956cff6dff559bd32ff9" args="" --> |
---|
| 249 | mat </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1StateSpace.html#c7ec82d2200c956cff6dff559bd32ff9">C</a></td></tr> |
---|
[259] | 250 | |
---|
| 251 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Matrix C. <br></td></tr> |
---|
[590] | 252 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d5769a41b34eb518716120cf04dbc23f"></a><!-- doxytag: member="bdm::KalmanCh::D" ref="d5769a41b34eb518716120cf04dbc23f" args="" --> |
---|
| 253 | mat </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1StateSpace.html#d5769a41b34eb518716120cf04dbc23f">D</a></td></tr> |
---|
[259] | 254 | |
---|
| 255 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Matrix D. <br></td></tr> |
---|
[590] | 256 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="66248c83836424f1cd7c1b5b9a92cf1f"></a><!-- doxytag: member="bdm::KalmanCh::Q" ref="66248c83836424f1cd7c1b5b9a92cf1f" args="" --> |
---|
| 257 | <a class="el" href="classbdm_1_1chmat.html">chmat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1StateSpace.html#66248c83836424f1cd7c1b5b9a92cf1f">Q</a></td></tr> |
---|
[259] | 258 | |
---|
| 259 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Matrix Q in square-root form. <br></td></tr> |
---|
[590] | 260 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="11dd3493d62ec9329860386adb3e6084"></a><!-- doxytag: member="bdm::KalmanCh::R" ref="11dd3493d62ec9329860386adb3e6084" args="" --> |
---|
| 261 | <a class="el" href="classbdm_1_1chmat.html">chmat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1StateSpace.html#11dd3493d62ec9329860386adb3e6084">R</a></td></tr> |
---|
[259] | 262 | |
---|
| 263 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Matrix R in square-root form. <br></td></tr> |
---|
[590] | 264 | <tr><td colspan="2"><div class="groupHeader">Internal storage - needs initialize()</div></td></tr> |
---|
| 265 | <tr><td colspan="2"><div class="groupText">pre array (triangular matrix) <br><br></div></td></tr> |
---|
| 266 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="48611c8582706cfa62e832be0972e75d"></a><!-- doxytag: member="bdm::KalmanCh::preA" ref="48611c8582706cfa62e832be0972e75d" args="" --> |
---|
| 267 | mat </td><td class="memItemRight" valign="bottom"><b>preA</b></td></tr> |
---|
[259] | 268 | |
---|
[590] | 269 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bcbd68f51d4b57246e7784ca5900171f"></a><!-- doxytag: member="bdm::KalmanCh::postA" ref="bcbd68f51d4b57246e7784ca5900171f" args="" --> |
---|
| 270 | mat </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1KalmanCh.html#bcbd68f51d4b57246e7784ca5900171f">postA</a></td></tr> |
---|
[259] | 271 | |
---|
[590] | 272 | <tr><td class="mdescLeft"> </td><td class="mdescRight">post array (triangular matrix) <br></td></tr> |
---|
[290] | 273 | <tr><td colspan="2"><br><h2>Extension to conditional BM</h2></td></tr> |
---|
| 274 | <tr><td colspan="2">This extension is useful e.g. in Marginalized Particle Filter (<a class="el" href="classbdm_1_1MPF.html">bdm::MPF</a>). Alternatively, it can be used for automated connection to <a class="el" href="classbdm_1_1DS.html" title="Abstract class for discrete-time sources of data.">DS</a> when the condition is observed <br><br></td></tr> |
---|
| 275 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b5e8e016be16e4029c789063cb3f3b33"></a><!-- doxytag: member="bdm::KalmanCh::_rvc" ref="b5e8e016be16e4029c789063cb3f3b33" args="() const " --> |
---|
| 276 | const <a class="el" href="classbdm_1_1RV.html">RV</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#b5e8e016be16e4029c789063cb3f3b33">_rvc</a> () const </td></tr> |
---|
| 277 | |
---|
| 278 | <tr><td class="mdescLeft"> </td><td class="mdescRight">access function <br></td></tr> |
---|
| 279 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6799f4b16a6a59ed58b1d0d6e17116f4"></a><!-- doxytag: member="bdm::KalmanCh::condition" ref="6799f4b16a6a59ed58b1d0d6e17116f4" args="(const vec &val)" --> |
---|
| 280 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#6799f4b16a6a59ed58b1d0d6e17116f4">condition</a> (const vec &val)</td></tr> |
---|
| 281 | |
---|
| 282 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Substitute <code>val</code> for <code>rvc</code>. <br></td></tr> |
---|
| 283 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="de95c590d650b2db423d53992f0906cb"></a><!-- doxytag: member="bdm::KalmanCh::rvc" ref="de95c590d650b2db423d53992f0906cb" args="" --> |
---|
| 284 | <a class="el" href="classbdm_1_1RV.html">RV</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#de95c590d650b2db423d53992f0906cb">rvc</a></td></tr> |
---|
| 285 | |
---|
| 286 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Name of extension variable. <br></td></tr> |
---|
| 287 | <tr><td colspan="2"><br><h2>Logging of results</h2></td></tr> |
---|
[353] | 288 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="adb539fa2585c8a2a91c54e5aebf330e"></a><!-- doxytag: member="bdm::KalmanCh::set_options" ref="adb539fa2585c8a2a91c54e5aebf330e" args="(const string &opt)" --> |
---|
| 289 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#adb539fa2585c8a2a91c54e5aebf330e">set_options</a> (const string &opt)</td></tr> |
---|
[290] | 290 | |
---|
[472] | 291 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Set boolean options from a string, recognized are: "logbounds,logll". <br></td></tr> |
---|
[323] | 292 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2298ca6af9b13a78a4c9e18ab43f1827"></a><!-- doxytag: member="bdm::KalmanCh::log_add" ref="2298ca6af9b13a78a4c9e18ab43f1827" args="(logger &L, const string &name="")" --> |
---|
| 293 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#2298ca6af9b13a78a4c9e18ab43f1827">log_add</a> (<a class="el" href="classbdm_1_1logger.html">logger</a> &L, const string &name="")</td></tr> |
---|
[290] | 294 | |
---|
| 295 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Add all logged variables to a <a class="el" href="classbdm_1_1logger.html" title="Class for storing results (and semi-results) of an experiment.">logger</a>. <br></td></tr> |
---|
[323] | 296 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b517e1679eaa94e803ea4cd0b8efbcd7"></a><!-- doxytag: member="bdm::KalmanCh::logit" ref="b517e1679eaa94e803ea4cd0b8efbcd7" args="(logger &L)" --> |
---|
| 297 | virtual void </td><td class="memItemRight" valign="bottom"><b>logit</b> (<a class="el" href="classbdm_1_1logger.html">logger</a> &L)</td></tr> |
---|
[290] | 298 | |
---|
| 299 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="109c1a626a69031658e3a44e9e500cca"></a><!-- doxytag: member="bdm::KalmanCh::LIDs" ref="109c1a626a69031658e3a44e9e500cca" args="" --> |
---|
| 300 | ivec </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#109c1a626a69031658e3a44e9e500cca">LIDs</a></td></tr> |
---|
| 301 | |
---|
[353] | 302 | <tr><td class="mdescLeft"> </td><td class="mdescRight">IDs of storages in loggers 4:[1=mean,2=lb,3=ub,4=ll]. <br></td></tr> |
---|
| 303 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="398b7e7a162cf37d0022d6126495f207"></a><!-- doxytag: member="bdm::KalmanCh::LFlags" ref="398b7e7a162cf37d0022d6126495f207" args="" --> |
---|
| 304 | ivec </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#398b7e7a162cf37d0022d6126495f207">LFlags</a></td></tr> |
---|
[290] | 305 | |
---|
[353] | 306 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Flags for logging - same size as LIDs, each entry correspond to the same in LIDs. <br></td></tr> |
---|
[259] | 307 | </table> |
---|
[290] | 308 | <hr><a name="_details"></a><h2>Detailed Description</h2> |
---|
[590] | 309 | <a class="el" href="classbdm_1_1Kalman.html" title="Common abstract base for Kalman filters.">Kalman</a> filter in square <a class="el" href="classbdm_1_1root.html" title="Root class of BDM objects.">root</a> form. |
---|
[290] | 310 | <p> |
---|
[396] | 311 | 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> |
---|
[290] | 312 | <span class="keyword">using namespace </span>bdm; |
---|
[538] | 313 | |
---|
[290] | 314 | <span class="comment">// estimation of AR(0) model</span> |
---|
| 315 | <span class="keywordtype">int</span> main() { |
---|
| 316 | <span class="comment">//dimensions</span> |
---|
[538] | 317 | <span class="keywordtype">int</span> dx = 3, dy = 3, du = 1; |
---|
[290] | 318 | <span class="comment">// matrices</span> |
---|
[538] | 319 | mat A = eye ( dx ); |
---|
| 320 | mat B = zeros ( dx, du ); |
---|
| 321 | mat C = eye ( dx ); |
---|
| 322 | mat D = zeros ( dy, du ); |
---|
| 323 | mat Q = eye ( dx ); |
---|
| 324 | mat R = 0.1 * eye ( dy ); |
---|
[290] | 325 | <span class="comment">//prior</span> |
---|
[538] | 326 | mat P0 = 100 * eye ( dx ); |
---|
| 327 | vec mu0 = zeros ( dx ); |
---|
[290] | 328 | <span class="comment">// Estimator</span> |
---|
| 329 | KalmanCh KF; |
---|
[538] | 330 | KF.set_parameters ( A, B, C, D,<span class="comment">/*covariances*/</span> Q, R ); |
---|
| 331 | KF.set_statistics ( mu0, P0 ); |
---|
[290] | 332 | <span class="comment">// Estimation loop</span> |
---|
[538] | 333 | <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i = 0; i < 100; i++ ) { |
---|
| 334 | KF.bayes ( randn ( dx + du ) ); |
---|
[290] | 335 | } |
---|
| 336 | <span class="comment">//print results</span> |
---|
| 337 | cout << <span class="stringliteral">"Posterior estimate of x is: "</span> << endl; |
---|
[538] | 338 | cout << <span class="stringliteral">"mean: "</span> << KF.posterior().mean() << endl; |
---|
| 339 | cout << <span class="stringliteral">"variance: "</span> << KF.posterior().variance() << endl; |
---|
[290] | 340 | } |
---|
[590] | 341 | </pre></div><p> |
---|
| 342 | Complete constructor: <hr><h2>Member Function Documentation</h2> |
---|
[259] | 343 | <a class="anchor" name="b41fe5540548100b08e1684c3be767b6"></a><!-- doxytag: member="bdm::KalmanCh::bayes" ref="b41fe5540548100b08e1684c3be767b6" args="(const vec &dt)" --> |
---|
| 344 | <div class="memitem"> |
---|
| 345 | <div class="memproto"> |
---|
| 346 | <table class="memname"> |
---|
| 347 | <tr> |
---|
| 348 | <td class="memname">void bdm::KalmanCh::bayes </td> |
---|
| 349 | <td>(</td> |
---|
| 350 | <td class="paramtype">const vec & </td> |
---|
| 351 | <td class="paramname"> <em>dt</em> </td> |
---|
| 352 | <td> ) </td> |
---|
| 353 | <td><code> [virtual]</code></td> |
---|
| 354 | </tr> |
---|
| 355 | </table> |
---|
| 356 | </div> |
---|
| 357 | <div class="memdoc"> |
---|
| 358 | |
---|
| 359 | <p> |
---|
| 360 | Here dt = [yt;ut] of appropriate dimensions. |
---|
| 361 | <p> |
---|
| 362 | The following equality hold::<p class="formulaDsp"> |
---|
[397] | 363 | <img class="formulaDsp" alt="\[ \left[\begin{array}{cc} R^{0.5}\\ P_{t|t-1}^{0.5}C' & P_{t|t-1}^{0.5}CA'\\ & Q^{0.5}\end{array}\right]<\mathrm{orth.oper.}>=\left[\begin{array}{cc} R_{y}^{0.5} & KA'\\ & P_{t+1|t}^{0.5}\\ \\\end{array}\right]\]" src="form_31.png"> |
---|
[259] | 364 | <p> |
---|
| 365 | <p> |
---|
| 366 | Thus this object evaluates only predictors! Not filtering densities. |
---|
[590] | 367 | <p>Implements <a class="el" href="classbdm_1_1BM.html#60b1779a577367c369a932cabd3a6188">bdm::BM</a>.</p> |
---|
[259] | 368 | |
---|
[353] | 369 | <p>Reimplemented in <a class="el" href="classbdm_1_1EKFCh.html#4c8609c37290b158f88a31dae4047225">bdm::EKFCh</a>.</p> |
---|
[259] | 370 | |
---|
[590] | 371 | <p>References <a class="el" href="chmat_8h-source.html#l00090">bdm::chmat::_Ch()</a>, <a class="el" href="kalman_8h-source.html#l00110">bdm::Kalman< chmat >::_K</a>, <a class="el" href="exp__family_8h-source.html#l00171">bdm::enorm< sq_T >::_mu()</a>, <a class="el" href="exp__family_8h-source.html#l00174">bdm::enorm< sq_T >::_R()</a>, <a class="el" href="kalman_8h-source.html#l00043">bdm::StateSpace< chmat >::A</a>, <a class="el" href="kalman_8h-source.html#l00045">bdm::StateSpace< chmat >::B</a>, <a class="el" href="bdmerror_8h-source.html#l00059">bdm_warning</a>, <a class="el" href="kalman_8h-source.html#l00047">bdm::StateSpace< chmat >::C</a>, <a class="el" href="kalman_8h-source.html#l00049">bdm::StateSpace< chmat >::D</a>, <a class="el" href="kalman_8h-source.html#l00041">bdm::StateSpace< chmat >::dimu</a>, <a class="el" href="kalman_8h-source.html#l00037">bdm::StateSpace< chmat >::dimx</a>, <a class="el" href="kalman_8h-source.html#l00039">bdm::StateSpace< chmat >::dimy</a>, <a class="el" href="kalman_8h-source.html#l00112">bdm::Kalman< chmat >::est</a>, <a class="el" href="bdmbase_8h-source.html#l00850">bdm::BM::evalll</a>, <a class="el" href="exp__family_8h-source.html#l00054">bdm::eEF::evallog()</a>, <a class="el" href="kalman_8h-source.html#l00114">bdm::Kalman< chmat >::fy</a>, <a class="el" href="bdmbase_8h-source.html#l00848">bdm::BM::ll</a>, and <a class="el" href="kalman_8h-source.html#l00172">postA</a>.</p> |
---|
[259] | 372 | |
---|
| 373 | </div> |
---|
| 374 | </div><p> |
---|
[270] | 375 | <a class="anchor" name="50257e0c1e5b5c73153ea6e716ad8ae0"></a><!-- doxytag: member="bdm::KalmanCh::logpred" ref="50257e0c1e5b5c73153ea6e716ad8ae0" args="(const vec &dt) const " --> |
---|
[259] | 376 | <div class="memitem"> |
---|
| 377 | <div class="memproto"> |
---|
| 378 | <table class="memname"> |
---|
| 379 | <tr> |
---|
[270] | 380 | <td class="memname">virtual double bdm::BM::logpred </td> |
---|
[259] | 381 | <td>(</td> |
---|
[270] | 382 | <td class="paramtype">const vec & </td> |
---|
| 383 | <td class="paramname"> <em>dt</em> </td> |
---|
[259] | 384 | <td> ) </td> |
---|
[270] | 385 | <td> const<code> [inline, virtual, inherited]</code></td> |
---|
[259] | 386 | </tr> |
---|
| 387 | </table> |
---|
| 388 | </div> |
---|
| 389 | <div class="memdoc"> |
---|
| 390 | |
---|
| 391 | <p> |
---|
[270] | 392 | Evaluates predictive log-likelihood of the given data record I.e. marginal likelihood of the data with the posterior integrated out. |
---|
| 393 | <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> |
---|
[259] | 394 | |
---|
[590] | 395 | <p>References <a class="el" href="bdmerror_8h-source.html#l00051">bdm_error</a>.</p> |
---|
[270] | 396 | |
---|
[590] | 397 | <p>Referenced by <a class="el" href="bdmbase_8h-source.html#l00885">bdm::BM::logpred_m()</a>.</p> |
---|
| 398 | |
---|
[259] | 399 | </div> |
---|
| 400 | </div><p> |
---|
| 401 | <hr>The documentation for this class was generated from the following files:<ul> |
---|
[538] | 402 | <li><a class="el" href="kalman_8h-source.html">kalman.h</a><li>kalman.cpp</ul> |
---|
[397] | 403 | </div> |
---|
[590] | 404 | <hr size="1"><address style="text-align: right;"><small>Generated on Sat Aug 29 20:49:46 2009 for mixpp by |
---|
[259] | 405 | <a href="http://www.doxygen.org/index.html"> |
---|
[538] | 406 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address> |
---|
[259] | 407 | </body> |
---|
| 408 | </html> |
---|