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: multiBM 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>multiBM Class Reference</h1><!-- doxytag: class="multiBM" --><!-- doxytag: inherits="BMEF" -->Estimator for Multinomial density. |
---|
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 multiBM:</div> |
---|
33 | <div class="dynsection"> |
---|
34 | <p><center><img src="classmultiBM__inherit__graph.png" border="0" usemap="#multiBM__inherit__map" alt="Inheritance graph"></center> |
---|
35 | <map name="multiBM__inherit__map"> |
---|
36 | <area shape="rect" href="classBMEF.html" title="Estimator for Exponential family." alt="" coords="13,84,69,111"><area shape="rect" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities." alt="" coords="21,7,61,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 multiBM:</div> |
---|
40 | <div class="dynsection"> |
---|
41 | <p><center><img src="classmultiBM__coll__graph.png" border="0" usemap="#multiBM__coll__map" alt="Collaboration graph"></center> |
---|
42 | <map name="multiBM__coll__map"> |
---|
43 | <area shape="rect" href="classBMEF.html" title="Estimator for Exponential family." alt="" coords="5,263,61,289"><area shape="rect" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities." alt="" coords="15,156,55,183"><area shape="rect" href="classRV.html" title="Class representing variables, most often random variables." alt="" coords="41,7,79,33"><area shape="rect" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density." alt="" coords="72,103,120,129"><area shape="rect" href="classeDirich.html" title="Dirichlet posterior density." alt="" coords="67,316,131,343"><area shape="rect" href="classeEF.html" title="General conjugate exponential family posterior density." alt="" coords="75,209,117,236"></map> |
---|
44 | <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> |
---|
45 | |
---|
46 | <p> |
---|
47 | <a href="classmultiBM-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="7d7d7e78c129602bcde96078359dc6e5"></a><!-- doxytag: member="multiBM::multiBM" ref="7d7d7e78c129602bcde96078359dc6e5" args="(const RV &rv, const vec beta0)" --> |
---|
51 | </td><td class="memItemRight" valign="bottom"><a class="el" href="classmultiBM.html#7d7d7e78c129602bcde96078359dc6e5">multiBM</a> (const <a class="el" href="classRV.html">RV</a> &<a class="el" href="classBM.html#af00f0612fabe66241dd507188cdbf88">rv</a>, const vec beta0)</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="b92751adbfb9f259ca8c95232cfd9c09"></a><!-- doxytag: member="multiBM::multiBM" ref="b92751adbfb9f259ca8c95232cfd9c09" args="(const multiBM &B)" --> |
---|
55 | </td><td class="memItemRight" valign="bottom"><a class="el" href="classmultiBM.html#b92751adbfb9f259ca8c95232cfd9c09">multiBM</a> (const <a class="el" href="classmultiBM.html">multiBM</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="42e36804041e551d3ceea6c75abc0562"></a><!-- doxytag: member="multiBM::set_statistics" ref="42e36804041e551d3ceea6c75abc0562" args="(const BM *mB0)" --> |
---|
59 | void </td><td class="memItemRight" valign="bottom"><b>set_statistics</b> (const <a class="el" href="classBM.html">BM</a> *mB0)</td></tr> |
---|
60 | |
---|
61 | <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classmultiBM.html#11eeba7e97954e316e959116f90d80e2">bayes</a> (const vec &dt)</td></tr> |
---|
62 | |
---|
63 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Incremental Bayes rule. <a href="#11eeba7e97954e316e959116f90d80e2"></a><br></td></tr> |
---|
64 | <tr><td class="memItemLeft" nowrap align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="classmultiBM.html#13e26a61757278981fd8cac9a7ef91eb">logpred</a> (const vec &dt) const </td></tr> |
---|
65 | |
---|
66 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="58257073a90aab5d1aafbc9b805d324a"></a><!-- doxytag: member="multiBM::flatten" ref="58257073a90aab5d1aafbc9b805d324a" args="(BMEF *B)" --> |
---|
67 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classmultiBM.html#58257073a90aab5d1aafbc9b805d324a">flatten</a> (<a class="el" href="classBMEF.html">BMEF</a> *B)</td></tr> |
---|
68 | |
---|
69 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Flatten the posterior. <br></td></tr> |
---|
70 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="66cdfd83a70bc281840ab0646b941684"></a><!-- doxytag: member="multiBM::_epdf" ref="66cdfd83a70bc281840ab0646b941684" args="() const " --> |
---|
71 | const <a class="el" href="classepdf.html">epdf</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classmultiBM.html#66cdfd83a70bc281840ab0646b941684">_epdf</a> () const </td></tr> |
---|
72 | |
---|
73 | <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> |
---|
74 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="30bb40eb1fd31869b2e62e79e1ecdcb4"></a><!-- doxytag: member="multiBM::set_statistics" ref="30bb40eb1fd31869b2e62e79e1ecdcb4" args="(const BMEF *BM0)" --> |
---|
75 | 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> |
---|
76 | |
---|
77 | <tr><td class="mdescLeft"> </td><td class="mdescRight">get statistics from another model <br></td></tr> |
---|
78 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8f4ecb6e2eaf630155a1fa98f35aa6ad"></a><!-- doxytag: member="multiBM::bayes" ref="8f4ecb6e2eaf630155a1fa98f35aa6ad" args="(const vec &data, const double w)" --> |
---|
79 | 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> |
---|
80 | |
---|
81 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Weighted update of sufficient statistics (Bayes rule). <br></td></tr> |
---|
82 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0186270f75189677f390fe088a9947e9"></a><!-- doxytag: member="multiBM::bayesB" ref="0186270f75189677f390fe088a9947e9" args="(const mat &Dt)" --> |
---|
83 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#0186270f75189677f390fe088a9947e9">bayesB</a> (const mat &Dt)</td></tr> |
---|
84 | |
---|
85 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Batch Bayes rule (columns of Dt are observations). <br></td></tr> |
---|
86 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="126bd2595c48e311fc2a7ab72876092a"></a><!-- doxytag: member="multiBM::_rv" ref="126bd2595c48e311fc2a7ab72876092a" args="() const " --> |
---|
87 | 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> |
---|
88 | |
---|
89 | <tr><td class="mdescLeft"> </td><td class="mdescRight">access function <br></td></tr> |
---|
90 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="87f4a547d2c29180be88175e5eab9c88"></a><!-- doxytag: member="multiBM::_ll" ref="87f4a547d2c29180be88175e5eab9c88" args="() const " --> |
---|
91 | double </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#87f4a547d2c29180be88175e5eab9c88">_ll</a> () const </td></tr> |
---|
92 | |
---|
93 | <tr><td class="mdescLeft"> </td><td class="mdescRight">access function <br></td></tr> |
---|
94 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1ffa9f23669aabecc3760c06c6987522"></a><!-- doxytag: member="multiBM::set_evalll" ref="1ffa9f23669aabecc3760c06c6987522" args="(bool evl0)" --> |
---|
95 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#1ffa9f23669aabecc3760c06c6987522">set_evalll</a> (bool evl0)</td></tr> |
---|
96 | |
---|
97 | <tr><td class="mdescLeft"> </td><td class="mdescRight">access function <br></td></tr> |
---|
98 | <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> |
---|
99 | |
---|
100 | <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> |
---|
101 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="eddee08a724170de63f36e40c57b27b5"></a><!-- doxytag: member="multiBM::est" ref="eddee08a724170de63f36e40c57b27b5" args="" --> |
---|
102 | <a class="el" href="classeDirich.html">eDirich</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmultiBM.html#eddee08a724170de63f36e40c57b27b5">est</a></td></tr> |
---|
103 | |
---|
104 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Conjugate prior and posterior. <br></td></tr> |
---|
105 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7b606116aed7e8834a339cbb0424b1d6"></a><!-- doxytag: member="multiBM::beta" ref="7b606116aed7e8834a339cbb0424b1d6" args="" --> |
---|
106 | vec & </td><td class="memItemRight" valign="bottom"><b>beta</b></td></tr> |
---|
107 | |
---|
108 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="538d632e59f9afa8daa1de74da12ce71"></a><!-- doxytag: member="multiBM::frg" ref="538d632e59f9afa8daa1de74da12ce71" args="" --> |
---|
109 | double </td><td class="memItemRight" valign="bottom"><a class="el" href="classBMEF.html#538d632e59f9afa8daa1de74da12ce71">frg</a></td></tr> |
---|
110 | |
---|
111 | <tr><td class="mdescLeft"> </td><td class="mdescRight">forgetting factor <br></td></tr> |
---|
112 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="308cf5d4133cd471fdf1ecd5dfa09d02"></a><!-- doxytag: member="multiBM::last_lognc" ref="308cf5d4133cd471fdf1ecd5dfa09d02" args="" --> |
---|
113 | double </td><td class="memItemRight" valign="bottom"><a class="el" href="classBMEF.html#308cf5d4133cd471fdf1ecd5dfa09d02">last_lognc</a></td></tr> |
---|
114 | |
---|
115 | <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> |
---|
116 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="af00f0612fabe66241dd507188cdbf88"></a><!-- doxytag: member="multiBM::rv" ref="af00f0612fabe66241dd507188cdbf88" args="" --> |
---|
117 | <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> |
---|
118 | |
---|
119 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Random variable of the posterior. <br></td></tr> |
---|
120 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5623fef6572a08c2b53b8c87b82dc979"></a><!-- doxytag: member="multiBM::ll" ref="5623fef6572a08c2b53b8c87b82dc979" args="" --> |
---|
121 | double </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979">ll</a></td></tr> |
---|
122 | |
---|
123 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Logarithm of marginalized data likelihood. <br></td></tr> |
---|
124 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bf6fb59b30141074f8ee1e2f43d03129"></a><!-- doxytag: member="multiBM::evalll" ref="bf6fb59b30141074f8ee1e2f43d03129" args="" --> |
---|
125 | bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129">evalll</a></td></tr> |
---|
126 | |
---|
127 | <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> |
---|
128 | </table> |
---|
129 | <hr><a name="_details"></a><h2>Detailed Description</h2> |
---|
130 | Estimator for Multinomial density. <hr><h2>Member Function Documentation</h2> |
---|
131 | <a class="anchor" name="11eeba7e97954e316e959116f90d80e2"></a><!-- doxytag: member="multiBM::bayes" ref="11eeba7e97954e316e959116f90d80e2" args="(const vec &dt)" --> |
---|
132 | <div class="memitem"> |
---|
133 | <div class="memproto"> |
---|
134 | <table class="memname"> |
---|
135 | <tr> |
---|
136 | <td class="memname">void multiBM::bayes </td> |
---|
137 | <td>(</td> |
---|
138 | <td class="paramtype">const vec & </td> |
---|
139 | <td class="paramname"> <em>dt</em> </td> |
---|
140 | <td> ) </td> |
---|
141 | <td><code> [inline, virtual]</code></td> |
---|
142 | </tr> |
---|
143 | </table> |
---|
144 | </div> |
---|
145 | <div class="memdoc"> |
---|
146 | |
---|
147 | <p> |
---|
148 | Incremental Bayes rule. |
---|
149 | <p> |
---|
150 | <dl compact><dt><b>Parameters:</b></dt><dd> |
---|
151 | <table border="0" cellspacing="2" cellpadding="0"> |
---|
152 | <tr><td valign="top"></td><td valign="top"><em>dt</em> </td><td>vector of input data </td></tr> |
---|
153 | </table> |
---|
154 | </dl> |
---|
155 | |
---|
156 | <p>Reimplemented from <a class="el" href="classBMEF.html#52b7719312d545215cca1ff87722a35a">BMEF</a>.</p> |
---|
157 | |
---|
158 | <p>References <a class="el" href="libEF_8h-source.html#l00224">est</a>, <a class="el" href="libBM_8h-source.html#l00280">BM::evalll</a>, <a class="el" href="libEF_8h-source.html#l00078">BMEF::frg</a>, <a class="el" href="libEF_8h-source.html#l00080">BMEF::last_lognc</a>, <a class="el" href="libBM_8h-source.html#l00278">BM::ll</a>, and <a class="el" href="libEF_8h-source.html#l00210">eDirich::lognc()</a>.</p> |
---|
159 | |
---|
160 | <p>Referenced by <a class="el" href="mixef_8cpp-source.html#l00040">MixEF::bayes()</a>.</p> |
---|
161 | |
---|
162 | </div> |
---|
163 | </div><p> |
---|
164 | <a class="anchor" name="13e26a61757278981fd8cac9a7ef91eb"></a><!-- doxytag: member="multiBM::logpred" ref="13e26a61757278981fd8cac9a7ef91eb" args="(const vec &dt) const " --> |
---|
165 | <div class="memitem"> |
---|
166 | <div class="memproto"> |
---|
167 | <table class="memname"> |
---|
168 | <tr> |
---|
169 | <td class="memname">double multiBM::logpred </td> |
---|
170 | <td>(</td> |
---|
171 | <td class="paramtype">const vec & </td> |
---|
172 | <td class="paramname"> <em>dt</em> </td> |
---|
173 | <td> ) </td> |
---|
174 | <td> const<code> [inline, virtual]</code></td> |
---|
175 | </tr> |
---|
176 | </table> |
---|
177 | </div> |
---|
178 | <div class="memdoc"> |
---|
179 | |
---|
180 | <p> |
---|
181 | Evaluates predictive log-likelihood of the given data record I.e. marginal likelihood of the data with the posterior integrated out. |
---|
182 | <p>Reimplemented from <a class="el" href="classBM.html#8a8ce6df431689964c41cc6c849cfd06">BM</a>.</p> |
---|
183 | |
---|
184 | <p>References <a class="el" href="libEF_8h-source.html#l00217">eDirich::_beta()</a>, <a class="el" href="libEF_8h-source.html#l00224">est</a>, <a class="el" href="libBM_8h-source.html#l00280">BM::evalll</a>, <a class="el" href="libEF_8h-source.html#l00078">BMEF::frg</a>, <a class="el" href="libEF_8h-source.html#l00080">BMEF::last_lognc</a>, and <a class="el" href="libEF_8h-source.html#l00210">eDirich::lognc()</a>.</p> |
---|
185 | |
---|
186 | <p>Referenced by <a class="el" href="mixef_8cpp-source.html#l00040">MixEF::bayes()</a>.</p> |
---|
187 | |
---|
188 | </div> |
---|
189 | </div><p> |
---|
190 | <a class="anchor" name="eb58c81d6a7b75b05fc6f276eed78887"></a><!-- doxytag: member="multiBM::_copy_" ref="eb58c81d6a7b75b05fc6f276eed78887" args="(bool changerv=false)" --> |
---|
191 | <div class="memitem"> |
---|
192 | <div class="memproto"> |
---|
193 | <table class="memname"> |
---|
194 | <tr> |
---|
195 | <td class="memname">virtual <a class="el" href="classBM.html">BM</a>* BM::_copy_ </td> |
---|
196 | <td>(</td> |
---|
197 | <td class="paramtype">bool </td> |
---|
198 | <td class="paramname"> <em>changerv</em> = <code>false</code> </td> |
---|
199 | <td> ) </td> |
---|
200 | <td><code> [inline, virtual, inherited]</code></td> |
---|
201 | </tr> |
---|
202 | </table> |
---|
203 | </div> |
---|
204 | <div class="memdoc"> |
---|
205 | |
---|
206 | <p> |
---|
207 | 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; } |
---|
208 | <p>Reimplemented in <a class="el" href="classARX.html#d2751057811c6fb8f4ff86e1648bcddc">ARX</a>.</p> |
---|
209 | |
---|
210 | <p>Referenced by <a class="el" href="mixef_8cpp-source.html#l00007">MixEF::MixEF()</a>.</p> |
---|
211 | |
---|
212 | </div> |
---|
213 | </div><p> |
---|
214 | <hr>The documentation for this class was generated from the following file:<ul> |
---|
215 | <li>work/git/mixpp/bdm/stat/<a class="el" href="libEF_8h-source.html">libEF.h</a></ul> |
---|
216 | </div> |
---|
217 | <hr size="1"><address style="text-align: right;"><small>Generated on Tue Sep 23 16:00:55 2008 for mixpp by |
---|
218 | <a href="http://www.doxygen.org/index.html"> |
---|
219 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address> |
---|
220 | </body> |
---|
221 | </html> |
---|