root/doc/html/classmmix.html @ 210

Revision 210, 16.1 kB (checked in by smidl, 16 years ago)

dokumentace

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: mmix 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 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&nbsp;List</span></a></li>
20      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
21      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
22    </ul>
23  </div>
24</div>
25<div class="contents">
26<h1>mmix Class Reference</h1><!-- doxytag: class="mmix" --><!-- doxytag: inherits="mpdf" -->Mixture of mpdfs with constant weights, all mpdfs are of equal type. 
27<a href="#_details">More...</a>
28<p>
29<code>#include &lt;<a class="el" href="emix_8h-source.html">emix.h</a>&gt;</code>
30<p>
31<div class="dynheader">
32Inheritance diagram for mmix:</div>
33<div class="dynsection">
34<p><center><img src="classmmix__inherit__graph.png" border="0" usemap="#mmix__inherit__map" alt="Inheritance graph"></center>
35<map name="mmix__inherit__map">
36<area shape="rect" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies." alt="" coords="7,7,60,33"></map>
37<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>
38<div class="dynheader">
39Collaboration diagram for mmix:</div>
40<div class="dynsection">
41<p><center><img src="classmmix__coll__graph.png" border="0" usemap="#mmix__coll__map" alt="Collaboration graph"></center>
42<map name="mmix__coll__map">
43<area shape="rect" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies." alt="" coords="5,204,59,231"><area shape="rect" href="classRV.html" title="Class representing variables, most often random variables." alt="" coords="36,7,73,33"><area shape="rect" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density." alt="" coords="71,105,119,132"><area shape="rect" href="classemix.html" title="Mixture of epdfs." alt="" coords="83,204,133,231"></map>
44<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>
45
46<p>
47<a href="classmmix-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="6769a962f1f4d0ecc5b903b5f7d26ad3"></a><!-- doxytag: member="mmix::mmix" ref="6769a962f1f4d0ecc5b903b5f7d26ad3" args="(RV &amp;rv, RV &amp;rvc)" -->
51&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmmix.html#6769a962f1f4d0ecc5b903b5f7d26ad3">mmix</a> (<a class="el" href="classRV.html">RV</a> &amp;<a class="el" href="classmpdf.html#f6687c07ff07d47812dd565368ca59eb">rv</a>, <a class="el" href="classRV.html">RV</a> &amp;<a class="el" href="classmpdf.html#acb7dda792b3cd5576f39fa3129abbab">rvc</a>)</td></tr>
52
53<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default constructor. <br></td></tr>
54<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e7681490a5c5b2d0a43f4e5842e10a9d"></a><!-- doxytag: member="mmix::set_parameters" ref="e7681490a5c5b2d0a43f4e5842e10a9d" args="(const vec &amp;w, const Array&lt; mpdf * &gt; &amp;Coms)" -->
55void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmmix.html#e7681490a5c5b2d0a43f4e5842e10a9d">set_parameters</a> (const vec &amp;w, const Array&lt; <a class="el" href="classmpdf.html">mpdf</a> * &gt; &amp;<a class="el" href="classmmix.html#460632c7a0afd41b7840902181a7d85f">Coms</a>)</td></tr>
56
57<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set weights <code>w</code> and components <code>R</code>. <br></td></tr>
58<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1a66629ec5c2b6f4740606cf737f0193"></a><!-- doxytag: member="mmix::condition" ref="1a66629ec5c2b6f4740606cf737f0193" args="(const vec &amp;cond)" -->
59void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmmix.html#1a66629ec5c2b6f4740606cf737f0193">condition</a> (const vec &amp;cond)</td></tr>
60
61<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Update <code>ep</code> so that it represents this <a class="el" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> conditioned on <code>rvc</code> = cond. <br></td></tr>
62<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual vec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmpdf.html#3f172b79ec4a5ebc87898a5381141f1b">samplecond</a> (const vec &amp;cond, double &amp;ll)</td></tr>
63
64<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the required moment of the <a class="el" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a><a href="#3f172b79ec4a5ebc87898a5381141f1b"></a><br></td></tr>
65<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual mat&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmpdf.html#0e37163660f93df2a4d723cedb1da89c">samplecond</a> (const vec &amp;cond, vec &amp;ll, int N)</td></tr>
66
67<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns.  <a href="#0e37163660f93df2a4d723cedb1da89c"></a><br></td></tr>
68<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="80b738ece5bd4f8c4edaee4b38906f91"></a><!-- doxytag: member="mmix::evalcond" ref="80b738ece5bd4f8c4edaee4b38906f91" args="(const vec &amp;dt, const vec &amp;cond)" -->
69virtual double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmpdf.html#80b738ece5bd4f8c4edaee4b38906f91">evalcond</a> (const vec &amp;dt, const vec &amp;cond)</td></tr>
70
71<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Shortcut for conditioning and evaluation of the internal <a class="el" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>. In some cases, this operation can be implemented efficiently. <br></td></tr>
72<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b7b2da35080cd15f1be365b805e7277e"></a><!-- doxytag: member="mmix::evalcond_m" ref="b7b2da35080cd15f1be365b805e7277e" args="(const mat &amp;Dt, const vec &amp;cond)" -->
73virtual vec&nbsp;</td><td class="memItemRight" valign="bottom"><b>evalcond_m</b> (const mat &amp;Dt, const vec &amp;cond)</td></tr>
74
75<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="15ef062183b1ccdf794732d5fa0b77cd"></a><!-- doxytag: member="mmix::_rvc" ref="15ef062183b1ccdf794732d5fa0b77cd" args="() const " -->
76<a class="el" href="classRV.html">RV</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmpdf.html#15ef062183b1ccdf794732d5fa0b77cd">_rvc</a> () const </td></tr>
77
78<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">access function <br></td></tr>
79<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="71256ffb5fbd08f41d650e606a5bd585"></a><!-- doxytag: member="mmix::_rv" ref="71256ffb5fbd08f41d650e606a5bd585" args="() const " -->
80<a class="el" href="classRV.html">RV</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmpdf.html#71256ffb5fbd08f41d650e606a5bd585">_rv</a> () const </td></tr>
81
82<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">access function <br></td></tr>
83<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e17780ee5b2cfe05922a6c56af1462f8"></a><!-- doxytag: member="mmix::_epdf" ref="e17780ee5b2cfe05922a6c56af1462f8" args="()" -->
84<a class="el" href="classepdf.html">epdf</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmpdf.html#e17780ee5b2cfe05922a6c56af1462f8">_epdf</a> ()</td></tr>
85
86<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">access function <br></td></tr>
87<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
88<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="460632c7a0afd41b7840902181a7d85f"></a><!-- doxytag: member="mmix::Coms" ref="460632c7a0afd41b7840902181a7d85f" args="" -->
89Array&lt; <a class="el" href="classmpdf.html">mpdf</a> * &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmmix.html#460632c7a0afd41b7840902181a7d85f">Coms</a></td></tr>
90
91<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Component (epdfs). <br></td></tr>
92<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="507a5e6df53e6e9a6a330f1271cf0914"></a><!-- doxytag: member="mmix::Epdf" ref="507a5e6df53e6e9a6a330f1271cf0914" args="" -->
93<a class="el" href="classemix.html">emix</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmmix.html#507a5e6df53e6e9a6a330f1271cf0914">Epdf</a></td></tr>
94
95<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Internal <a class="el" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>. <br></td></tr>
96<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f6687c07ff07d47812dd565368ca59eb"></a><!-- doxytag: member="mmix::rv" ref="f6687c07ff07d47812dd565368ca59eb" args="" -->
97<a class="el" href="classRV.html">RV</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmpdf.html#f6687c07ff07d47812dd565368ca59eb">rv</a></td></tr>
98
99<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">modeled random variable <br></td></tr>
100<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="acb7dda792b3cd5576f39fa3129abbab"></a><!-- doxytag: member="mmix::rvc" ref="acb7dda792b3cd5576f39fa3129abbab" args="" -->
101<a class="el" href="classRV.html">RV</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmpdf.html#acb7dda792b3cd5576f39fa3129abbab">rvc</a></td></tr>
102
103<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">random variable in condition <br></td></tr>
104<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7aa894208a32f3487827df6d5054424c"></a><!-- doxytag: member="mmix::ep" ref="7aa894208a32f3487827df6d5054424c" args="" -->
105<a class="el" href="classepdf.html">epdf</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmpdf.html#7aa894208a32f3487827df6d5054424c">ep</a></td></tr>
106
107<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">pointer to internal <a class="el" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> <br></td></tr>
108</table>
109<hr><a name="_details"></a><h2>Detailed Description</h2>
110Mixture of mpdfs with constant weights, all mpdfs are of equal type.
111<p>
112<hr><h2>Member Function Documentation</h2>
113<a class="anchor" name="3f172b79ec4a5ebc87898a5381141f1b"></a><!-- doxytag: member="mmix::samplecond" ref="3f172b79ec4a5ebc87898a5381141f1b" args="(const vec &amp;cond, double &amp;ll)" -->
114<div class="memitem">
115<div class="memproto">
116      <table class="memname">
117        <tr>
118          <td class="memname">virtual vec mpdf::samplecond           </td>
119          <td>(</td>
120          <td class="paramtype">const vec &amp;&nbsp;</td>
121          <td class="paramname"> <em>cond</em>, </td>
122        </tr>
123        <tr>
124          <td class="paramkey"></td>
125          <td></td>
126          <td class="paramtype">double &amp;&nbsp;</td>
127          <td class="paramname"> <em>ll</em></td><td>&nbsp;</td>
128        </tr>
129        <tr>
130          <td></td>
131          <td>)</td>
132          <td></td><td></td><td><code> [inline, virtual, inherited]</code></td>
133        </tr>
134      </table>
135</div>
136<div class="memdoc">
137
138<p>
139Returns the required moment of the <a class="el" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>.
140<p>
141Returns a sample from the density conditioned on <code>cond</code>, <img class="formulaInl" alt="$x \sim epdf(rv|cond)$" src="form_10.png">. <dl compact><dt><b>Parameters:</b></dt><dd>
142  <table border="0" cellspacing="2" cellpadding="0">
143    <tr><td valign="top"></td><td valign="top"><em>cond</em>&nbsp;</td><td>is numeric value of <code>rv</code> </td></tr>
144    <tr><td valign="top"></td><td valign="top"><em>ll</em>&nbsp;</td><td>is a return value of log-likelihood of the sample. </td></tr>
145  </table>
146</dl>
147
148<p>Reimplemented in <a class="el" href="classmprod.html#a48887eb8738a9e5550bfc38eb8e9d68">mprod</a>.</p>
149
150<p>References <a class="el" href="libBM_8h-source.html#l00229">mpdf::condition()</a>, <a class="el" href="libBM_8h-source.html#l00210">mpdf::ep</a>, <a class="el" href="classepdf.html#6aef3eca74899692503769c18add1a4c">epdf::evalpdflog()</a>, and <a class="el" href="classepdf.html#8019654e494bf5e458f6fb947e11b262">epdf::sample()</a>.</p>
151
152<p>Referenced by <a class="el" href="libPF_8h-source.html#l00138">MPF&lt; BM_T &gt;::bayes()</a>, and <a class="el" href="libPF_8cpp-source.html#l00007">PF::bayes()</a>.</p>
153
154</div>
155</div><p>
156<a class="anchor" name="0e37163660f93df2a4d723cedb1da89c"></a><!-- doxytag: member="mmix::samplecond" ref="0e37163660f93df2a4d723cedb1da89c" args="(const vec &amp;cond, vec &amp;ll, int N)" -->
157<div class="memitem">
158<div class="memproto">
159      <table class="memname">
160        <tr>
161          <td class="memname">virtual mat mpdf::samplecond           </td>
162          <td>(</td>
163          <td class="paramtype">const vec &amp;&nbsp;</td>
164          <td class="paramname"> <em>cond</em>, </td>
165        </tr>
166        <tr>
167          <td class="paramkey"></td>
168          <td></td>
169          <td class="paramtype">vec &amp;&nbsp;</td>
170          <td class="paramname"> <em>ll</em>, </td>
171        </tr>
172        <tr>
173          <td class="paramkey"></td>
174          <td></td>
175          <td class="paramtype">int&nbsp;</td>
176          <td class="paramname"> <em>N</em></td><td>&nbsp;</td>
177        </tr>
178        <tr>
179          <td></td>
180          <td>)</td>
181          <td></td><td></td><td><code> [inline, virtual, inherited]</code></td>
182        </tr>
183      </table>
184</div>
185<div class="memdoc">
186
187<p>
188Returns.
189<p>
190<dl compact><dt><b>Parameters:</b></dt><dd>
191  <table border="0" cellspacing="2" cellpadding="0">
192    <tr><td valign="top"></td><td valign="top"><em>N</em>&nbsp;</td><td>samples from the density conditioned on <code>cond</code>, <img class="formulaInl" alt="$x \sim epdf(rv|cond)$" src="form_10.png">. </td></tr>
193    <tr><td valign="top"></td><td valign="top"><em>cond</em>&nbsp;</td><td>is numeric value of <code>rv</code> </td></tr>
194    <tr><td valign="top"></td><td valign="top"><em>ll</em>&nbsp;</td><td>is a return value of log-likelihood of the sample. </td></tr>
195  </table>
196</dl>
197
198<p>Reimplemented in <a class="el" href="classmprod.html#e171c40e210539c2af01d6237785620b">mprod</a>.</p>
199
200<p>References <a class="el" href="libBM_8h-source.html#l00229">mpdf::condition()</a>, <a class="el" href="libBM_8h-source.html#l00073">RV::count()</a>, <a class="el" href="libBM_8h-source.html#l00210">mpdf::ep</a>, <a class="el" href="classepdf.html#6aef3eca74899692503769c18add1a4c">epdf::evalpdflog()</a>, <a class="el" href="libBM_8h-source.html#l00206">mpdf::rv</a>, and <a class="el" href="classepdf.html#8019654e494bf5e458f6fb947e11b262">epdf::sample()</a>.</p>
201
202</div>
203</div><p>
204<hr>The documentation for this class was generated from the following file:<ul>
205<li>work/git/mixpp/bdm/stat/<a class="el" href="emix_8h-source.html">emix.h</a></ul>
206</div>
207<hr size="1"><address style="text-align: right;"><small>Generated on Wed Nov 12 19:18:56 2008 for mixpp by&nbsp;
208<a href="http://www.doxygen.org/index.html">
209<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
210</body>
211</html>
Note: See TracBrowser for help on using the browser.