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::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><a href="modules.html"><span>Modules</span></a></li> |
---|
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 class="navpath"><b>bdm</b>::<a class="el" href="classbdm_1_1BMEF.html">BMEF</a> |
---|
26 | </div> |
---|
27 | </div> |
---|
28 | <div class="contents"> |
---|
29 | <h1>bdm::BMEF Class Reference</h1><!-- doxytag: class="bdm::BMEF" --><!-- doxytag: inherits="bdm::BM" -->Estimator for Exponential family. |
---|
30 | <a href="#_details">More...</a> |
---|
31 | <p> |
---|
32 | <code>#include <<a class="el" href="libEF_8h-source.html">libEF.h</a>></code> |
---|
33 | <p> |
---|
34 | <div class="dynheader"> |
---|
35 | Inheritance diagram for bdm::BMEF:</div> |
---|
36 | <div class="dynsection"> |
---|
37 | <p><center><img src="classbdm_1_1BMEF__inherit__graph.png" border="0" usemap="#bdm_1_1BMEF__inherit__map" alt="Inheritance graph"></center> |
---|
38 | <map name="bdm_1_1BMEF__inherit__map"> |
---|
39 | <area shape="rect" href="classbdm_1_1ARX.html" title="Linear Autoregressive model with Gaussian noise." alt="" coords="5,161,88,188"><area shape="rect" href="classbdm_1_1MixEF.html" title="Mixture of Exponential Family Densities." alt="" coords="112,161,205,188"><area shape="rect" href="classbdm_1_1multiBM.html" title="Estimator for Multinomial density." alt="" coords="229,161,339,188"><area shape="rect" href="classbdm_1_1BM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities." alt="" coords="120,7,197,33"></map> |
---|
40 | <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> |
---|
41 | <div class="dynheader"> |
---|
42 | Collaboration diagram for bdm::BMEF:</div> |
---|
43 | <div class="dynsection"> |
---|
44 | <p><center><img src="classbdm_1_1BMEF__coll__graph.png" border="0" usemap="#bdm_1_1BMEF__coll__map" alt="Collaboration graph"></center> |
---|
45 | <map name="bdm_1_1BMEF__coll__map"> |
---|
46 | <area shape="rect" href="classbdm_1_1BM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities." alt="" coords="13,183,91,209"><area shape="rect" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables." alt="" coords="15,87,89,113"><area shape="rect" href="classbdm_1_1base.html" title="Root class of BDM objects." alt="" coords="8,7,96,33"></map> |
---|
47 | <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> |
---|
48 | |
---|
49 | <p> |
---|
50 | <a href="classbdm_1_1BMEF-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> |
---|
51 | <tr><td></td></tr> |
---|
52 | <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> |
---|
53 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="73bccd1d8142d4d330e35637ca30decc"></a><!-- doxytag: member="bdm::BMEF::BMEF" ref="73bccd1d8142d4d330e35637ca30decc" args="(const RV &rv, double frg0=1.0)" --> |
---|
54 | </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BMEF.html#73bccd1d8142d4d330e35637ca30decc">BMEF</a> (const <a class="el" href="classbdm_1_1RV.html">RV</a> &<a class="el" href="classbdm_1_1BM.html#18d6db4af8ee42077741d9e3618153ca">rv</a>, double frg0=1.0)</td></tr> |
---|
55 | |
---|
56 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <br></td></tr> |
---|
57 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9662379513101405e159e76717104e62"></a><!-- doxytag: member="bdm::BMEF::BMEF" ref="9662379513101405e159e76717104e62" args="(const BMEF &B)" --> |
---|
58 | </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BMEF.html#9662379513101405e159e76717104e62">BMEF</a> (const <a class="el" href="classbdm_1_1BMEF.html">BMEF</a> &B)</td></tr> |
---|
59 | |
---|
60 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Copy constructor. <br></td></tr> |
---|
61 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d2b528b7a41ca67163152142f5404051"></a><!-- doxytag: member="bdm::BMEF::set_statistics" ref="d2b528b7a41ca67163152142f5404051" args="(const BMEF *BM0)" --> |
---|
62 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BMEF.html#d2b528b7a41ca67163152142f5404051">set_statistics</a> (const <a class="el" href="classbdm_1_1BMEF.html">BMEF</a> *BM0)</td></tr> |
---|
63 | |
---|
64 | <tr><td class="mdescLeft"> </td><td class="mdescRight">get statistics from another model <br></td></tr> |
---|
65 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bf58deb99af2a6cc674f13ff90300de6"></a><!-- doxytag: member="bdm::BMEF::bayes" ref="bf58deb99af2a6cc674f13ff90300de6" args="(const vec &data, const double w)" --> |
---|
66 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BMEF.html#bf58deb99af2a6cc674f13ff90300de6">bayes</a> (const vec &data, const double w)</td></tr> |
---|
67 | |
---|
68 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Weighted update of sufficient statistics (Bayes rule). <br></td></tr> |
---|
69 | <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BMEF.html#c287f4c0c1ea31b91572ec45351838f1">bayes</a> (const vec &dt)</td></tr> |
---|
70 | |
---|
71 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Incremental Bayes rule. <a href="#c287f4c0c1ea31b91572ec45351838f1"></a><br></td></tr> |
---|
72 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b2916a2e71a958665054473124d5e749"></a><!-- doxytag: member="bdm::BMEF::flatten" ref="b2916a2e71a958665054473124d5e749" args="(const BMEF *B)" --> |
---|
73 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BMEF.html#b2916a2e71a958665054473124d5e749">flatten</a> (const <a class="el" href="classbdm_1_1BMEF.html">BMEF</a> *B)</td></tr> |
---|
74 | |
---|
75 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Flatten the posterior according to the given <a class="el" href="classbdm_1_1BMEF.html" title="Estimator for Exponential family.">BMEF</a> (of the same type!). <br></td></tr> |
---|
76 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5912dbcf28ae711e30b08c2fa766a3e6"></a><!-- doxytag: member="bdm::BMEF::_copy_" ref="5912dbcf28ae711e30b08c2fa766a3e6" args="(bool changerv=false)" --> |
---|
77 | <a class="el" href="classbdm_1_1BMEF.html">BMEF</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BMEF.html#5912dbcf28ae711e30b08c2fa766a3e6">_copy_</a> (bool changerv=false)</td></tr> |
---|
78 | |
---|
79 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Flatten the posterior as if to keep nu0 data. <br></td></tr> |
---|
80 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1dee3fddaf021e62d925289660a707dc"></a><!-- doxytag: member="bdm::BMEF::bayesB" ref="1dee3fddaf021e62d925289660a707dc" args="(const mat &Dt)" --> |
---|
81 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#1dee3fddaf021e62d925289660a707dc">bayesB</a> (const mat &Dt)</td></tr> |
---|
82 | |
---|
83 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Batch Bayes rule (columns of Dt are observations). <br></td></tr> |
---|
84 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="963258c4c2dd05be001003b19aceefef"></a><!-- doxytag: member="bdm::BMEF::_epdf" ref="963258c4c2dd05be001003b19aceefef" args="() const =0" --> |
---|
85 | virtual const <a class="el" href="classbdm_1_1epdf.html">epdf</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#963258c4c2dd05be001003b19aceefef">_epdf</a> () const =0</td></tr> |
---|
86 | |
---|
87 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns a reference to the <a class="el" href="classbdm_1_1epdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> representing posterior density on parameters. <br></td></tr> |
---|
88 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4ed0f8b880e606316ae800f3a011c3a6"></a><!-- doxytag: member="bdm::BMEF::_e" ref="4ed0f8b880e606316ae800f3a011c3a6" args="() const =0" --> |
---|
89 | virtual const <a class="el" href="classbdm_1_1epdf.html">epdf</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#4ed0f8b880e606316ae800f3a011c3a6">_e</a> () const =0</td></tr> |
---|
90 | |
---|
91 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns a pointer to the <a class="el" href="classbdm_1_1epdf.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> |
---|
92 | <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> |
---|
93 | |
---|
94 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0e8ebe61fb14990abe1254bd3dda5fae"></a><!-- doxytag: member="bdm::BMEF::logpred_m" ref="0e8ebe61fb14990abe1254bd3dda5fae" args="(const mat &dt) const " --> |
---|
95 | 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> |
---|
96 | |
---|
97 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Matrix version of logpred. <br></td></tr> |
---|
98 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="710e7d69c0d8791fb41a7cd4683cca2c"></a><!-- doxytag: member="bdm::BMEF::predictor" ref="710e7d69c0d8791fb41a7cd4683cca2c" args="(const RV &rv) const " --> |
---|
99 | 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#710e7d69c0d8791fb41a7cd4683cca2c">predictor</a> (const <a class="el" href="classbdm_1_1RV.html">RV</a> &<a class="el" href="classbdm_1_1BM.html#18d6db4af8ee42077741d9e3618153ca">rv</a>) const </td></tr> |
---|
100 | |
---|
101 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Constructs a predictive density (marginal density on data). <br></td></tr> |
---|
102 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="40a3c891996391e3135518053a917793"></a><!-- doxytag: member="bdm::BMEF::_rv" ref="40a3c891996391e3135518053a917793" args="() const " --> |
---|
103 | 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#40a3c891996391e3135518053a917793">_rv</a> () const </td></tr> |
---|
104 | |
---|
105 | <tr><td class="mdescLeft"> </td><td class="mdescRight">access function <br></td></tr> |
---|
106 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5be65d37dedfe33a3671e7065f523a70"></a><!-- doxytag: member="bdm::BMEF::_ll" ref="5be65d37dedfe33a3671e7065f523a70" args="() const " --> |
---|
107 | double </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#5be65d37dedfe33a3671e7065f523a70">_ll</a> () const </td></tr> |
---|
108 | |
---|
109 | <tr><td class="mdescLeft"> </td><td class="mdescRight">access function <br></td></tr> |
---|
110 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="236b3abbcc93594fc97cd86d82c1a83f"></a><!-- doxytag: member="bdm::BMEF::set_evalll" ref="236b3abbcc93594fc97cd86d82c1a83f" args="(bool evl0)" --> |
---|
111 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#236b3abbcc93594fc97cd86d82c1a83f">set_evalll</a> (bool evl0)</td></tr> |
---|
112 | |
---|
113 | <tr><td class="mdescLeft"> </td><td class="mdescRight">access function <br></td></tr> |
---|
114 | <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> |
---|
115 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1331865e10fb1ccef65bb4c47fa3be64"></a><!-- doxytag: member="bdm::BMEF::frg" ref="1331865e10fb1ccef65bb4c47fa3be64" args="" --> |
---|
116 | double </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BMEF.html#1331865e10fb1ccef65bb4c47fa3be64">frg</a></td></tr> |
---|
117 | |
---|
118 | <tr><td class="mdescLeft"> </td><td class="mdescRight">forgetting factor <br></td></tr> |
---|
119 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="06e7b3ac03e10017d4288c76888e2865"></a><!-- doxytag: member="bdm::BMEF::last_lognc" ref="06e7b3ac03e10017d4288c76888e2865" args="" --> |
---|
120 | double </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BMEF.html#06e7b3ac03e10017d4288c76888e2865">last_lognc</a></td></tr> |
---|
121 | |
---|
122 | <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> |
---|
123 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="18d6db4af8ee42077741d9e3618153ca"></a><!-- doxytag: member="bdm::BMEF::rv" ref="18d6db4af8ee42077741d9e3618153ca" args="" --> |
---|
124 | <a class="el" href="classbdm_1_1RV.html">RV</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#18d6db4af8ee42077741d9e3618153ca">rv</a></td></tr> |
---|
125 | |
---|
126 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Random variable of the posterior. <br></td></tr> |
---|
127 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4064b6559d962633e4372b12f4cd204a"></a><!-- doxytag: member="bdm::BMEF::ll" ref="4064b6559d962633e4372b12f4cd204a" args="" --> |
---|
128 | double </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#4064b6559d962633e4372b12f4cd204a">ll</a></td></tr> |
---|
129 | |
---|
130 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Logarithm of marginalized data likelihood. <br></td></tr> |
---|
131 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="faff0ad12556fe7dc0e2807d4fd938ee"></a><!-- doxytag: member="bdm::BMEF::evalll" ref="faff0ad12556fe7dc0e2807d4fd938ee" args="" --> |
---|
132 | bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#faff0ad12556fe7dc0e2807d4fd938ee">evalll</a></td></tr> |
---|
133 | |
---|
134 | <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> |
---|
135 | </table> |
---|
136 | <hr><a name="_details"></a><h2>Detailed Description</h2> |
---|
137 | Estimator for Exponential family. <hr><h2>Member Function Documentation</h2> |
---|
138 | <a class="anchor" name="c287f4c0c1ea31b91572ec45351838f1"></a><!-- doxytag: member="bdm::BMEF::bayes" ref="c287f4c0c1ea31b91572ec45351838f1" args="(const vec &dt)" --> |
---|
139 | <div class="memitem"> |
---|
140 | <div class="memproto"> |
---|
141 | <table class="memname"> |
---|
142 | <tr> |
---|
143 | <td class="memname">void bdm::BMEF::bayes </td> |
---|
144 | <td>(</td> |
---|
145 | <td class="paramtype">const vec & </td> |
---|
146 | <td class="paramname"> <em>dt</em> </td> |
---|
147 | <td> ) </td> |
---|
148 | <td><code> [virtual]</code></td> |
---|
149 | </tr> |
---|
150 | </table> |
---|
151 | </div> |
---|
152 | <div class="memdoc"> |
---|
153 | |
---|
154 | <p> |
---|
155 | Incremental Bayes rule. |
---|
156 | <p> |
---|
157 | <dl compact><dt><b>Parameters:</b></dt><dd> |
---|
158 | <table border="0" cellspacing="2" cellpadding="0"> |
---|
159 | <tr><td valign="top"></td><td valign="top"><em>dt</em> </td><td>vector of input data </td></tr> |
---|
160 | </table> |
---|
161 | </dl> |
---|
162 | |
---|
163 | <p>Implements <a class="el" href="classbdm_1_1BM.html#60b1779a577367c369a932cabd3a6188">bdm::BM</a>.</p> |
---|
164 | |
---|
165 | <p>Reimplemented in <a class="el" href="classbdm_1_1ARX.html#8bdf2974052e8ce74eb0d4f3791c58a3">bdm::ARX</a>, <a class="el" href="classbdm_1_1MixEF.html#5bd7da667da183eed1577f11dff0c1f1">bdm::MixEF</a>, and <a class="el" href="classbdm_1_1multiBM.html#1e4bf41b61937fd80f34049742e23f95">bdm::multiBM</a>.</p> |
---|
166 | |
---|
167 | <p>References <a class="el" href="libEF_8h-source.html#l00089">bayes()</a>.</p> |
---|
168 | |
---|
169 | </div> |
---|
170 | </div><p> |
---|
171 | <a class="anchor" name="50257e0c1e5b5c73153ea6e716ad8ae0"></a><!-- doxytag: member="bdm::BMEF::logpred" ref="50257e0c1e5b5c73153ea6e716ad8ae0" args="(const vec &dt) const " --> |
---|
172 | <div class="memitem"> |
---|
173 | <div class="memproto"> |
---|
174 | <table class="memname"> |
---|
175 | <tr> |
---|
176 | <td class="memname">virtual double bdm::BM::logpred </td> |
---|
177 | <td>(</td> |
---|
178 | <td class="paramtype">const vec & </td> |
---|
179 | <td class="paramname"> <em>dt</em> </td> |
---|
180 | <td> ) </td> |
---|
181 | <td> const<code> [inline, virtual, inherited]</code></td> |
---|
182 | </tr> |
---|
183 | </table> |
---|
184 | </div> |
---|
185 | <div class="memdoc"> |
---|
186 | |
---|
187 | <p> |
---|
188 | Evaluates predictive log-likelihood of the given data record I.e. marginal likelihood of the data with the posterior integrated out. |
---|
189 | <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> |
---|
190 | |
---|
191 | <p>Referenced by <a class="el" href="libBM_8h-source.html#l00447">bdm::BM::logpred_m()</a>.</p> |
---|
192 | |
---|
193 | </div> |
---|
194 | </div><p> |
---|
195 | <hr>The documentation for this class was generated from the following files:<ul> |
---|
196 | <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> |
---|
197 | </div> |
---|
198 | <hr size="1"><address style="text-align: right;"><small>Generated on Tue Jan 27 16:31:31 2009 for mixpp by |
---|
199 | <a href="http://www.doxygen.org/index.html"> |
---|
200 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address> |
---|
201 | </body> |
---|
202 | </html> |
---|