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