root/library/doc/html/classbdm_1_1MixEF.html @ 616

Revision 616, 34.8 kB (checked in by smidl, 15 years ago)

doc, sorted related pages

Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>mixpp: bdm::MixEF Class Reference</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="doxygen.css" rel="stylesheet" type="text/css"/>
8</head>
9<body>
10<!-- Generated by Doxygen 1.6.1 -->
11<script type="text/javascript">
12<!--
13function changeDisplayState (e){
14  var num=this.id.replace(/[^[0-9]/g,'');
15  var button=this.firstChild;
16  var sectionDiv=document.getElementById('dynsection'+num);
17  if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){
18    sectionDiv.style.display='block';
19    button.src='open.gif';
20  }else{
21    sectionDiv.style.display='none';
22    button.src='closed.gif';
23  }
24}
25function initDynSections(){
26  var divs=document.getElementsByTagName('div');
27  var sectionCounter=1;
28  for(var i=0;i<divs.length-1;i++){
29    if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){
30      var header=divs[i];
31      var section=divs[i+1];
32      var button=header.firstChild;
33      if (button!='IMG'){
34        divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild);
35        button=document.createElement('img');
36        divs[i].insertBefore(button,divs[i].firstChild);
37      }
38      header.style.cursor='pointer';
39      header.onclick=changeDisplayState;
40      header.id='dynheader'+sectionCounter;
41      button.src='closed.gif';
42      section.id='dynsection'+sectionCounter;
43      section.style.display='none';
44      section.style.marginLeft='14px';
45      sectionCounter++;
46    }
47  }
48}
49window.onload = initDynSections;
50-->
51</script>
52<div class="navigation" id="top">
53  <div class="tabs">
54    <ul>
55      <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
56      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
57      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
58      <li><a href="files.html"><span>Files</span></a></li>
59    </ul>
60  </div>
61  <div class="tabs">
62    <ul>
63      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
64      <li><a href="classes.html"><span>Class&nbsp;Index</span></a></li>
65      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
66      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
67    </ul>
68  </div>
69  <div class="navpath"><b>bdm</b>::<a class="el" href="classbdm_1_1MixEF.html">MixEF</a>
70  </div>
71</div>
72<div class="contents">
73<h1>bdm::MixEF Class Reference</h1><!-- doxytag: class="bdm::MixEF" --><!-- doxytag: inherits="bdm::BMEF" -->
74<p>Mixture of Exponential Family Densities. 
75<a href="#_details">More...</a></p>
76<hr/><a name="_details"></a><h2>Detailed Description</h2>
77<p>Mixture of Exponential Family Densities. </p>
78<p>An approximate estimation method for models with latent discrete variable, such as mixture models of the following kind: </p>
79<p class="formulaDsp">
80<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_40.png"/>
81</p>
82<p> where <img class="formulaInl" alt="$\psi$" src="form_41.png"/> is a known function of past outputs, <img class="formulaInl" alt="$w=[w_1,\ldots,w_n]$" src="form_42.png"/> are component weights, and component parameters <img class="formulaInl" alt="$\theta_i$" src="form_43.png"/> are assumed to be mutually independent. <img class="formulaInl" alt="$\Theta$" src="form_44.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_45.png"/>.</p>
83<p>The 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>
84<p>This 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>
85<p>TODO: Extend <a class="el" href="classbdm_1_1BM.html" title="Bayesian Model of a system, i.e. all uncertainty is modeled by probabilities.">BM</a> to use rvc. </p>
86
87<p><code>#include &lt;<a class="el" href="mixtures_8h_source.html">mixtures.h</a>&gt;</code></p>
88
89<p><a href="classbdm_1_1MixEF-members.html">List of all members.</a></p>
90<table border="0" cellpadding="0" cellspacing="0">
91<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
92<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4efe67d414ff34a1e7534004fd061241"></a><!-- doxytag: member="bdm::MixEF::MixEF" ref="a4efe67d414ff34a1e7534004fd061241" args="(const Array&lt; BMEF * &gt; &amp;Coms0, const vec &amp;alpha0)" -->
93&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1MixEF.html#a4efe67d414ff34a1e7534004fd061241">MixEF</a> (const Array&lt; <a class="el" href="classbdm_1_1BMEF.html">BMEF</a> * &gt; &amp;Coms0, const vec &amp;alpha0)</td></tr>
94<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Full constructor. <br/></td></tr>
95<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0266854387338ba757e6192d62907984"></a><!-- doxytag: member="bdm::MixEF::MixEF" ref="a0266854387338ba757e6192d62907984" args="()" -->
96&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1MixEF.html#a0266854387338ba757e6192d62907984">MixEF</a> ()</td></tr>
97<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor of empty mixture. <br/></td></tr>
98<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9577de85c3e3481f7c0e23cf8f87c482"></a><!-- doxytag: member="bdm::MixEF::MixEF" ref="a9577de85c3e3481f7c0e23cf8f87c482" args="(const MixEF &amp;M2)" -->
99&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1MixEF.html#a9577de85c3e3481f7c0e23cf8f87c482">MixEF</a> (const <a class="el" href="classbdm_1_1MixEF.html">MixEF</a> &amp;M2)</td></tr>
100<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Copy constructor. <br/></td></tr>
101<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1MixEF.html#a0c2a50789b30769964a909d217125ed2">init</a> (<a class="el" href="classbdm_1_1BMEF.html">BMEF</a> *Com0, const mat &amp;Data, int c=5)</td></tr>
102<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5bd7da667da183eed1577f11dff0c1f1"></a><!-- doxytag: member="bdm::MixEF::bayes" ref="a5bd7da667da183eed1577f11dff0c1f1" args="(const vec &amp;dt)" -->
103void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1MixEF.html#a5bd7da667da183eed1577f11dff0c1f1">bayes</a> (const vec &amp;dt)</td></tr>
104<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Recursive EM-like algorithm (QB-variant), see Karny et. al, 2006. <br/></td></tr>
105<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5c41d5a4403da6e629f6bdfc70c43d20"></a><!-- doxytag: member="bdm::MixEF::bayes" ref="a5c41d5a4403da6e629f6bdfc70c43d20" args="(const mat &amp;dt)" -->
106void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1MixEF.html#a5c41d5a4403da6e629f6bdfc70c43d20">bayes</a> (const mat &amp;dt)</td></tr>
107<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">EM algorithm. <br/></td></tr>
108<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5de521c395e93478df00d881ab8dac81"></a><!-- doxytag: member="bdm::MixEF::bayesB" ref="a5de521c395e93478df00d881ab8dac81" args="(const mat &amp;dt, const vec &amp;wData)" -->
109void&nbsp;</td><td class="memItemRight" valign="bottom"><b>bayesB</b> (const mat &amp;dt, const vec &amp;wData)</td></tr>
110<tr><td class="memItemLeft" align="right" valign="top">double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1MixEF.html#ada724da464a75e07521941e430929efa">logpred</a> (const vec &amp;dt) const </td></tr>
111<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4830916adef7891a207e42f39aaf787b"></a><!-- doxytag: member="bdm::MixEF::posterior" ref="a4830916adef7891a207e42f39aaf787b" args="() const " -->
112const <a class="el" href="classbdm_1_1epdf.html">epdf</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><b>posterior</b> () const </td></tr>
113<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aedc50e9640f049b846084748b18469a2"></a><!-- doxytag: member="bdm::MixEF::epredictor" ref="aedc50e9640f049b846084748b18469a2" args="() const " -->
114<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#aedc50e9640f049b846084748b18469a2">epredictor</a> () const </td></tr>
115<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructs a predictive density <img class="formulaInl" alt="$ f(d_{t+1} |d_{t}, \ldots d_{0}) $" src="form_20.png"/>. <br/></td></tr>
116<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af0dfb4375fef4e61c4cb062e5bac7c8c"></a><!-- doxytag: member="bdm::MixEF::flatten" ref="af0dfb4375fef4e61c4cb062e5bac7c8c" args="(const BMEF *M2)" -->
117void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1MixEF.html#af0dfb4375fef4e61c4cb062e5bac7c8c">flatten</a> (const <a class="el" href="classbdm_1_1BMEF.html">BMEF</a> *M2)</td></tr>
118<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Flatten the density as if it was not estimated from the data. <br/></td></tr>
119<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a251ef6fc51757712693da5faae5317c9"></a><!-- doxytag: member="bdm::MixEF::_Coms" ref="a251ef6fc51757712693da5faae5317c9" args="(int i)" -->
120<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#a251ef6fc51757712693da5faae5317c9">_Coms</a> (int i)</td></tr>
121<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Access function. <br/></td></tr>
122<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a664529d52cc667383b39eeb440ccd577"></a><!-- doxytag: member="bdm::MixEF::set_method" ref="a664529d52cc667383b39eeb440ccd577" args="(MixEF_METHOD M)" -->
123void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1MixEF.html#a664529d52cc667383b39eeb440ccd577">set_method</a> (MixEF_METHOD M)</td></tr>
124<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set which method is to be used. <br/></td></tr>
125<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad2b528b7a41ca67163152142f5404051"></a><!-- doxytag: member="bdm::MixEF::set_statistics" ref="ad2b528b7a41ca67163152142f5404051" args="(const BMEF *BM0)" -->
126virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BMEF.html#ad2b528b7a41ca67163152142f5404051">set_statistics</a> (const <a class="el" href="classbdm_1_1BMEF.html">BMEF</a> *BM0)</td></tr>
127<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">get statistics from another model <br/></td></tr>
128<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abf58deb99af2a6cc674f13ff90300de6"></a><!-- doxytag: member="bdm::MixEF::bayes" ref="abf58deb99af2a6cc674f13ff90300de6" args="(const vec &amp;data, const double w)" -->
129virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BMEF.html#abf58deb99af2a6cc674f13ff90300de6">bayes</a> (const vec &amp;data, const double w)</td></tr>
130<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Weighted update of sufficient statistics (Bayes rule). <br/></td></tr>
131<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab2916a2e71a958665054473124d5e749"></a><!-- doxytag: member="bdm::MixEF::flatten" ref="ab2916a2e71a958665054473124d5e749" args="(const BMEF *B)" -->
132virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BMEF.html#ab2916a2e71a958665054473124d5e749">flatten</a> (const <a class="el" href="classbdm_1_1BMEF.html">BMEF</a> *B)</td></tr>
133<tr><td class="mdescLeft">&nbsp;</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>
134<tr><td class="memItemLeft" align="right" valign="top"><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#a62d2e4691bed41a1efa6b9c2e35e5c67">_copy_</a> () const </td></tr>
135<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a23c6a8f71f922023ab08dcb0487a86de"></a><!-- doxytag: member="bdm::MixEF::from_setting" ref="a23c6a8f71f922023ab08dcb0487a86de" args="(const Setting &amp;set)" -->
136void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#a23c6a8f71f922023ab08dcb0487a86de">from_setting</a> (const Setting &amp;set)</td></tr>
137<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method arrange instance properties according the data stored in the Setting structure. <br/></td></tr>
138<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aaf0e6941ba5919cae1bc530e2181b109"></a><!-- doxytag: member="bdm::MixEF::to_string" ref="aaf0e6941ba5919cae1bc530e2181b109" args="()" -->
139virtual string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1root.html#aaf0e6941ba5919cae1bc530e2181b109">to_string</a> ()</td></tr>
140<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method returns a basic info about the current instance. <br/></td></tr>
141<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a67d954d255ede776eade7334d4895790"></a><!-- doxytag: member="bdm::MixEF::to_setting" ref="a67d954d255ede776eade7334d4895790" args="(Setting &amp;set) const " -->
142virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1root.html#a67d954d255ede776eade7334d4895790">to_setting</a> (Setting &amp;set) const </td></tr>
143<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method save all the instance properties into the Setting structure. <br/></td></tr>
144<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1c314bd6d6dacb8ba78ea5eb88fd9516"></a><!-- doxytag: member="bdm::MixEF::validate" ref="a1c314bd6d6dacb8ba78ea5eb88fd9516" args="()" -->
145virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1root.html#a1c314bd6d6dacb8ba78ea5eb88fd9516">validate</a> ()</td></tr>
146<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method TODO. <br/></td></tr>
147<tr><td colspan="2"><div class="groupHeader">Mathematical operations</div></td></tr>
148<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrpfb3595af27ed8bd142c95323c0dab340"></a> </p>
149<br/><br/></div></td></tr>
150<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1dee3fddaf021e62d925289660a707dc"></a><!-- doxytag: member="bdm::MixEF::bayesB" ref="a1dee3fddaf021e62d925289660a707dc" args="(const mat &amp;Dt)" -->
151virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#a1dee3fddaf021e62d925289660a707dc">bayesB</a> (const mat &amp;Dt)</td></tr>
152<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Batch Bayes rule (columns of Dt are observations). <br/></td></tr>
153<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0e8ebe61fb14990abe1254bd3dda5fae"></a><!-- doxytag: member="bdm::MixEF::logpred_m" ref="a0e8ebe61fb14990abe1254bd3dda5fae" args="(const mat &amp;dt) const " -->
154vec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#a0e8ebe61fb14990abe1254bd3dda5fae">logpred_m</a> (const mat &amp;dt) const </td></tr>
155<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Matrix version of logpred. <br/></td></tr>
156<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a598b25e3f3d96a5bc00a5faeb5b3c912"></a><!-- doxytag: member="bdm::MixEF::predictor" ref="a598b25e3f3d96a5bc00a5faeb5b3c912" args="() const " -->
157virtual <a class="el" href="classbdm_1_1mpdf.html">mpdf</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#a598b25e3f3d96a5bc00a5faeb5b3c912">predictor</a> () const </td></tr>
158<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructs conditional density of 1-step ahead predictor <img class="formulaInl" alt="$ f(d_{t+1} |d_{t+h-1}, \ldots d_{t}) $" src="form_21.png"/>. <br/></td></tr>
159<tr><td colspan="2"><div class="groupHeader">Access to attributes</div></td></tr>
160<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrpb6eb094f9e6af11f8a7d9efa9d8e3623"></a> </p>
161<br/><br/></div></td></tr>
162<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aff2d8755ba0b3def927d31305c03b09c"></a><!-- doxytag: member="bdm::MixEF::_drv" ref="aff2d8755ba0b3def927d31305c03b09c" args="() const " -->
163const <a class="el" href="classbdm_1_1RV.html">RV</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><b>_drv</b> () const </td></tr>
164<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af135ae6dce7e9f30c9f88229c7930b96"></a><!-- doxytag: member="bdm::MixEF::set_drv" ref="af135ae6dce7e9f30c9f88229c7930b96" args="(const RV &amp;rv)" -->
165void&nbsp;</td><td class="memItemRight" valign="bottom"><b>set_drv</b> (const <a class="el" href="classbdm_1_1RV.html">RV</a> &amp;rv)</td></tr>
166<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab38d92f17620813ad872d86e01a26e5e"></a><!-- doxytag: member="bdm::MixEF::set_rv" ref="ab38d92f17620813ad872d86e01a26e5e" args="(const RV &amp;rv)" -->
167void&nbsp;</td><td class="memItemRight" valign="bottom"><b>set_rv</b> (const <a class="el" href="classbdm_1_1RV.html">RV</a> &amp;rv)</td></tr>
168<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5be65d37dedfe33a3671e7065f523a70"></a><!-- doxytag: member="bdm::MixEF::_ll" ref="a5be65d37dedfe33a3671e7065f523a70" args="() const " -->
169double&nbsp;</td><td class="memItemRight" valign="bottom"><b>_ll</b> () const </td></tr>
170<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a236b3abbcc93594fc97cd86d82c1a83f"></a><!-- doxytag: member="bdm::MixEF::set_evalll" ref="a236b3abbcc93594fc97cd86d82c1a83f" args="(bool evl0)" -->
171void&nbsp;</td><td class="memItemRight" valign="bottom"><b>set_evalll</b> (bool evl0)</td></tr>
172<tr><td colspan="2"><h2>Protected Member Functions</h2></td></tr>
173<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad74a8d1370c63c93ec554908ae3e6006"></a><!-- doxytag: member="bdm::MixEF::build_est" ref="ad74a8d1370c63c93ec554908ae3e6006" args="()" -->
174void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1MixEF.html#ad74a8d1370c63c93ec554908ae3e6006">build_est</a> ()</td></tr>
175<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Auxiliary function for use in constructors. <br/></td></tr>
176<tr><td colspan="2"><h2>Protected Attributes</h2></td></tr>
177<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a38ca1d86e977d1c38810a3c95bf074a5"></a><!-- doxytag: member="bdm::MixEF::n" ref="a38ca1d86e977d1c38810a3c95bf074a5" args="" -->
178int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1MixEF.html#a38ca1d86e977d1c38810a3c95bf074a5">n</a></td></tr>
179<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Number of components. <br/></td></tr>
180<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a90c21ab5a2af56d4b49e2eaef6eccc08"></a><!-- doxytag: member="bdm::MixEF::Coms" ref="a90c21ab5a2af56d4b49e2eaef6eccc08" args="" -->
181Array&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#a90c21ab5a2af56d4b49e2eaef6eccc08">Coms</a></td></tr>
182<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Models for Components of <img class="formulaInl" alt="$\theta_i$" src="form_43.png"/>. <br/></td></tr>
183<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae39faa70cebadc3296bd249040105e86"></a><!-- doxytag: member="bdm::MixEF::weights" ref="ae39faa70cebadc3296bd249040105e86" args="" -->
184<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#ae39faa70cebadc3296bd249040105e86">weights</a></td></tr>
185<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Statistics for weights. <br/></td></tr>
186<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9413fb7f1836237aac807fb9f245e4f6"></a><!-- doxytag: member="bdm::MixEF::est" ref="a9413fb7f1836237aac807fb9f245e4f6" args="" -->
187<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#a9413fb7f1836237aac807fb9f245e4f6">est</a></td></tr>
188<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Posterior on component parameters. <br/></td></tr>
189<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa2376ddadb7573532404452d0c2dd28a"></a><!-- doxytag: member="bdm::MixEF::method" ref="aa2376ddadb7573532404452d0c2dd28a" args="" -->
190MixEF_METHOD&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1MixEF.html#aa2376ddadb7573532404452d0c2dd28a">method</a></td></tr>
191<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Flag for a method that is used in the inference. <br/></td></tr>
192<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1331865e10fb1ccef65bb4c47fa3be64"></a><!-- doxytag: member="bdm::MixEF::frg" ref="a1331865e10fb1ccef65bb4c47fa3be64" args="" -->
193double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BMEF.html#a1331865e10fb1ccef65bb4c47fa3be64">frg</a></td></tr>
194<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">forgetting factor <br/></td></tr>
195<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a06e7b3ac03e10017d4288c76888e2865"></a><!-- doxytag: member="bdm::MixEF::last_lognc" ref="a06e7b3ac03e10017d4288c76888e2865" args="" -->
196double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BMEF.html#a06e7b3ac03e10017d4288c76888e2865">last_lognc</a></td></tr>
197<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>
198<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac400357e37d27a4834b2b1d9211009ed"></a><!-- doxytag: member="bdm::MixEF::drv" ref="ac400357e37d27a4834b2b1d9211009ed" args="" -->
199<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#ac400357e37d27a4834b2b1d9211009ed">drv</a></td></tr>
200<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Random variable of the data (optional). <br/></td></tr>
201<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4064b6559d962633e4372b12f4cd204a"></a><!-- doxytag: member="bdm::MixEF::ll" ref="a4064b6559d962633e4372b12f4cd204a" args="" -->
202double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#a4064b6559d962633e4372b12f4cd204a">ll</a></td></tr>
203<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Logarithm of marginalized data likelihood. <br/></td></tr>
204<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afaff0ad12556fe7dc0e2807d4fd938ee"></a><!-- doxytag: member="bdm::MixEF::evalll" ref="afaff0ad12556fe7dc0e2807d4fd938ee" args="" -->
205bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#afaff0ad12556fe7dc0e2807d4fd938ee">evalll</a></td></tr>
206<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>
207<tr><td colspan="2"><h2>Extension to conditional BM</h2></td></tr>
208<tr><td colspan="2"><p><a class="anchor" id="amgrp74e1db869c28ea37aac65bd658ff5da4"></a> This extension is useful e.g. in Marginalized Particle Filter (<a class="el" href="classbdm_1_1MPF.html">bdm::MPF</a>). Alternatively, it can be used for automated connection to <a class="el" href="classbdm_1_1DS.html" title="Abstract class for discrete-time sources of data.">DS</a> when the condition is observed </p>
209<br/><br/></td></tr>
210<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab5e8e016be16e4029c789063cb3f3b33"></a><!-- doxytag: member="bdm::MixEF::_rvc" ref="ab5e8e016be16e4029c789063cb3f3b33" args="() const " -->
211const <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#ab5e8e016be16e4029c789063cb3f3b33">_rvc</a> () const </td></tr>
212<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">access function <br/></td></tr>
213<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6799f4b16a6a59ed58b1d0d6e17116f4"></a><!-- doxytag: member="bdm::MixEF::condition" ref="a6799f4b16a6a59ed58b1d0d6e17116f4" args="(const vec &amp;val)" -->
214virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#a6799f4b16a6a59ed58b1d0d6e17116f4">condition</a> (const vec &amp;val)</td></tr>
215<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Substitute <code>val</code> for <code>rvc</code>. <br/></td></tr>
216<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ade95c590d650b2db423d53992f0906cb"></a><!-- doxytag: member="bdm::MixEF::rvc" ref="ade95c590d650b2db423d53992f0906cb" args="" -->
217<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#ade95c590d650b2db423d53992f0906cb">rvc</a></td></tr>
218<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Name of extension variable. <br/></td></tr>
219<tr><td colspan="2"><h2>Logging of results</h2></td></tr>
220<tr><td colspan="2"><p><a class="anchor" id="amgrp5b751fa78120752d90ae4487df3bfa73"></a> </p>
221<br/><br/></td></tr>
222<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aadb539fa2585c8a2a91c54e5aebf330e"></a><!-- doxytag: member="bdm::MixEF::set_options" ref="aadb539fa2585c8a2a91c54e5aebf330e" args="(const string &amp;opt)" -->
223virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#aadb539fa2585c8a2a91c54e5aebf330e">set_options</a> (const string &amp;opt)</td></tr>
224<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set boolean options from a string, recognized are: "logbounds,logll". <br/></td></tr>
225<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2298ca6af9b13a78a4c9e18ab43f1827"></a><!-- doxytag: member="bdm::MixEF::log_add" ref="a2298ca6af9b13a78a4c9e18ab43f1827" args="(logger &amp;L, const string &amp;name=&quot;&quot;)" -->
226virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#a2298ca6af9b13a78a4c9e18ab43f1827">log_add</a> (<a class="el" href="classbdm_1_1logger.html">logger</a> &amp;L, const string &amp;name=&quot;&quot;)</td></tr>
227<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add all logged variables to a <a class="el" href="classbdm_1_1logger.html" title="Class for storing results (and semi-results) of an experiment.">logger</a>. <br/></td></tr>
228<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab517e1679eaa94e803ea4cd0b8efbcd7"></a><!-- doxytag: member="bdm::MixEF::logit" ref="ab517e1679eaa94e803ea4cd0b8efbcd7" args="(logger &amp;L)" -->
229virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><b>logit</b> (<a class="el" href="classbdm_1_1logger.html">logger</a> &amp;L)</td></tr>
230<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a109c1a626a69031658e3a44e9e500cca"></a><!-- doxytag: member="bdm::MixEF::LIDs" ref="a109c1a626a69031658e3a44e9e500cca" args="" -->
231ivec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#a109c1a626a69031658e3a44e9e500cca">LIDs</a></td></tr>
232<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">IDs of storages in loggers 4:[1=mean,2=lb,3=ub,4=ll]. <br/></td></tr>
233<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a398b7e7a162cf37d0022d6126495f207"></a><!-- doxytag: member="bdm::MixEF::LFlags" ref="a398b7e7a162cf37d0022d6126495f207" args="" -->
234ivec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbdm_1_1BM.html#a398b7e7a162cf37d0022d6126495f207">LFlags</a></td></tr>
235<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Flags for logging - same size as LIDs, each entry correspond to the same in LIDs. <br/></td></tr>
236</table>
237<hr/><h2>Member Function Documentation</h2>
238<a class="anchor" id="a62d2e4691bed41a1efa6b9c2e35e5c67"></a><!-- doxytag: member="bdm::MixEF::_copy_" ref="a62d2e4691bed41a1efa6b9c2e35e5c67" args="() const " -->
239<div class="memitem">
240<div class="memproto">
241      <table class="memname">
242        <tr>
243          <td class="memname"><a class="el" href="classbdm_1_1BMEF.html">BMEF</a>* bdm::BMEF::_copy_ </td>
244          <td>(</td>
245          <td class="paramname"></td>
246          <td>&nbsp;)&nbsp;</td>
247          <td> const<code> [inline, virtual, inherited]</code></td>
248        </tr>
249      </table>
250</div>
251<div class="memdoc">
252<p>Copy function required in vectors, Arrays of <a class="el" href="classbdm_1_1BM.html" title="Bayesian Model of a system, i.e. all uncertainty is modeled by probabilities.">BM</a> etc. Have to be DELETED manually! Prototype: </p>
253<div class="fragment"><pre class="fragment"> BM* <a class="code" href="classbdm_1_1BMEF.html#a62d2e4691bed41a1efa6b9c2e35e5c67">_copy_</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <span class="keyword">new</span> BM(*<span class="keyword">this</span>);}
254</pre></div> 
255<p>Reimplemented from <a class="el" href="classbdm_1_1BM.html#a40f01563651c1e4fe926189e41a6b8ab">bdm::BM</a>.</p>
256
257<p>Reimplemented in <a class="el" href="classbdm_1_1ARX.html#aca0b54c0997cfd567f49377af5def106">bdm::ARX</a>.</p>
258
259<p>References <a class="el" href="bdmerror_8h_source.html#l00051">bdm_error</a>.</p>
260
261<p>Referenced by <a class="el" href="mixtures_8cpp_source.html#l00007">init()</a>.</p>
262
263</div>
264</div>
265<a class="anchor" id="a0c2a50789b30769964a909d217125ed2"></a><!-- doxytag: member="bdm::MixEF::init" ref="a0c2a50789b30769964a909d217125ed2" args="(BMEF *Com0, const mat &amp;Data, int c=5)" -->
266<div class="memitem">
267<div class="memproto">
268      <table class="memname">
269        <tr>
270          <td class="memname">void bdm::MixEF::init </td>
271          <td>(</td>
272          <td class="paramtype"><a class="el" href="classbdm_1_1BMEF.html">BMEF</a> *&nbsp;</td>
273          <td class="paramname"> <em>Com0</em>, </td>
274        </tr>
275        <tr>
276          <td class="paramkey"></td>
277          <td></td>
278          <td class="paramtype">const mat &amp;&nbsp;</td>
279          <td class="paramname"> <em>Data</em>, </td>
280        </tr>
281        <tr>
282          <td class="paramkey"></td>
283          <td></td>
284          <td class="paramtype">int&nbsp;</td>
285          <td class="paramname"> <em>c</em> = <code>5</code></td><td>&nbsp;</td>
286        </tr>
287        <tr>
288          <td></td>
289          <td>)</td>
290          <td></td><td></td><td></td>
291        </tr>
292      </table>
293</div>
294<div class="memdoc">
295<p>Initializing the mixture by a random pick of centroids from data </p>
296<dl><dt><b>Parameters:</b></dt><dd>
297  <table border="0" cellspacing="2" cellpadding="0">
298    <tr><td valign="top"></td><td valign="top"><em>Com0</em>&nbsp;</td><td>Initial component - necessary to determine its type. </td></tr>
299    <tr><td valign="top"></td><td valign="top"><em>Data</em>&nbsp;</td><td>Data on which the initialization will be done </td></tr>
300    <tr><td valign="top"></td><td valign="top"><em>c</em>&nbsp;</td><td>Initial number of components, default=5 </td></tr>
301  </table>
302  </dd>
303</dl>
304
305<p>References <a class="el" href="exp__family_8h_source.html#l00107">bdm::BMEF::_copy_()</a>, <a class="el" href="mixtures_8h_source.html#l00058">build_est()</a>, <a class="el" href="mixtures_8h_source.html#l00047">Coms</a>, <a class="el" href="mixtures_8h_source.html#l00051">est</a>, <a class="el" href="mixtures_8h_source.html#l00045">n</a>, <a class="el" href="exp__family_8h_source.html#l00363">bdm::multiBM::set_parameters()</a>, and <a class="el" href="mixtures_8h_source.html#l00049">weights</a>.</p>
306
307<p>Referenced by <a class="el" href="merger_8cpp_source.html#l00064">bdm::merger_mix::merge()</a>.</p>
308
309</div>
310</div>
311<a class="anchor" id="ada724da464a75e07521941e430929efa"></a><!-- doxytag: member="bdm::MixEF::logpred" ref="ada724da464a75e07521941e430929efa" args="(const vec &amp;dt) const " -->
312<div class="memitem">
313<div class="memproto">
314      <table class="memname">
315        <tr>
316          <td class="memname">double bdm::MixEF::logpred </td>
317          <td>(</td>
318          <td class="paramtype">const vec &amp;&nbsp;</td>
319          <td class="paramname"> <em>dt</em></td>
320          <td>&nbsp;)&nbsp;</td>
321          <td> const<code> [virtual]</code></td>
322        </tr>
323      </table>
324</div>
325<div class="memdoc">
326<p>Evaluates predictive log-likelihood of the given data record I.e. marginal likelihood of the data with the posterior integrated out. </p>
327
328<p>Reimplemented from <a class="el" href="classbdm_1_1BM.html#a50257e0c1e5b5c73153ea6e716ad8ae0">bdm::BM</a>.</p>
329
330<p>References <a class="el" href="mixtures_8h_source.html#l00047">Coms</a>, <a class="el" href="exp__family_8h_source.html#l00294">bdm::eDirich::mean()</a>, <a class="el" href="exp__family_8h_source.html#l00361">bdm::multiBM::posterior()</a>, and <a class="el" href="mixtures_8h_source.html#l00049">weights</a>.</p>
331
332<p>Referenced by <a class="el" href="merger_8h_source.html#l00344">bdm::merger_mix::evallog()</a>, and <a class="el" href="merger_8cpp_source.html#l00064">bdm::merger_mix::merge()</a>.</p>
333
334</div>
335</div>
336<hr/>The documentation for this class was generated from the following files:<ul>
337<li><a class="el" href="mixtures_8h_source.html">mixtures.h</a></li>
338<li>mixtures.cpp</li>
339</ul>
340</div>
341<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 13 23:08:56 2009 for mixpp by&nbsp;
342<a href="http://www.doxygen.org/index.html">
343<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
344</body>
345</html>
Note: See TracBrowser for help on using the browser.