root/doc/html/classbdm_1_1MixEF.html @ 261

Revision 261, 27.1 kB (checked in by smidl, 16 years ago)

doc

Line 
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::MixEF 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&nbsp;Page</span></a></li>
12      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
13      <li><a href="modules.html"><span>Modules</span></a></li>
14      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
15      <li class="current"><a href="classes.html"><span>Classes</span></a></li>
16      <li><a href="files.html"><span>Files</span></a></li>
17    </ul>
18  </div>
19  <div class="tabs">
20    <ul>
21      <li><a href="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
22      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
23      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
24      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
25    </ul>
26  </div>
27  <div class="navpath"><a class="el" href="namespacebdm.html">bdm</a>::<a class="el" href="classbdm_1_1MixEF.html">MixEF</a>
28  </div>
29</div>
30<div class="contents">
31<h1>bdm::MixEF Class Reference</h1><!-- doxytag: class="bdm::MixEF" --><!-- doxytag: inherits="bdm::BMEF" -->Mixture of Exponential Family Densities. 
32<a href="#_details">More...</a>
33<p>
34<code>#include &lt;<a class="el" href="mixef_8h-source.html">mixef.h</a>&gt;</code>
35<p>
36<div class="dynheader">
37Inheritance diagram for bdm::MixEF:</div>
38<div class="dynsection">
39<p><center><img src="classbdm_1_1MixEF__inherit__graph.png" border="0" usemap="#bdm_1_1MixEF__inherit__map" alt="Inheritance graph"></center>
40<map name="bdm_1_1MixEF__inherit__map">
41<area shape="rect" href="classbdm_1_1BMEF.html" title="Estimator for Exponential family." alt="" coords="15,161,108,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="23,84,100,111"><area shape="rect" href="classbdm_1_1bdmroot.html" title="Root class of BDM objects." alt="" coords="5,7,117,33"></map>
42<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>
43<div class="dynheader">
44Collaboration diagram for bdm::MixEF:</div>
45<div class="dynsection">
46<p><center><img src="classbdm_1_1MixEF__coll__graph.png" border="0" usemap="#bdm_1_1MixEF__coll__map" alt="Collaboration graph"></center>
47<map name="bdm_1_1MixEF__coll__map">
48<area shape="rect" href="classbdm_1_1BMEF.html" title="Estimator for Exponential family." alt="" coords="5,369,99,396"><area shape="rect" href="classbdm_1_1multiBM.html" title="Estimator for Multinomial density." alt="" coords="108,465,217,492"><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_1bdmroot.html" title="Root class of BDM objects." alt="" coords="64,7,176,33"><area shape="rect" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables." alt="" coords="83,87,157,113"><area shape="rect" href="classbdm_1_1epdf.html" title="Probability density function with numerical statistics, e.g. posterior density." alt="" coords="139,183,224,209"><area shape="rect" href="classbdm_1_1eDirich.html" title="Dirichlet posterior density." alt="" coords="123,369,224,396"><area shape="rect" href="classbdm_1_1eEF.html" title="General conjugate exponential family posterior density." alt="" coords="136,263,216,289"><area shape="rect" href="classbdm_1_1eprod.html" title="Product of independent epdfs. For dependent pdfs, use mprod." alt="" coords="212,316,308,343"></map>
49<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>
50
51<p>
52<a href="classbdm_1_1MixEF-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
53<tr><td></td></tr>
54<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
55<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4efe67d414ff34a1e7534004fd061241"></a><!-- doxytag: member="bdm::MixEF::MixEF" ref="4efe67d414ff34a1e7534004fd061241" args="(const Array&lt; BMEF * &gt; &amp;Coms0, const vec &amp;alpha0)" -->
56&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1MixEF.html#4efe67d414ff34a1e7534004fd061241">MixEF</a> (const Array&lt; <a class="el" href="classbdm_1_1BMEF.html">BMEF</a> * &gt; &amp;Coms0, const vec &amp;alpha0)</td></tr>
57
58<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Full constructor. <br></td></tr>
59<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0266854387338ba757e6192d62907984"></a><!-- doxytag: member="bdm::MixEF::MixEF" ref="0266854387338ba757e6192d62907984" args="()" -->
60&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1MixEF.html#0266854387338ba757e6192d62907984">MixEF</a> ()</td></tr>
61
62<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor of empty mixture. <br></td></tr>
63<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9577de85c3e3481f7c0e23cf8f87c482"></a><!-- doxytag: member="bdm::MixEF::MixEF" ref="9577de85c3e3481f7c0e23cf8f87c482" args="(const MixEF &amp;M2)" -->
64&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1MixEF.html#9577de85c3e3481f7c0e23cf8f87c482">MixEF</a> (const <a class="el" href="classbdm_1_1MixEF.html">MixEF</a> &amp;M2)</td></tr>
65
66<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Copy constructor. <br></td></tr>
67<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1MixEF.html#0c2a50789b30769964a909d217125ed2">init</a> (<a class="el" href="classbdm_1_1BMEF.html">BMEF</a> *Com0, const mat &amp;Data, int c=5)</td></tr>
68
69<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5bd7da667da183eed1577f11dff0c1f1"></a><!-- doxytag: member="bdm::MixEF::bayes" ref="5bd7da667da183eed1577f11dff0c1f1" args="(const vec &amp;dt)" -->
70void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1MixEF.html#5bd7da667da183eed1577f11dff0c1f1">bayes</a> (const vec &amp;dt)</td></tr>
71
72<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Recursive EM-like algorithm (QB-variant), see Karny et. al, 2006. <br></td></tr>
73<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5c41d5a4403da6e629f6bdfc70c43d20"></a><!-- doxytag: member="bdm::MixEF::bayes" ref="5c41d5a4403da6e629f6bdfc70c43d20" args="(const mat &amp;dt)" -->
74void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1MixEF.html#5c41d5a4403da6e629f6bdfc70c43d20">bayes</a> (const mat &amp;dt)</td></tr>
75
76<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">EM algorithm. <br></td></tr>
77<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5de521c395e93478df00d881ab8dac81"></a><!-- doxytag: member="bdm::MixEF::bayesB" ref="5de521c395e93478df00d881ab8dac81" args="(const mat &amp;dt, const vec &amp;wData)" -->
78void&nbsp;</td><td class="memItemRight" valign="bottom"><b>bayesB</b> (const mat &amp;dt, const vec &amp;wData)</td></tr>
79
80<tr><td class="memItemLeft" nowrap align="right" valign="top">double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1MixEF.html#da724da464a75e07521941e430929efa">logpred</a> (const vec &amp;dt) const </td></tr>
81
82<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="33d0b3da1d10bf149d41ee74f6284a19"></a><!-- doxytag: member="bdm::MixEF::_epdf" ref="33d0b3da1d10bf149d41ee74f6284a19" args="() const " -->
83const <a class="el" href="classbdm_1_1epdf.html">epdf</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1MixEF.html#33d0b3da1d10bf149d41ee74f6284a19">_epdf</a> () const </td></tr>
84
85<tr><td class="mdescLeft">&nbsp;</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>
86<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ea8be6f0703d87b7c4c3e77fd07e28c8"></a><!-- doxytag: member="bdm::MixEF::_e" ref="ea8be6f0703d87b7c4c3e77fd07e28c8" args="() const " -->
87const <a class="el" href="classbdm_1_1eprod.html">eprod</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1MixEF.html#ea8be6f0703d87b7c4c3e77fd07e28c8">_e</a> () const </td></tr>
88
89<tr><td class="mdescLeft">&nbsp;</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>
90<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5105973c0f790f08d1dfb79c2a3f6e1c"></a><!-- doxytag: member="bdm::MixEF::predictor" ref="5105973c0f790f08d1dfb79c2a3f6e1c" args="(const RV &amp;rv) const " -->
91<a class="el" href="classbdm_1_1emix.html">emix</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1MixEF.html#5105973c0f790f08d1dfb79c2a3f6e1c">predictor</a> (const <a class="el" href="classbdm_1_1RV.html">RV</a> &amp;<a class="el" href="classbdm_1_1BM.html#18d6db4af8ee42077741d9e3618153ca">rv</a>) const </td></tr>
92
93<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructs a predictive density (marginal density on data). <br></td></tr>
94<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f0dfb4375fef4e61c4cb062e5bac7c8c"></a><!-- doxytag: member="bdm::MixEF::flatten" ref="f0dfb4375fef4e61c4cb062e5bac7c8c" args="(const BMEF *M2)" -->
95void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1MixEF.html#f0dfb4375fef4e61c4cb062e5bac7c8c">flatten</a> (const <a class="el" href="classbdm_1_1BMEF.html">BMEF</a> *M2)</td></tr>
96
97<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Flatten the density as if it was not estimated from the data. <br></td></tr>
98<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="251ef6fc51757712693da5faae5317c9"></a><!-- doxytag: member="bdm::MixEF::_Coms" ref="251ef6fc51757712693da5faae5317c9" args="(int i)" -->
99<a class="el" href="classbdm_1_1BMEF.html">BMEF</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1MixEF.html#251ef6fc51757712693da5faae5317c9">_Coms</a> (int i)</td></tr>
100
101<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Access function. <br></td></tr>
102<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="664529d52cc667383b39eeb440ccd577"></a><!-- doxytag: member="bdm::MixEF::set_method" ref="664529d52cc667383b39eeb440ccd577" args="(MixEF_METHOD M)" -->
103void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1MixEF.html#664529d52cc667383b39eeb440ccd577">set_method</a> (MixEF_METHOD M)</td></tr>
104
105<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set which method is to be used. <br></td></tr>
106<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d2b528b7a41ca67163152142f5404051"></a><!-- doxytag: member="bdm::MixEF::set_statistics" ref="d2b528b7a41ca67163152142f5404051" args="(const BMEF *BM0)" -->
107virtual void&nbsp;</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>
108
109<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">get statistics from another model <br></td></tr>
110<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bf58deb99af2a6cc674f13ff90300de6"></a><!-- doxytag: member="bdm::MixEF::bayes" ref="bf58deb99af2a6cc674f13ff90300de6" args="(const vec &amp;data, const double w)" -->
111virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BMEF.html#bf58deb99af2a6cc674f13ff90300de6">bayes</a> (const vec &amp;data, const double w)</td></tr>
112
113<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Weighted update of sufficient statistics (Bayes rule). <br></td></tr>
114<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5912dbcf28ae711e30b08c2fa766a3e6"></a><!-- doxytag: member="bdm::MixEF::_copy_" ref="5912dbcf28ae711e30b08c2fa766a3e6" args="(bool changerv=false)" -->
115<a class="el" href="classbdm_1_1BMEF.html">BMEF</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BMEF.html#5912dbcf28ae711e30b08c2fa766a3e6">_copy_</a> (bool changerv=false)</td></tr>
116
117<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Flatten the posterior as if to keep nu0 data. <br></td></tr>
118<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1dee3fddaf021e62d925289660a707dc"></a><!-- doxytag: member="bdm::MixEF::bayesB" ref="1dee3fddaf021e62d925289660a707dc" args="(const mat &amp;Dt)" -->
119virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#1dee3fddaf021e62d925289660a707dc">bayesB</a> (const mat &amp;Dt)</td></tr>
120
121<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Batch Bayes rule (columns of Dt are observations). <br></td></tr>
122<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0e8ebe61fb14990abe1254bd3dda5fae"></a><!-- doxytag: member="bdm::MixEF::logpred_m" ref="0e8ebe61fb14990abe1254bd3dda5fae" args="(const mat &amp;dt) const " -->
123vec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#0e8ebe61fb14990abe1254bd3dda5fae">logpred_m</a> (const mat &amp;dt) const </td></tr>
124
125<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Matrix version of logpred. <br></td></tr>
126<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="40a3c891996391e3135518053a917793"></a><!-- doxytag: member="bdm::MixEF::_rv" ref="40a3c891996391e3135518053a917793" args="() const " -->
127const <a class="el" href="classbdm_1_1RV.html">RV</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#40a3c891996391e3135518053a917793">_rv</a> () const </td></tr>
128
129<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">access function <br></td></tr>
130<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5be65d37dedfe33a3671e7065f523a70"></a><!-- doxytag: member="bdm::MixEF::_ll" ref="5be65d37dedfe33a3671e7065f523a70" args="() const " -->
131double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#5be65d37dedfe33a3671e7065f523a70">_ll</a> () const </td></tr>
132
133<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">access function <br></td></tr>
134<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="236b3abbcc93594fc97cd86d82c1a83f"></a><!-- doxytag: member="bdm::MixEF::set_evalll" ref="236b3abbcc93594fc97cd86d82c1a83f" args="(bool evl0)" -->
135void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#236b3abbcc93594fc97cd86d82c1a83f">set_evalll</a> (bool evl0)</td></tr>
136
137<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">access function <br></td></tr>
138<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
139<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d74a8d1370c63c93ec554908ae3e6006"></a><!-- doxytag: member="bdm::MixEF::build_est" ref="d74a8d1370c63c93ec554908ae3e6006" args="()" -->
140void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1MixEF.html#d74a8d1370c63c93ec554908ae3e6006">build_est</a> ()</td></tr>
141
142<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Auxiliary function for use in constructors. <br></td></tr>
143<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
144<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="38ca1d86e977d1c38810a3c95bf074a5"></a><!-- doxytag: member="bdm::MixEF::n" ref="38ca1d86e977d1c38810a3c95bf074a5" args="" -->
145int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1MixEF.html#38ca1d86e977d1c38810a3c95bf074a5">n</a></td></tr>
146
147<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Number of components. <br></td></tr>
148<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="90c21ab5a2af56d4b49e2eaef6eccc08"></a><!-- doxytag: member="bdm::MixEF::Coms" ref="90c21ab5a2af56d4b49e2eaef6eccc08" args="" -->
149Array&lt; <a class="el" href="classbdm_1_1BMEF.html">BMEF</a> * &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1MixEF.html#90c21ab5a2af56d4b49e2eaef6eccc08">Coms</a></td></tr>
150
151<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Models for Components of <img class="formulaInl" alt="$\theta_i$" src="form_69.png">. <br></td></tr>
152<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e39faa70cebadc3296bd249040105e86"></a><!-- doxytag: member="bdm::MixEF::weights" ref="e39faa70cebadc3296bd249040105e86" args="" -->
153<a class="el" href="classbdm_1_1multiBM.html">multiBM</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1MixEF.html#e39faa70cebadc3296bd249040105e86">weights</a></td></tr>
154
155<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Statistics for weights. <br></td></tr>
156<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9413fb7f1836237aac807fb9f245e4f6"></a><!-- doxytag: member="bdm::MixEF::est" ref="9413fb7f1836237aac807fb9f245e4f6" args="" -->
157<a class="el" href="classbdm_1_1eprod.html">eprod</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1MixEF.html#9413fb7f1836237aac807fb9f245e4f6">est</a></td></tr>
158
159<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Posterior on component parameters. <br></td></tr>
160<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a2376ddadb7573532404452d0c2dd28a"></a><!-- doxytag: member="bdm::MixEF::method" ref="a2376ddadb7573532404452d0c2dd28a" args="" -->
161MixEF_METHOD&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1MixEF.html#a2376ddadb7573532404452d0c2dd28a">method</a></td></tr>
162
163<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Flag for a method that is used in the inference. <br></td></tr>
164<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1331865e10fb1ccef65bb4c47fa3be64"></a><!-- doxytag: member="bdm::MixEF::frg" ref="1331865e10fb1ccef65bb4c47fa3be64" args="" -->
165double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BMEF.html#1331865e10fb1ccef65bb4c47fa3be64">frg</a></td></tr>
166
167<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">forgetting factor <br></td></tr>
168<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="06e7b3ac03e10017d4288c76888e2865"></a><!-- doxytag: member="bdm::MixEF::last_lognc" ref="06e7b3ac03e10017d4288c76888e2865" args="" -->
169double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BMEF.html#06e7b3ac03e10017d4288c76888e2865">last_lognc</a></td></tr>
170
171<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">cached value of lognc() in the previous step (used in evaluation of <code>ll</code> ) <br></td></tr>
172<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="18d6db4af8ee42077741d9e3618153ca"></a><!-- doxytag: member="bdm::MixEF::rv" ref="18d6db4af8ee42077741d9e3618153ca" args="" -->
173<a class="el" href="classbdm_1_1RV.html">RV</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#18d6db4af8ee42077741d9e3618153ca">rv</a></td></tr>
174
175<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Random variable of the posterior. <br></td></tr>
176<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4064b6559d962633e4372b12f4cd204a"></a><!-- doxytag: member="bdm::MixEF::ll" ref="4064b6559d962633e4372b12f4cd204a" args="" -->
177double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#4064b6559d962633e4372b12f4cd204a">ll</a></td></tr>
178
179<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Logarithm of marginalized data likelihood. <br></td></tr>
180<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="faff0ad12556fe7dc0e2807d4fd938ee"></a><!-- doxytag: member="bdm::MixEF::evalll" ref="faff0ad12556fe7dc0e2807d4fd938ee" args="" -->
181bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#faff0ad12556fe7dc0e2807d4fd938ee">evalll</a></td></tr>
182
183<tr><td class="mdescLeft">&nbsp;</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>
184</table>
185<hr><a name="_details"></a><h2>Detailed Description</h2>
186Mixture of Exponential Family Densities.
187<p>
188An approximate estimation method for models with latent discrete variable, such as mixture models of the following kind: <p class="formulaDsp">
189<img class="formulaDsp" alt="\[ f(y_t|\psi_t, \Theta) = \sum_{i=1}^{n} w_i f(y_t|\psi_t, \theta_i) \]" src="form_66.png">
190<p>
191 where <img class="formulaInl" alt="$\psi$" src="form_67.png"> is a known function of past outputs, <img class="formulaInl" alt="$w=[w_1,\ldots,w_n]$" src="form_68.png"> are component weights, and component parameters <img class="formulaInl" alt="$\theta_i$" src="form_69.png"> are assumed to be mutually independent. <img class="formulaInl" alt="$\Theta$" src="form_70.png"> is an aggregation af all component parameters and weights, i.e. <img class="formulaInl" alt="$\Theta = [\theta_1,\ldots,\theta_n,w]$" src="form_71.png">.<p>
192The characteristic feature of this model is that if the exact values of the latent variable were known, estimation of the parameters can be handled by a single model. For example, for the case of mixture models, posterior density for each component parameters would be a BayesianModel from Exponential Family.<p>
193This class uses EM-style type algorithms for estimation of its parameters. Under this simplification, the posterior density is a product of exponential family members, hence under EM-style approximate estimation this class itself belongs to the exponential family.<p>
194TODO: Extend <a class="el" href="classbdm_1_1BM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities.">BM</a> to use rvc. <hr><h2>Member Function Documentation</h2>
195<a class="anchor" name="0c2a50789b30769964a909d217125ed2"></a><!-- doxytag: member="bdm::MixEF::init" ref="0c2a50789b30769964a909d217125ed2" args="(BMEF *Com0, const mat &amp;Data, int c=5)" -->
196<div class="memitem">
197<div class="memproto">
198      <table class="memname">
199        <tr>
200          <td class="memname">void bdm::MixEF::init           </td>
201          <td>(</td>
202          <td class="paramtype"><a class="el" href="classbdm_1_1BMEF.html">BMEF</a> *&nbsp;</td>
203          <td class="paramname"> <em>Com0</em>, </td>
204        </tr>
205        <tr>
206          <td class="paramkey"></td>
207          <td></td>
208          <td class="paramtype">const mat &amp;&nbsp;</td>
209          <td class="paramname"> <em>Data</em>, </td>
210        </tr>
211        <tr>
212          <td class="paramkey"></td>
213          <td></td>
214          <td class="paramtype">int&nbsp;</td>
215          <td class="paramname"> <em>c</em> = <code>5</code></td><td>&nbsp;</td>
216        </tr>
217        <tr>
218          <td></td>
219          <td>)</td>
220          <td></td><td></td><td></td>
221        </tr>
222      </table>
223</div>
224<div class="memdoc">
225
226<p>
227Initializing the mixture by a random pick of centroids from data <dl compact><dt><b>Parameters:</b></dt><dd>
228  <table border="0" cellspacing="2" cellpadding="0">
229    <tr><td valign="top"></td><td valign="top"><em>Com0</em>&nbsp;</td><td>Initial component - necessary to determine its type. </td></tr>
230    <tr><td valign="top"></td><td valign="top"><em>Data</em>&nbsp;</td><td>Data on which the initialization will be done </td></tr>
231    <tr><td valign="top"></td><td valign="top"><em>c</em>&nbsp;</td><td>Initial number of components, default=5 </td></tr>
232  </table>
233</dl>
234
235<p>References <a class="el" href="libEF_8h-source.html#l00096">bdm::BMEF::_copy_()</a>, <a class="el" href="mixef_8h-source.html#l00057">build_est()</a>, <a class="el" href="mixef_8h-source.html#l00046">Coms</a>, <a class="el" href="mixef_8h-source.html#l00050">est</a>, <a class="el" href="mixef_8h-source.html#l00044">n</a>, <a class="el" href="libEF_8h-source.html#l00300">bdm::multiBM::set_parameters()</a>, <a class="el" href="libEF_8cpp-source.html#l00008">bdm::UniRNG</a>, and <a class="el" href="mixef_8h-source.html#l00048">weights</a>.</p>
236
237<p>Referenced by <a class="el" href="merger_8cpp-source.html#l00030">bdm::merger::merge()</a>.</p>
238
239</div>
240</div><p>
241<a class="anchor" name="da724da464a75e07521941e430929efa"></a><!-- doxytag: member="bdm::MixEF::logpred" ref="da724da464a75e07521941e430929efa" args="(const vec &amp;dt) const " -->
242<div class="memitem">
243<div class="memproto">
244      <table class="memname">
245        <tr>
246          <td class="memname">double bdm::MixEF::logpred           </td>
247          <td>(</td>
248          <td class="paramtype">const vec &amp;&nbsp;</td>
249          <td class="paramname"> <em>dt</em>          </td>
250          <td>&nbsp;)&nbsp;</td>
251          <td> const<code> [virtual]</code></td>
252        </tr>
253      </table>
254</div>
255<div class="memdoc">
256
257<p>
258Evaluates predictive log-likelihood of the given data record I.e. marginal likelihood of the data with the posterior integrated out.
259<p>Reimplemented from <a class="el" href="classbdm_1_1BM.html#50257e0c1e5b5c73153ea6e716ad8ae0">bdm::BM</a>.</p>
260
261<p>References <a class="el" href="libEF_8h-source.html#l00298">bdm::multiBM::_epdf()</a>, <a class="el" href="mixef_8h-source.html#l00046">Coms</a>, <a class="el" href="classbdm_1_1epdf.html#565300f603ca00c989e16389d9eb42f5">bdm::epdf::mean()</a>, and <a class="el" href="mixef_8h-source.html#l00048">weights</a>.</p>
262
263<p>Referenced by <a class="el" href="merger_8h-source.html#l00090">bdm::merger::evallog()</a>, and <a class="el" href="merger_8cpp-source.html#l00030">bdm::merger::merge()</a>.</p>
264
265</div>
266</div><p>
267<hr>The documentation for this class was generated from the following files:<ul>
268<li><a class="el" href="mixef_8h-source.html">mixef.h</a><li>mixef.cpp</ul>
269</div>
270<hr size="1"><address style="text-align: right;"><small>Generated on Fri Feb 6 15:29:51 2009 for mixpp by&nbsp;
271<a href="http://www.doxygen.org/index.html">
272<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
273</body>
274</html>
Note: See TracBrowser for help on using the browser.