[591] | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
---|
| 2 | <html xmlns="http://www.w3.org/1999/xhtml"> |
---|
| 3 | <head> |
---|
| 4 | <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
---|
[259] | 5 | <title>mixpp: bdm::BM Class Reference</title> |
---|
[591] | 6 | <link href="tabs.css" rel="stylesheet" type="text/css"/> |
---|
| 7 | <link href="doxygen.css" rel="stylesheet" type="text/css"/> |
---|
| 8 | </head> |
---|
| 9 | <body> |
---|
| 10 | <!-- Generated by Doxygen 1.6.1 --> |
---|
[271] | 11 | <script type="text/javascript"> |
---|
| 12 | <!-- |
---|
| 13 | function changeDisplayState (e){ |
---|
| 14 | var num=this.id.replace(/[^[0-9]/g,''); |
---|
| 15 | var button=this.firstChild; |
---|
| 16 | var sectionDiv=document.getElementById('dynsection'+num); |
---|
| 17 | if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){ |
---|
| 18 | sectionDiv.style.display='block'; |
---|
| 19 | button.src='open.gif'; |
---|
| 20 | }else{ |
---|
| 21 | sectionDiv.style.display='none'; |
---|
| 22 | button.src='closed.gif'; |
---|
| 23 | } |
---|
| 24 | } |
---|
| 25 | function initDynSections(){ |
---|
| 26 | var divs=document.getElementsByTagName('div'); |
---|
| 27 | var sectionCounter=1; |
---|
| 28 | for(var i=0;i<divs.length-1;i++){ |
---|
| 29 | if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){ |
---|
| 30 | var header=divs[i]; |
---|
| 31 | var section=divs[i+1]; |
---|
| 32 | var button=header.firstChild; |
---|
| 33 | if (button!='IMG'){ |
---|
| 34 | divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild); |
---|
| 35 | button=document.createElement('img'); |
---|
| 36 | divs[i].insertBefore(button,divs[i].firstChild); |
---|
| 37 | } |
---|
| 38 | header.style.cursor='pointer'; |
---|
| 39 | header.onclick=changeDisplayState; |
---|
| 40 | header.id='dynheader'+sectionCounter; |
---|
| 41 | button.src='closed.gif'; |
---|
| 42 | section.id='dynsection'+sectionCounter; |
---|
| 43 | section.style.display='none'; |
---|
| 44 | section.style.marginLeft='14px'; |
---|
| 45 | sectionCounter++; |
---|
| 46 | } |
---|
| 47 | } |
---|
| 48 | } |
---|
| 49 | window.onload = initDynSections; |
---|
| 50 | --> |
---|
| 51 | </script> |
---|
[259] | 52 | <div class="navigation" id="top"> |
---|
| 53 | <div class="tabs"> |
---|
| 54 | <ul> |
---|
[271] | 55 | <li><a href="main.html"><span>Main Page</span></a></li> |
---|
[259] | 56 | <li><a href="pages.html"><span>Related Pages</span></a></li> |
---|
[290] | 57 | <li class="current"><a href="annotated.html"><span>Classes</span></a></li> |
---|
[259] | 58 | <li><a href="files.html"><span>Files</span></a></li> |
---|
| 59 | </ul> |
---|
| 60 | </div> |
---|
| 61 | <div class="tabs"> |
---|
| 62 | <ul> |
---|
| 63 | <li><a href="annotated.html"><span>Class List</span></a></li> |
---|
[290] | 64 | <li><a href="classes.html"><span>Class Index</span></a></li> |
---|
[259] | 65 | <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> |
---|
| 66 | <li><a href="functions.html"><span>Class Members</span></a></li> |
---|
| 67 | </ul> |
---|
| 68 | </div> |
---|
[271] | 69 | <div class="navpath"><b>bdm</b>::<a class="el" href="classbdm_1_1BM.html">BM</a> |
---|
[259] | 70 | </div> |
---|
| 71 | </div> |
---|
| 72 | <div class="contents"> |
---|
[591] | 73 | <h1>bdm::BM Class Reference</h1><!-- doxytag: class="bdm::BM" --><!-- doxytag: inherits="bdm::root" --> |
---|
| 74 | <p>Bayesian Model of a system, i.e. all uncertainty is modeled by probabilities. |
---|
| 75 | <a href="#_details">More...</a></p> |
---|
[259] | 76 | |
---|
[591] | 77 | <p><code>#include <<a class="el" href="bdmbase_8h_source.html">bdmbase.h</a>></code></p> |
---|
[590] | 78 | |
---|
[591] | 79 | <p><a href="classbdm_1_1BM-members.html">List of all members.</a></p> |
---|
| 80 | <table border="0" cellpadding="0" cellspacing="0"> |
---|
| 81 | <tr><td colspan="2"><h2>Public Member Functions</h2></td></tr> |
---|
| 82 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a23c6a8f71f922023ab08dcb0487a86de"></a><!-- doxytag: member="bdm::BM::from_setting" ref="a23c6a8f71f922023ab08dcb0487a86de" args="(const Setting &set)" --> |
---|
| 83 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#a23c6a8f71f922023ab08dcb0487a86de">from_setting</a> (const Setting &set)</td></tr> |
---|
| 84 | <tr><td class="mdescLeft"> </td><td class="mdescRight">This method arrange instance properties according the data stored in the Setting structure. <br/></td></tr> |
---|
| 85 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aaf0e6941ba5919cae1bc530e2181b109"></a><!-- doxytag: member="bdm::BM::to_string" ref="aaf0e6941ba5919cae1bc530e2181b109" args="()" --> |
---|
| 86 | virtual string </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1root.html#aaf0e6941ba5919cae1bc530e2181b109">to_string</a> ()</td></tr> |
---|
| 87 | <tr><td class="mdescLeft"> </td><td class="mdescRight">This method returns a basic info about the current instance. <br/></td></tr> |
---|
| 88 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a67d954d255ede776eade7334d4895790"></a><!-- doxytag: member="bdm::BM::to_setting" ref="a67d954d255ede776eade7334d4895790" args="(Setting &set) const " --> |
---|
| 89 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1root.html#a67d954d255ede776eade7334d4895790">to_setting</a> (Setting &set) const </td></tr> |
---|
| 90 | <tr><td class="mdescLeft"> </td><td class="mdescRight">This method save all the instance properties into the Setting structure. <br/></td></tr> |
---|
| 91 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1c314bd6d6dacb8ba78ea5eb88fd9516"></a><!-- doxytag: member="bdm::BM::validate" ref="a1c314bd6d6dacb8ba78ea5eb88fd9516" args="()" --> |
---|
| 92 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1root.html#a1c314bd6d6dacb8ba78ea5eb88fd9516">validate</a> ()</td></tr> |
---|
| 93 | <tr><td class="mdescLeft"> </td><td class="mdescRight">This method TODO. <br/></td></tr> |
---|
[270] | 94 | <tr><td colspan="2"><div class="groupHeader">Constructors</div></td></tr> |
---|
[591] | 95 | <tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrp559a25fdb98a7d1fd1c3771ac568d5e9"></a> </p> |
---|
| 96 | <br/><br/></div></td></tr> |
---|
| 97 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adb12aecc3135e7868c664e39e7133756"></a><!-- doxytag: member="bdm::BM::BM" ref="adb12aecc3135e7868c664e39e7133756" args="()" --> |
---|
[270] | 98 | </td><td class="memItemRight" valign="bottom"><b>BM</b> ()</td></tr> |
---|
[591] | 99 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a241b3701190ff1f729fe873a2eef0055"></a><!-- doxytag: member="bdm::BM::BM" ref="a241b3701190ff1f729fe873a2eef0055" args="(const BM &B)" --> |
---|
[270] | 100 | </td><td class="memItemRight" valign="bottom"><b>BM</b> (const <a class="el" href="classbdm_1_1BM.html">BM</a> &B)</td></tr> |
---|
[591] | 101 | <tr><td class="memItemLeft" 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#a40f01563651c1e4fe926189e41a6b8ab">_copy_</a> () const </td></tr> |
---|
[270] | 102 | <tr><td colspan="2"><div class="groupHeader">Mathematical operations</div></td></tr> |
---|
[591] | 103 | <tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrpfb3595af27ed8bd142c95323c0dab340"></a> </p> |
---|
| 104 | <br/><br/></div></td></tr> |
---|
| 105 | <tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#a60b1779a577367c369a932cabd3a6188">bayes</a> (const vec &dt)=0</td></tr> |
---|
| 106 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Incremental Bayes rule. <a href="#a60b1779a577367c369a932cabd3a6188"></a><br/></td></tr> |
---|
| 107 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1dee3fddaf021e62d925289660a707dc"></a><!-- doxytag: member="bdm::BM::bayesB" ref="a1dee3fddaf021e62d925289660a707dc" args="(const mat &Dt)" --> |
---|
| 108 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#a1dee3fddaf021e62d925289660a707dc">bayesB</a> (const mat &Dt)</td></tr> |
---|
| 109 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Batch Bayes rule (columns of Dt are observations). <br/></td></tr> |
---|
| 110 | <tr><td class="memItemLeft" align="right" valign="top">virtual double </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#a50257e0c1e5b5c73153ea6e716ad8ae0">logpred</a> (const vec &dt) const </td></tr> |
---|
| 111 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0e8ebe61fb14990abe1254bd3dda5fae"></a><!-- doxytag: member="bdm::BM::logpred_m" ref="a0e8ebe61fb14990abe1254bd3dda5fae" args="(const mat &dt) const " --> |
---|
| 112 | vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#a0e8ebe61fb14990abe1254bd3dda5fae">logpred_m</a> (const mat &dt) const </td></tr> |
---|
| 113 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Matrix version of logpred. <br/></td></tr> |
---|
| 114 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a688d7a2aced1e06aa1c468d73a9e5eba"></a><!-- doxytag: member="bdm::BM::epredictor" ref="a688d7a2aced1e06aa1c468d73a9e5eba" args="() const " --> |
---|
| 115 | 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#a688d7a2aced1e06aa1c468d73a9e5eba">epredictor</a> () const </td></tr> |
---|
[608] | 116 | <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_20.png"/>. <br/></td></tr> |
---|
[591] | 117 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a598b25e3f3d96a5bc00a5faeb5b3c912"></a><!-- doxytag: member="bdm::BM::predictor" ref="a598b25e3f3d96a5bc00a5faeb5b3c912" args="() const " --> |
---|
| 118 | 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#a598b25e3f3d96a5bc00a5faeb5b3c912">predictor</a> () const </td></tr> |
---|
[608] | 119 | <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_21.png"/>. <br/></td></tr> |
---|
[270] | 120 | <tr><td colspan="2"><div class="groupHeader">Access to attributes</div></td></tr> |
---|
[591] | 121 | <tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrpb6eb094f9e6af11f8a7d9efa9d8e3623"></a> </p> |
---|
| 122 | <br/><br/></div></td></tr> |
---|
| 123 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aff2d8755ba0b3def927d31305c03b09c"></a><!-- doxytag: member="bdm::BM::_drv" ref="aff2d8755ba0b3def927d31305c03b09c" args="() const " --> |
---|
[270] | 124 | const <a class="el" href="classbdm_1_1RV.html">RV</a> & </td><td class="memItemRight" valign="bottom"><b>_drv</b> () const </td></tr> |
---|
[591] | 125 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af135ae6dce7e9f30c9f88229c7930b96"></a><!-- doxytag: member="bdm::BM::set_drv" ref="af135ae6dce7e9f30c9f88229c7930b96" args="(const RV &rv)" --> |
---|
[270] | 126 | 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> |
---|
[591] | 127 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab38d92f17620813ad872d86e01a26e5e"></a><!-- doxytag: member="bdm::BM::set_rv" ref="ab38d92f17620813ad872d86e01a26e5e" args="(const RV &rv)" --> |
---|
[271] | 128 | 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> |
---|
[591] | 129 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5be65d37dedfe33a3671e7065f523a70"></a><!-- doxytag: member="bdm::BM::_ll" ref="a5be65d37dedfe33a3671e7065f523a70" args="() const " --> |
---|
[270] | 130 | double </td><td class="memItemRight" valign="bottom"><b>_ll</b> () const </td></tr> |
---|
[591] | 131 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a236b3abbcc93594fc97cd86d82c1a83f"></a><!-- doxytag: member="bdm::BM::set_evalll" ref="a236b3abbcc93594fc97cd86d82c1a83f" args="(bool evl0)" --> |
---|
[270] | 132 | void </td><td class="memItemRight" valign="bottom"><b>set_evalll</b> (bool evl0)</td></tr> |
---|
[591] | 133 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abb7b0065d6cb722a66b371a8260121e1"></a><!-- doxytag: member="bdm::BM::posterior" ref="abb7b0065d6cb722a66b371a8260121e1" args="() const =0" --> |
---|
[271] | 134 | virtual const <a class="el" href="classbdm_1_1epdf.html">epdf</a> & </td><td class="memItemRight" valign="bottom"><b>posterior</b> () const =0</td></tr> |
---|
[591] | 135 | <tr><td colspan="2"><h2>Protected Attributes</h2></td></tr> |
---|
| 136 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac400357e37d27a4834b2b1d9211009ed"></a><!-- doxytag: member="bdm::BM::drv" ref="ac400357e37d27a4834b2b1d9211009ed" args="" --> |
---|
| 137 | <a class="el" href="classbdm_1_1RV.html">RV</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#ac400357e37d27a4834b2b1d9211009ed">drv</a></td></tr> |
---|
| 138 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Random variable of the data (optional). <br/></td></tr> |
---|
| 139 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4064b6559d962633e4372b12f4cd204a"></a><!-- doxytag: member="bdm::BM::ll" ref="a4064b6559d962633e4372b12f4cd204a" args="" --> |
---|
| 140 | double </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#a4064b6559d962633e4372b12f4cd204a">ll</a></td></tr> |
---|
| 141 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Logarithm of marginalized data likelihood. <br/></td></tr> |
---|
| 142 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afaff0ad12556fe7dc0e2807d4fd938ee"></a><!-- doxytag: member="bdm::BM::evalll" ref="afaff0ad12556fe7dc0e2807d4fd938ee" args="" --> |
---|
| 143 | bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#afaff0ad12556fe7dc0e2807d4fd938ee">evalll</a></td></tr> |
---|
| 144 | <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> |
---|
| 145 | <tr><td colspan="2"><h2>Extension to conditional BM</h2></td></tr> |
---|
| 146 | <tr><td colspan="2"><p><a class="anchor" id="amgrp74e1db869c28ea37aac65bd658ff5da4"></a> 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 </p> |
---|
| 147 | <br/><br/></td></tr> |
---|
| 148 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ade95c590d650b2db423d53992f0906cb"></a><!-- doxytag: member="bdm::BM::rvc" ref="ade95c590d650b2db423d53992f0906cb" args="" --> |
---|
| 149 | <a class="el" href="classbdm_1_1RV.html">RV</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#ade95c590d650b2db423d53992f0906cb">rvc</a></td></tr> |
---|
| 150 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Name of extension variable. <br/></td></tr> |
---|
| 151 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab5e8e016be16e4029c789063cb3f3b33"></a><!-- doxytag: member="bdm::BM::_rvc" ref="ab5e8e016be16e4029c789063cb3f3b33" args="() const " --> |
---|
| 152 | 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#ab5e8e016be16e4029c789063cb3f3b33">_rvc</a> () const </td></tr> |
---|
| 153 | <tr><td class="mdescLeft"> </td><td class="mdescRight">access function <br/></td></tr> |
---|
| 154 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6799f4b16a6a59ed58b1d0d6e17116f4"></a><!-- doxytag: member="bdm::BM::condition" ref="a6799f4b16a6a59ed58b1d0d6e17116f4" args="(const vec &val)" --> |
---|
| 155 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#a6799f4b16a6a59ed58b1d0d6e17116f4">condition</a> (const vec &val)</td></tr> |
---|
| 156 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Substitute <code>val</code> for <code>rvc</code>. <br/></td></tr> |
---|
| 157 | <tr><td colspan="2"><h2>Logging of results</h2></td></tr> |
---|
| 158 | <tr><td colspan="2"><p><a class="anchor" id="amgrp5b751fa78120752d90ae4487df3bfa73"></a> </p> |
---|
| 159 | <br/><br/></td></tr> |
---|
| 160 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a109c1a626a69031658e3a44e9e500cca"></a><!-- doxytag: member="bdm::BM::LIDs" ref="a109c1a626a69031658e3a44e9e500cca" args="" --> |
---|
| 161 | ivec </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#a109c1a626a69031658e3a44e9e500cca">LIDs</a></td></tr> |
---|
| 162 | <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> |
---|
| 163 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a398b7e7a162cf37d0022d6126495f207"></a><!-- doxytag: member="bdm::BM::LFlags" ref="a398b7e7a162cf37d0022d6126495f207" args="" --> |
---|
| 164 | ivec </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#a398b7e7a162cf37d0022d6126495f207">LFlags</a></td></tr> |
---|
| 165 | <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> |
---|
| 166 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aadb539fa2585c8a2a91c54e5aebf330e"></a><!-- doxytag: member="bdm::BM::set_options" ref="aadb539fa2585c8a2a91c54e5aebf330e" args="(const string &opt)" --> |
---|
| 167 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#aadb539fa2585c8a2a91c54e5aebf330e">set_options</a> (const string &opt)</td></tr> |
---|
| 168 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Set boolean options from a string, recognized are: "logbounds,logll". <br/></td></tr> |
---|
| 169 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2298ca6af9b13a78a4c9e18ab43f1827"></a><!-- doxytag: member="bdm::BM::log_add" ref="a2298ca6af9b13a78a4c9e18ab43f1827" args="(logger &L, const string &name="")" --> |
---|
| 170 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#a2298ca6af9b13a78a4c9e18ab43f1827">log_add</a> (<a class="el" href="classbdm_1_1logger.html">logger</a> &L, const string &name="")</td></tr> |
---|
| 171 | <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> |
---|
| 172 | <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab517e1679eaa94e803ea4cd0b8efbcd7"></a><!-- doxytag: member="bdm::BM::logit" ref="ab517e1679eaa94e803ea4cd0b8efbcd7" args="(logger &L)" --> |
---|
[323] | 173 | virtual void </td><td class="memItemRight" valign="bottom"><b>logit</b> (<a class="el" href="classbdm_1_1logger.html">logger</a> &L)</td></tr> |
---|
[259] | 174 | </table> |
---|
[591] | 175 | <hr/><a name="_details"></a><h2>Detailed Description</h2> |
---|
| 176 | <p>Bayesian Model of a system, i.e. all uncertainty is modeled by probabilities. </p> |
---|
| 177 | <p>This object represents exact or approximate evaluation of the Bayes rule: </p> |
---|
| 178 | <p class="formulaDsp"> |
---|
[608] | 179 | <img class="formulaDsp" alt="\[ f(\theta_t | d_1,\ldots,d_t) = \frac{f(y_t|\theta_t,\cdot) f(\theta_t|d_1,\ldots,d_{t-1})}{f(y_t|d_1,\ldots,d_{t-1})} \]" src="form_8.png"/> |
---|
[591] | 180 | </p> |
---|
| 181 | <p>Access to the resulting posterior density is via function <code>posterior()</code>.</p> |
---|
[608] | 182 | <p>As a "side-effect" it also evaluates log-likelihood of the data, which can be accessed via function _ll(). It can also evaluate predictors of future values of <img class="formulaInl" alt="$y_t$" src="form_9.png"/>, see functions <a class="el" href="classbdm_1_1BM.html#a688d7a2aced1e06aa1c468d73a9e5eba" title="Constructs a predictive density .">epredictor()</a> and <a class="el" href="classbdm_1_1BM.html#a598b25e3f3d96a5bc00a5faeb5b3c912" title="Constructs conditional density of 1-step ahead predictor .">predictor()</a>.</p> |
---|
| 183 | <p>Alternatively, it can evaluate posterior density conditioned by a known constant, <img class="formulaInl" alt="$ c_t $" src="form_10.png"/>: </p> |
---|
[591] | 184 | <p class="formulaDsp"> |
---|
[608] | 185 | <img class="formulaDsp" alt="\[ f(\theta_t | c_t, d_1,\ldots,d_t) \propto f(y_t,\theta_t|c_t,\cdot, d_1,\ldots,d_{t-1}) \]" src="form_11.png"/> |
---|
[591] | 186 | </p> |
---|
[608] | 187 | <p>The value of <img class="formulaInl" alt="$ c_t $" src="form_10.png"/> is set by function <a class="el" href="classbdm_1_1BM.html#a6799f4b16a6a59ed58b1d0d6e17116f4" title="Substitute val for rvc.">condition()</a>. </p> |
---|
[591] | 188 | <hr/><h2>Member Function Documentation</h2> |
---|
| 189 | <a class="anchor" id="a40f01563651c1e4fe926189e41a6b8ab"></a><!-- doxytag: member="bdm::BM::_copy_" ref="a40f01563651c1e4fe926189e41a6b8ab" args="() const " --> |
---|
[270] | 190 | <div class="memitem"> |
---|
| 191 | <div class="memproto"> |
---|
| 192 | <table class="memname"> |
---|
| 193 | <tr> |
---|
[591] | 194 | <td class="memname">virtual <a class="el" href="classbdm_1_1BM.html">BM</a>* bdm::BM::_copy_ </td> |
---|
[270] | 195 | <td>(</td> |
---|
[591] | 196 | <td class="paramname"></td> |
---|
[270] | 197 | <td> ) </td> |
---|
[287] | 198 | <td> const<code> [inline, virtual]</code></td> |
---|
[270] | 199 | </tr> |
---|
| 200 | </table> |
---|
| 201 | </div> |
---|
| 202 | <div class="memdoc"> |
---|
[591] | 203 | <p>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: </p> |
---|
| 204 | <div class="fragment"><pre class="fragment"> BM* <a class="code" href="classbdm_1_1BM.html#a40f01563651c1e4fe926189e41a6b8ab">_copy_</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <span class="keyword">new</span> BM(*<span class="keyword">this</span>);} |
---|
[270] | 205 | </pre></div> |
---|
[591] | 206 | <p>Reimplemented in <a class="el" href="classbdm_1_1ARX.html#aca0b54c0997cfd567f49377af5def106">bdm::ARX</a>, <a class="el" href="classbdm_1_1KalmanCh.html#a24ce65bdaa538d4d5153d709a929b996">bdm::KalmanCh</a>, <a class="el" href="classbdm_1_1EKFCh.html#a1d1d91400e3f177de9fe7962ea17adc4">bdm::EKFCh</a>, and <a class="el" href="classbdm_1_1BMEF.html#a62d2e4691bed41a1efa6b9c2e35e5c67">bdm::BMEF</a>.</p> |
---|
[270] | 207 | |
---|
| 208 | </div> |
---|
[591] | 209 | </div> |
---|
| 210 | <a class="anchor" id="a60b1779a577367c369a932cabd3a6188"></a><!-- doxytag: member="bdm::BM::bayes" ref="a60b1779a577367c369a932cabd3a6188" args="(const vec &dt)=0" --> |
---|
[259] | 211 | <div class="memitem"> |
---|
| 212 | <div class="memproto"> |
---|
| 213 | <table class="memname"> |
---|
| 214 | <tr> |
---|
[591] | 215 | <td class="memname">virtual void bdm::BM::bayes </td> |
---|
[259] | 216 | <td>(</td> |
---|
| 217 | <td class="paramtype">const vec & </td> |
---|
[591] | 218 | <td class="paramname"> <em>dt</em></td> |
---|
[259] | 219 | <td> ) </td> |
---|
| 220 | <td><code> [pure virtual]</code></td> |
---|
| 221 | </tr> |
---|
| 222 | </table> |
---|
| 223 | </div> |
---|
| 224 | <div class="memdoc"> |
---|
| 225 | |
---|
[591] | 226 | <p>Incremental Bayes rule. </p> |
---|
| 227 | <dl><dt><b>Parameters:</b></dt><dd> |
---|
[259] | 228 | <table border="0" cellspacing="2" cellpadding="0"> |
---|
| 229 | <tr><td valign="top"></td><td valign="top"><em>dt</em> </td><td>vector of input data </td></tr> |
---|
| 230 | </table> |
---|
[591] | 231 | </dd> |
---|
[259] | 232 | </dl> |
---|
| 233 | |
---|
[608] | 234 | <p>Implemented in <a class="el" href="classbdm_1_1ARX.html#a8bdf2974052e8ce74eb0d4f3791c58a3">bdm::ARX</a>, <a class="el" href="classbdm_1_1KalmanFull.html#a081924bc97f453f674bb982b7951d053">bdm::KalmanFull</a>, <a class="el" href="classbdm_1_1KalmanCh.html#ab41fe5540548100b08e1684c3be767b6">bdm::KalmanCh</a>, <a class="el" href="classbdm_1_1EKFfull.html#af149ae8e9ce14d9931a7bb2850736699">bdm::EKFfull</a>, <a class="el" href="classbdm_1_1EKFCh.html#a4c8609c37290b158f88a31dae4047225">bdm::EKFCh</a>, <a class="el" href="classbdm_1_1MultiModel.html#aa915deeddb0e94c337d02ebc0abe535e">bdm::MultiModel</a>, <a class="el" href="classbdm_1_1MixEF.html#a5bd7da667da183eed1577f11dff0c1f1">bdm::MixEF</a>, <a class="el" href="classbdm_1_1PF.html#a638946eea22d4964bf9350286bb4efd8">bdm::PF</a>, <a class="el" href="classbdm_1_1MPF.html#a286d040770d08bd7ff416cea617b1b14">bdm::MPF< BM_T ></a>, <a class="el" href="classbdm_1_1mexBM.html#aa99452b52f731f561b01029af18c68f7">bdm::mexBM</a>, <a class="el" href="classbdm_1_1BMEF.html#ac287f4c0c1ea31b91572ec45351838f1">bdm::BMEF</a>, and <a class="el" href="classbdm_1_1multiBM.html#a1e4bf41b61937fd80f34049742e23f95">bdm::multiBM</a>.</p> |
---|
[259] | 235 | |
---|
[608] | 236 | <p>Referenced by <a class="el" href="bdmbase_8cpp_source.html#l00391">bayesB()</a>.</p> |
---|
[259] | 237 | |
---|
| 238 | </div> |
---|
[591] | 239 | </div> |
---|
| 240 | <a class="anchor" id="a50257e0c1e5b5c73153ea6e716ad8ae0"></a><!-- doxytag: member="bdm::BM::logpred" ref="a50257e0c1e5b5c73153ea6e716ad8ae0" args="(const vec &dt) const " --> |
---|
[259] | 241 | <div class="memitem"> |
---|
| 242 | <div class="memproto"> |
---|
| 243 | <table class="memname"> |
---|
| 244 | <tr> |
---|
[591] | 245 | <td class="memname">virtual double bdm::BM::logpred </td> |
---|
[259] | 246 | <td>(</td> |
---|
| 247 | <td class="paramtype">const vec & </td> |
---|
[591] | 248 | <td class="paramname"> <em>dt</em></td> |
---|
[259] | 249 | <td> ) </td> |
---|
| 250 | <td> const<code> [inline, virtual]</code></td> |
---|
| 251 | </tr> |
---|
| 252 | </table> |
---|
| 253 | </div> |
---|
| 254 | <div class="memdoc"> |
---|
[591] | 255 | <p>Evaluates predictive log-likelihood of the given data record I.e. marginal likelihood of the data with the posterior integrated out. </p> |
---|
[259] | 256 | |
---|
[591] | 257 | <p>Reimplemented in <a class="el" href="classbdm_1_1ARX.html#a080a7e531e3aa06694112863b15bc6a4">bdm::ARX</a>, <a class="el" href="classbdm_1_1MixEF.html#ada724da464a75e07521941e430929efa">bdm::MixEF</a>, and <a class="el" href="classbdm_1_1multiBM.html#ae157b607c1e3fa91d42aeea44458e2bf">bdm::multiBM</a>.</p> |
---|
[259] | 258 | |
---|
[591] | 259 | <p>References <a class="el" href="bdmerror_8h_source.html#l00051">bdm_error</a>.</p> |
---|
[259] | 260 | |
---|
[614] | 261 | <p>Referenced by <a class="el" href="bdmbase_8h_source.html#l01093">logpred_m()</a>.</p> |
---|
[590] | 262 | |
---|
[259] | 263 | </div> |
---|
[397] | 264 | </div> |
---|
[591] | 265 | <hr/>The documentation for this class was generated from the following files:<ul> |
---|
| 266 | <li><a class="el" href="bdmbase_8h_source.html">bdmbase.h</a></li> |
---|
| 267 | <li>bdmbase.cpp</li> |
---|
| 268 | </ul> |
---|
| 269 | </div> |
---|
[614] | 270 | <hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 13 22:40:42 2009 for mixpp by |
---|
[259] | 271 | <a href="http://www.doxygen.org/index.html"> |
---|
[591] | 272 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address> |
---|
[259] | 273 | </body> |
---|
| 274 | </html> |
---|