[171] | 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: BMEF Class Reference</title> |
---|
| 4 | <link href="doxygen.css" rel="stylesheet" type="text/css"> |
---|
| 5 | <link href="tabs.css" rel="stylesheet" type="text/css"> |
---|
| 6 | </head><body> |
---|
| 7 | <!-- Generated by Doxygen 1.5.6 --> |
---|
| 8 | <div class="navigation" id="top"> |
---|
| 9 | <div class="tabs"> |
---|
| 10 | <ul> |
---|
| 11 | <li><a href="index.html"><span>Main Page</span></a></li> |
---|
| 12 | <li><a href="pages.html"><span>Related Pages</span></a></li> |
---|
[219] | 13 | <li><a href="modules.html"><span>Modules</span></a></li> |
---|
[171] | 14 | <li class="current"><a href="annotated.html"><span>Classes</span></a></li> |
---|
| 15 | <li><a href="files.html"><span>Files</span></a></li> |
---|
| 16 | </ul> |
---|
| 17 | </div> |
---|
| 18 | <div class="tabs"> |
---|
| 19 | <ul> |
---|
| 20 | <li><a href="annotated.html"><span>Class List</span></a></li> |
---|
| 21 | <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> |
---|
| 22 | <li><a href="functions.html"><span>Class Members</span></a></li> |
---|
| 23 | </ul> |
---|
| 24 | </div> |
---|
| 25 | </div> |
---|
| 26 | <div class="contents"> |
---|
| 27 | <h1>BMEF Class Reference</h1><!-- doxytag: class="BMEF" --><!-- doxytag: inherits="BM" -->Estimator for Exponential family. |
---|
| 28 | <a href="#_details">More...</a> |
---|
| 29 | <p> |
---|
| 30 | <code>#include <<a class="el" href="libEF_8h-source.html">libEF.h</a>></code> |
---|
| 31 | <p> |
---|
| 32 | <div class="dynheader"> |
---|
| 33 | Inheritance diagram for BMEF:</div> |
---|
| 34 | <div class="dynsection"> |
---|
| 35 | <p><center><img src="classBMEF__inherit__graph.png" border="0" usemap="#BMEF__inherit__map" alt="Inheritance graph"></center> |
---|
| 36 | <map name="BMEF__inherit__map"> |
---|
[210] | 37 | <area shape="rect" href="classARX.html" title="Linear Autoregressive model with Gaussian noise." alt="" coords="5,161,51,188"><area shape="rect" href="classMixEF.html" title="Mixture of Exponential Family Densities." alt="" coords="75,161,131,188"><area shape="rect" href="classmultiBM.html" title="Estimator for Multinomial density." alt="" coords="155,161,227,188"><area shape="rect" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities." alt="" coords="83,7,123,33"></map> |
---|
[171] | 38 | <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> |
---|
| 39 | <div class="dynheader"> |
---|
| 40 | Collaboration diagram for BMEF:</div> |
---|
| 41 | <div class="dynsection"> |
---|
| 42 | <p><center><img src="classBMEF__coll__graph.png" border="0" usemap="#BMEF__coll__map" alt="Collaboration graph"></center> |
---|
| 43 | <map name="BMEF__coll__map"> |
---|
| 44 | <area shape="rect" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities." alt="" coords="13,103,53,129"><area shape="rect" href="classRV.html" title="Class representing variables, most often random variables." alt="" coords="15,7,52,33"></map> |
---|
| 45 | <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> |
---|
| 46 | |
---|
| 47 | <p> |
---|
| 48 | <a href="classBMEF-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> |
---|
| 49 | <tr><td></td></tr> |
---|
| 50 | <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> |
---|
| 51 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="46ac5c919ae647f3a6a38d9faba35f5d"></a><!-- doxytag: member="BMEF::BMEF" ref="46ac5c919ae647f3a6a38d9faba35f5d" args="(const RV &rv, double frg0=1.0)" --> |
---|
| 52 | </td><td class="memItemRight" valign="bottom"><a class="el" href="classBMEF.html#46ac5c919ae647f3a6a38d9faba35f5d">BMEF</a> (const <a class="el" href="classRV.html">RV</a> &<a class="el" href="classBM.html#af00f0612fabe66241dd507188cdbf88">rv</a>, double frg0=1.0)</td></tr> |
---|
| 53 | |
---|
| 54 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <br></td></tr> |
---|
| 55 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3dc6277cafbdc6cbc2db860ff219b33e"></a><!-- doxytag: member="BMEF::BMEF" ref="3dc6277cafbdc6cbc2db860ff219b33e" args="(const BMEF &B)" --> |
---|
| 56 | </td><td class="memItemRight" valign="bottom"><a class="el" href="classBMEF.html#3dc6277cafbdc6cbc2db860ff219b33e">BMEF</a> (const <a class="el" href="classBMEF.html">BMEF</a> &B)</td></tr> |
---|
| 57 | |
---|
| 58 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Copy constructor. <br></td></tr> |
---|
| 59 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="30bb40eb1fd31869b2e62e79e1ecdcb4"></a><!-- doxytag: member="BMEF::set_statistics" ref="30bb40eb1fd31869b2e62e79e1ecdcb4" args="(const BMEF *BM0)" --> |
---|
| 60 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classBMEF.html#30bb40eb1fd31869b2e62e79e1ecdcb4">set_statistics</a> (const <a class="el" href="classBMEF.html">BMEF</a> *BM0)</td></tr> |
---|
| 61 | |
---|
| 62 | <tr><td class="mdescLeft"> </td><td class="mdescRight">get statistics from another model <br></td></tr> |
---|
| 63 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8f4ecb6e2eaf630155a1fa98f35aa6ad"></a><!-- doxytag: member="BMEF::bayes" ref="8f4ecb6e2eaf630155a1fa98f35aa6ad" args="(const vec &data, const double w)" --> |
---|
| 64 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classBMEF.html#8f4ecb6e2eaf630155a1fa98f35aa6ad">bayes</a> (const vec &data, const double w)</td></tr> |
---|
| 65 | |
---|
| 66 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Weighted update of sufficient statistics (Bayes rule). <br></td></tr> |
---|
| 67 | <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classBMEF.html#52b7719312d545215cca1ff87722a35a">bayes</a> (const vec &dt)</td></tr> |
---|
| 68 | |
---|
| 69 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Incremental Bayes rule. <a href="#52b7719312d545215cca1ff87722a35a"></a><br></td></tr> |
---|
[181] | 70 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b3689f3ade328d157aa813384a5b153a"></a><!-- doxytag: member="BMEF::flatten" ref="b3689f3ade328d157aa813384a5b153a" args="(const BMEF *B)" --> |
---|
| 71 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classBMEF.html#b3689f3ade328d157aa813384a5b153a">flatten</a> (const <a class="el" href="classBMEF.html">BMEF</a> *B)</td></tr> |
---|
[171] | 72 | |
---|
[181] | 73 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Flatten the posterior according to the given <a class="el" href="classBMEF.html" title="Estimator for Exponential family.">BMEF</a> (of the same type!). <br></td></tr> |
---|
[210] | 74 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="97f5312efe4a5bedb86d2daec59d8651"></a><!-- doxytag: member="BMEF::_copy_" ref="97f5312efe4a5bedb86d2daec59d8651" args="(bool changerv=false)" --> |
---|
| 75 | <a class="el" href="classBMEF.html">BMEF</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classBMEF.html#97f5312efe4a5bedb86d2daec59d8651">_copy_</a> (bool changerv=false)</td></tr> |
---|
[181] | 76 | |
---|
| 77 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Flatten the posterior as if to keep nu0 data. <br></td></tr> |
---|
[171] | 78 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0186270f75189677f390fe088a9947e9"></a><!-- doxytag: member="BMEF::bayesB" ref="0186270f75189677f390fe088a9947e9" args="(const mat &Dt)" --> |
---|
| 79 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#0186270f75189677f390fe088a9947e9">bayesB</a> (const mat &Dt)</td></tr> |
---|
| 80 | |
---|
| 81 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Batch Bayes rule (columns of Dt are observations). <br></td></tr> |
---|
| 82 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8554809fec160bee279bcd5fa14ead5c"></a><!-- doxytag: member="BMEF::_epdf" ref="8554809fec160bee279bcd5fa14ead5c" args="() const =0" --> |
---|
| 83 | 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> |
---|
| 84 | |
---|
[210] | 85 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns a reference 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. <br></td></tr> |
---|
| 86 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="db500c4836f883c175a3cf3ab5a3ce24"></a><!-- doxytag: member="BMEF::_e" ref="db500c4836f883c175a3cf3ab5a3ce24" args="() const =0" --> |
---|
| 87 | virtual const <a class="el" href="classepdf.html">epdf</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#db500c4836f883c175a3cf3ab5a3ce24">_e</a> () const =0</td></tr> |
---|
| 88 | |
---|
[171] | 89 | <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> |
---|
| 90 | <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> |
---|
| 91 | |
---|
[180] | 92 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="cd0660f2a1a344b56ac39802708ff165"></a><!-- doxytag: member="BMEF::logpred_m" ref="cd0660f2a1a344b56ac39802708ff165" args="(const mat &dt) const " --> |
---|
| 93 | vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#cd0660f2a1a344b56ac39802708ff165">logpred_m</a> (const mat &dt) const </td></tr> |
---|
| 94 | |
---|
| 95 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Matrix version of logpred. <br></td></tr> |
---|
[210] | 96 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5594d68ee9aa6fc8c1e79019da5c9d56"></a><!-- doxytag: member="BMEF::predictor" ref="5594d68ee9aa6fc8c1e79019da5c9d56" args="(const RV &rv) const " --> |
---|
| 97 | virtual <a class="el" href="classepdf.html">epdf</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#5594d68ee9aa6fc8c1e79019da5c9d56">predictor</a> (const <a class="el" href="classRV.html">RV</a> &<a class="el" href="classBM.html#af00f0612fabe66241dd507188cdbf88">rv</a>) const </td></tr> |
---|
[180] | 98 | |
---|
| 99 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Constructs a predictive density (marginal density on data). <br></td></tr> |
---|
[171] | 100 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="126bd2595c48e311fc2a7ab72876092a"></a><!-- doxytag: member="BMEF::_rv" ref="126bd2595c48e311fc2a7ab72876092a" args="() const " --> |
---|
| 101 | 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> |
---|
| 102 | |
---|
| 103 | <tr><td class="mdescLeft"> </td><td class="mdescRight">access function <br></td></tr> |
---|
| 104 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="87f4a547d2c29180be88175e5eab9c88"></a><!-- doxytag: member="BMEF::_ll" ref="87f4a547d2c29180be88175e5eab9c88" args="() const " --> |
---|
| 105 | double </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#87f4a547d2c29180be88175e5eab9c88">_ll</a> () const </td></tr> |
---|
| 106 | |
---|
| 107 | <tr><td class="mdescLeft"> </td><td class="mdescRight">access function <br></td></tr> |
---|
| 108 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1ffa9f23669aabecc3760c06c6987522"></a><!-- doxytag: member="BMEF::set_evalll" ref="1ffa9f23669aabecc3760c06c6987522" args="(bool evl0)" --> |
---|
| 109 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#1ffa9f23669aabecc3760c06c6987522">set_evalll</a> (bool evl0)</td></tr> |
---|
| 110 | |
---|
| 111 | <tr><td class="mdescLeft"> </td><td class="mdescRight">access function <br></td></tr> |
---|
| 112 | <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> |
---|
| 113 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="538d632e59f9afa8daa1de74da12ce71"></a><!-- doxytag: member="BMEF::frg" ref="538d632e59f9afa8daa1de74da12ce71" args="" --> |
---|
| 114 | double </td><td class="memItemRight" valign="bottom"><a class="el" href="classBMEF.html#538d632e59f9afa8daa1de74da12ce71">frg</a></td></tr> |
---|
| 115 | |
---|
| 116 | <tr><td class="mdescLeft"> </td><td class="mdescRight">forgetting factor <br></td></tr> |
---|
| 117 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="308cf5d4133cd471fdf1ecd5dfa09d02"></a><!-- doxytag: member="BMEF::last_lognc" ref="308cf5d4133cd471fdf1ecd5dfa09d02" args="" --> |
---|
| 118 | double </td><td class="memItemRight" valign="bottom"><a class="el" href="classBMEF.html#308cf5d4133cd471fdf1ecd5dfa09d02">last_lognc</a></td></tr> |
---|
| 119 | |
---|
| 120 | <tr><td class="mdescLeft"> </td><td class="mdescRight">cached value of lognc() in the previous step (used in evaluation of <code>ll</code> ) <br></td></tr> |
---|
| 121 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="af00f0612fabe66241dd507188cdbf88"></a><!-- doxytag: member="BMEF::rv" ref="af00f0612fabe66241dd507188cdbf88" args="" --> |
---|
| 122 | <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> |
---|
| 123 | |
---|
| 124 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Random variable of the posterior. <br></td></tr> |
---|
| 125 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5623fef6572a08c2b53b8c87b82dc979"></a><!-- doxytag: member="BMEF::ll" ref="5623fef6572a08c2b53b8c87b82dc979" args="" --> |
---|
| 126 | double </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979">ll</a></td></tr> |
---|
| 127 | |
---|
| 128 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Logarithm of marginalized data likelihood. <br></td></tr> |
---|
| 129 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bf6fb59b30141074f8ee1e2f43d03129"></a><!-- doxytag: member="BMEF::evalll" ref="bf6fb59b30141074f8ee1e2f43d03129" args="" --> |
---|
| 130 | bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129">evalll</a></td></tr> |
---|
| 131 | |
---|
| 132 | <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> |
---|
| 133 | </table> |
---|
| 134 | <hr><a name="_details"></a><h2>Detailed Description</h2> |
---|
| 135 | Estimator for Exponential family. <hr><h2>Member Function Documentation</h2> |
---|
| 136 | <a class="anchor" name="52b7719312d545215cca1ff87722a35a"></a><!-- doxytag: member="BMEF::bayes" ref="52b7719312d545215cca1ff87722a35a" args="(const vec &dt)" --> |
---|
| 137 | <div class="memitem"> |
---|
| 138 | <div class="memproto"> |
---|
| 139 | <table class="memname"> |
---|
| 140 | <tr> |
---|
| 141 | <td class="memname">void BMEF::bayes </td> |
---|
| 142 | <td>(</td> |
---|
| 143 | <td class="paramtype">const vec & </td> |
---|
| 144 | <td class="paramname"> <em>dt</em> </td> |
---|
| 145 | <td> ) </td> |
---|
| 146 | <td><code> [virtual]</code></td> |
---|
| 147 | </tr> |
---|
| 148 | </table> |
---|
| 149 | </div> |
---|
| 150 | <div class="memdoc"> |
---|
| 151 | |
---|
| 152 | <p> |
---|
| 153 | Incremental Bayes rule. |
---|
| 154 | <p> |
---|
| 155 | <dl compact><dt><b>Parameters:</b></dt><dd> |
---|
| 156 | <table border="0" cellspacing="2" cellpadding="0"> |
---|
| 157 | <tr><td valign="top"></td><td valign="top"><em>dt</em> </td><td>vector of input data </td></tr> |
---|
| 158 | </table> |
---|
| 159 | </dl> |
---|
| 160 | |
---|
| 161 | <p>Implements <a class="el" href="classBM.html#a892eff438aab2dd1a9e2efcb7fb5bdf">BM</a>.</p> |
---|
| 162 | |
---|
[210] | 163 | <p>Reimplemented in <a class="el" href="classARX.html#ba82c956ca893826811aefe1e4af465d">ARX</a>, <a class="el" href="classMixEF.html#d520fb534aa43f3084ff1568ffe7573d">MixEF</a>, and <a class="el" href="classmultiBM.html#11eeba7e97954e316e959116f90d80e2">multiBM</a>.</p> |
---|
[171] | 164 | |
---|
| 165 | <p>References <a class="el" href="libEF_8h-source.html#l00089">bayes()</a>.</p> |
---|
| 166 | |
---|
| 167 | </div> |
---|
| 168 | </div><p> |
---|
| 169 | <a class="anchor" name="8a8ce6df431689964c41cc6c849cfd06"></a><!-- doxytag: member="BMEF::logpred" ref="8a8ce6df431689964c41cc6c849cfd06" args="(const vec &dt) const " --> |
---|
| 170 | <div class="memitem"> |
---|
| 171 | <div class="memproto"> |
---|
| 172 | <table class="memname"> |
---|
| 173 | <tr> |
---|
| 174 | <td class="memname">virtual double BM::logpred </td> |
---|
| 175 | <td>(</td> |
---|
| 176 | <td class="paramtype">const vec & </td> |
---|
| 177 | <td class="paramname"> <em>dt</em> </td> |
---|
| 178 | <td> ) </td> |
---|
| 179 | <td> const<code> [inline, virtual, inherited]</code></td> |
---|
| 180 | </tr> |
---|
| 181 | </table> |
---|
| 182 | </div> |
---|
| 183 | <div class="memdoc"> |
---|
| 184 | |
---|
| 185 | <p> |
---|
| 186 | Evaluates predictive log-likelihood of the given data record I.e. marginal likelihood of the data with the posterior integrated out. |
---|
| 187 | <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> |
---|
| 188 | |
---|
[224] | 189 | <p>Referenced by <a class="el" href="libBM_8h-source.html#l00439">BM::logpred_m()</a>.</p> |
---|
[180] | 190 | |
---|
[171] | 191 | </div> |
---|
| 192 | </div><p> |
---|
| 193 | <hr>The documentation for this class was generated from the following files:<ul> |
---|
| 194 | <li>work/git/mixpp/bdm/stat/<a class="el" href="libEF_8h-source.html">libEF.h</a><li>work/git/mixpp/bdm/stat/libEF.cpp</ul> |
---|
| 195 | </div> |
---|
[224] | 196 | <hr size="1"><address style="text-align: right;"><small>Generated on Mon Jan 5 19:29:14 2009 for mixpp by |
---|
[171] | 197 | <a href="http://www.doxygen.org/index.html"> |
---|
| 198 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address> |
---|
| 199 | </body> |
---|
| 200 | </html> |
---|