root/doc/html/classmprod.html @ 210

Revision 210, 19.0 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: mprod 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>mprod Class Reference</h1><!-- doxytag: class="mprod" --><!-- doxytag: inherits="compositepdf,mpdf" -->Chain rule decomposition of <a class="el" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>
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 mprod:</div>
33<div class="dynsection">
34<p><center><img src="classmprod__inherit__graph.png" border="0" usemap="#mprod__inherit__map" alt="Inheritance graph"></center>
35<map name="mprod__inherit__map">
36<area shape="rect" href="classcompositepdf.html" title="Abstract composition of pdfs, a base for specific classes this abstract class is..." alt="" coords="5,7,112,33"><area shape="rect" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies." alt="" coords="136,7,189,33"></map>
37<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>
38<div class="dynheader">
39Collaboration diagram for mprod:</div>
40<div class="dynsection">
41<p><center><img src="classmprod__coll__graph.png" border="0" usemap="#mprod__coll__map" alt="Collaboration graph"></center>
42<map name="mprod__coll__map">
43<area shape="rect" href="classcompositepdf.html" title="Abstract composition of pdfs, a base for specific classes this abstract class is..." alt="" coords="5,204,112,231"><area shape="rect" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies." alt="" coords="136,204,189,231"><area shape="rect" href="classRV.html" title="Class representing variables, most often random variables." alt="" coords="137,7,175,33"><area shape="rect" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density." alt="" coords="172,105,220,132"></map>
44<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>
45
46<p>
47<a href="classmprod-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="419b303581a91ad85200bdcb4b3186f4"></a><!-- doxytag: member="mprod::mprod" ref="419b303581a91ad85200bdcb4b3186f4" args="(Array&lt; mpdf * &gt; mFacs)" -->
51&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmprod.html#419b303581a91ad85200bdcb4b3186f4">mprod</a> (Array&lt; <a class="el" href="classmpdf.html">mpdf</a> * &gt; mFacs)</td></tr>
52
53<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor from list of mFacs,. <br></td></tr>
54<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1e662c8d90a96bf19235a05373d6887a"></a><!-- doxytag: member="mprod::evalcond" ref="1e662c8d90a96bf19235a05373d6887a" args="(const vec &amp;val, const vec &amp;cond)" -->
55double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmprod.html#1e662c8d90a96bf19235a05373d6887a">evalcond</a> (const vec &amp;val, const vec &amp;cond)</td></tr>
56
57<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>
58<tr><td class="memItemLeft" nowrap align="right" valign="top">vec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmprod.html#a48887eb8738a9e5550bfc38eb8e9d68">samplecond</a> (const vec &amp;cond, double &amp;ll)</td></tr>
59
60<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="#a48887eb8738a9e5550bfc38eb8e9d68"></a><br></td></tr>
61<tr><td class="memItemLeft" nowrap align="right" valign="top">mat&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmprod.html#e171c40e210539c2af01d6237785620b">samplecond</a> (const vec &amp;cond, vec &amp;ll, int N)</td></tr>
62
63<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns.  <a href="#e171c40e210539c2af01d6237785620b"></a><br></td></tr>
64<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classRV.html">RV</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcompositepdf.html#635d219fb3e32852400d6f98aa4bdc93">getrv</a> (bool checkoverlap=false)</td></tr>
65
66<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">find common rv, flag  <a href="#635d219fb3e32852400d6f98aa4bdc93"></a><br></td></tr>
67<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5a4479785c1fdb2cc351fbea07b899ac"></a><!-- doxytag: member="mprod::setrvc" ref="5a4479785c1fdb2cc351fbea07b899ac" args="(const RV &amp;rv, RV &amp;rvc)" -->
68void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcompositepdf.html#5a4479785c1fdb2cc351fbea07b899ac">setrvc</a> (const <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>
69
70<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">common rvc of all mpdfs is written to rvc <br></td></tr>
71<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0f95a0cc6ab40611f46804682446ed83"></a><!-- doxytag: member="mprod::condition" ref="0f95a0cc6ab40611f46804682446ed83" args="(const vec &amp;cond)" -->
72virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmpdf.html#0f95a0cc6ab40611f46804682446ed83">condition</a> (const vec &amp;cond)</td></tr>
73
74<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>
75<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b7b2da35080cd15f1be365b805e7277e"></a><!-- doxytag: member="mprod::evalcond_m" ref="b7b2da35080cd15f1be365b805e7277e" args="(const mat &amp;Dt, const vec &amp;cond)" -->
76virtual vec&nbsp;</td><td class="memItemRight" valign="bottom"><b>evalcond_m</b> (const mat &amp;Dt, const vec &amp;cond)</td></tr>
77
78<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="15ef062183b1ccdf794732d5fa0b77cd"></a><!-- doxytag: member="mprod::_rvc" ref="15ef062183b1ccdf794732d5fa0b77cd" args="() const " -->
79<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>
80
81<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">access function <br></td></tr>
82<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="71256ffb5fbd08f41d650e606a5bd585"></a><!-- doxytag: member="mprod::_rv" ref="71256ffb5fbd08f41d650e606a5bd585" args="() const " -->
83<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>
84
85<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">access function <br></td></tr>
86<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e17780ee5b2cfe05922a6c56af1462f8"></a><!-- doxytag: member="mprod::_epdf" ref="e17780ee5b2cfe05922a6c56af1462f8" args="()" -->
87<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>
88
89<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">access function <br></td></tr>
90<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
91<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0883ce383e8475546df138719918f70e"></a><!-- doxytag: member="mprod::epdfs" ref="0883ce383e8475546df138719918f70e" args="" -->
92Array&lt; <a class="el" href="classepdf.html">epdf</a> * &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmprod.html#0883ce383e8475546df138719918f70e">epdfs</a></td></tr>
93
94<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">pointers to epdfs - shortcut to <a class="el" href="classcompositepdf.html#637877061b917a16a0421bb5c4cd480d" title="Elements of composition.">mpdfs()</a>.<a class="el" href="classmpdf.html#e17780ee5b2cfe05922a6c56af1462f8" title="access function">_epdf()</a> <br></td></tr>
95<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5334777dda3dad9b9fa73e22e8d0f24c"></a><!-- doxytag: member="mprod::dls" ref="5334777dda3dad9b9fa73e22e8d0f24c" args="" -->
96Array&lt; <a class="el" href="classdatalink__m2m.html">datalink_m2m</a> * &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmprod.html#5334777dda3dad9b9fa73e22e8d0f24c">dls</a></td></tr>
97
98<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Data link for each mpdfs. <br></td></tr>
99<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c1646fe41ff5934d010e54ccaa46133f"></a><!-- doxytag: member="mprod::n" ref="c1646fe41ff5934d010e54ccaa46133f" args="" -->
100int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcompositepdf.html#c1646fe41ff5934d010e54ccaa46133f">n</a></td></tr>
101
102<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Number of mpdfs in the composite. <br></td></tr>
103<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="637877061b917a16a0421bb5c4cd480d"></a><!-- doxytag: member="mprod::mpdfs" ref="637877061b917a16a0421bb5c4cd480d" args="" -->
104Array&lt; <a class="el" href="classmpdf.html">mpdf</a> * &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcompositepdf.html#637877061b917a16a0421bb5c4cd480d">mpdfs</a></td></tr>
105
106<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Elements of composition. <br></td></tr>
107<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f6687c07ff07d47812dd565368ca59eb"></a><!-- doxytag: member="mprod::rv" ref="f6687c07ff07d47812dd565368ca59eb" args="" -->
108<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>
109
110<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">modeled random variable <br></td></tr>
111<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="acb7dda792b3cd5576f39fa3129abbab"></a><!-- doxytag: member="mprod::rvc" ref="acb7dda792b3cd5576f39fa3129abbab" args="" -->
112<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>
113
114<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">random variable in condition <br></td></tr>
115<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7aa894208a32f3487827df6d5054424c"></a><!-- doxytag: member="mprod::ep" ref="7aa894208a32f3487827df6d5054424c" args="" -->
116<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>
117
118<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>
119</table>
120<hr><a name="_details"></a><h2>Detailed Description</h2>
121Chain rule decomposition of <a class="el" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>.
122<p>
123Probability density in the form of Chain-rule decomposition: \[ f(x_1,x_2,x_3) = f(x_1|x_2,x_3)f(x_2,x_3)f(x_3) \] Note that <hr><h2>Member Function Documentation</h2>
124<a class="anchor" name="a48887eb8738a9e5550bfc38eb8e9d68"></a><!-- doxytag: member="mprod::samplecond" ref="a48887eb8738a9e5550bfc38eb8e9d68" args="(const vec &amp;cond, double &amp;ll)" -->
125<div class="memitem">
126<div class="memproto">
127      <table class="memname">
128        <tr>
129          <td class="memname">vec mprod::samplecond           </td>
130          <td>(</td>
131          <td class="paramtype">const vec &amp;&nbsp;</td>
132          <td class="paramname"> <em>cond</em>, </td>
133        </tr>
134        <tr>
135          <td class="paramkey"></td>
136          <td></td>
137          <td class="paramtype">double &amp;&nbsp;</td>
138          <td class="paramname"> <em>ll</em></td><td>&nbsp;</td>
139        </tr>
140        <tr>
141          <td></td>
142          <td>)</td>
143          <td></td><td></td><td><code> [inline, virtual]</code></td>
144        </tr>
145      </table>
146</div>
147<div class="memdoc">
148
149<p>
150Returns the required moment of the <a class="el" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>.
151<p>
152Returns 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>
153  <table border="0" cellspacing="2" cellpadding="0">
154    <tr><td valign="top"></td><td valign="top"><em>cond</em>&nbsp;</td><td>is numeric value of <code>rv</code> </td></tr>
155    <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>
156  </table>
157</dl>
158
159<p>Reimplemented from <a class="el" href="classmpdf.html#3f172b79ec4a5ebc87898a5381141f1b">mpdf</a>.</p>
160
161<p>References <a class="el" href="libBM_8h-source.html#l00073">RV::count()</a>, <a class="el" href="emix_8h-source.html#l00152">dls</a>, <a class="el" href="emix_8h-source.html#l00150">epdfs</a>, <a class="el" href="libBM_8h-source.html#l00349">compositepdf::mpdfs</a>, <a class="el" href="libBM_8h-source.html#l00347">compositepdf::n</a>, and <a class="el" href="libBM_8h-source.html#l00206">mpdf::rv</a>.</p>
162
163<p>Referenced by <a class="el" href="emix_8h-source.html#l00202">samplecond()</a>.</p>
164
165</div>
166</div><p>
167<a class="anchor" name="e171c40e210539c2af01d6237785620b"></a><!-- doxytag: member="mprod::samplecond" ref="e171c40e210539c2af01d6237785620b" args="(const vec &amp;cond, vec &amp;ll, int N)" -->
168<div class="memitem">
169<div class="memproto">
170      <table class="memname">
171        <tr>
172          <td class="memname">mat mprod::samplecond           </td>
173          <td>(</td>
174          <td class="paramtype">const vec &amp;&nbsp;</td>
175          <td class="paramname"> <em>cond</em>, </td>
176        </tr>
177        <tr>
178          <td class="paramkey"></td>
179          <td></td>
180          <td class="paramtype">vec &amp;&nbsp;</td>
181          <td class="paramname"> <em>ll</em>, </td>
182        </tr>
183        <tr>
184          <td class="paramkey"></td>
185          <td></td>
186          <td class="paramtype">int&nbsp;</td>
187          <td class="paramname"> <em>N</em></td><td>&nbsp;</td>
188        </tr>
189        <tr>
190          <td></td>
191          <td>)</td>
192          <td></td><td></td><td><code> [inline, virtual]</code></td>
193        </tr>
194      </table>
195</div>
196<div class="memdoc">
197
198<p>
199Returns.
200<p>
201<dl compact><dt><b>Parameters:</b></dt><dd>
202  <table border="0" cellspacing="2" cellpadding="0">
203    <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>
204    <tr><td valign="top"></td><td valign="top"><em>cond</em>&nbsp;</td><td>is numeric value of <code>rv</code> </td></tr>
205    <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>
206  </table>
207</dl>
208
209<p>Reimplemented from <a class="el" href="classmpdf.html#0e37163660f93df2a4d723cedb1da89c">mpdf</a>.</p>
210
211<p>References <a class="el" href="libBM_8h-source.html#l00073">RV::count()</a>, <a class="el" href="libBM_8h-source.html#l00206">mpdf::rv</a>, and <a class="el" href="emix_8h-source.html#l00184">samplecond()</a>.</p>
212
213</div>
214</div><p>
215<a class="anchor" name="635d219fb3e32852400d6f98aa4bdc93"></a><!-- doxytag: member="mprod::getrv" ref="635d219fb3e32852400d6f98aa4bdc93" args="(bool checkoverlap=false)" -->
216<div class="memitem">
217<div class="memproto">
218      <table class="memname">
219        <tr>
220          <td class="memname"><a class="el" href="classRV.html">RV</a> compositepdf::getrv           </td>
221          <td>(</td>
222          <td class="paramtype">bool&nbsp;</td>
223          <td class="paramname"> <em>checkoverlap</em> = <code>false</code>          </td>
224          <td>&nbsp;)&nbsp;</td>
225          <td><code> [inherited]</code></td>
226        </tr>
227      </table>
228</div>
229<div class="memdoc">
230
231<p>
232find common rv, flag
233<p>
234<dl compact><dt><b>Parameters:</b></dt><dd>
235  <table border="0" cellspacing="2" cellpadding="0">
236    <tr><td valign="top"></td><td valign="top"><em>checkoverlap</em>&nbsp;</td><td>modifies whether overlaps are acceptable </td></tr>
237  </table>
238</dl>
239
240<p>References <a class="el" href="libBM_8cpp-source.html#l00051">RV::add()</a>, <a class="el" href="libBM_8h-source.html#l00349">compositepdf::mpdfs</a>, and <a class="el" href="libBM_8h-source.html#l00347">compositepdf::n</a>.</p>
241
242</div>
243</div><p>
244<hr>The documentation for this class was generated from the following file:<ul>
245<li>work/git/mixpp/bdm/stat/<a class="el" href="emix_8h-source.html">emix.h</a></ul>
246</div>
247<hr size="1"><address style="text-align: right;"><small>Generated on Wed Nov 12 19:18:56 2008 for mixpp by&nbsp;
248<a href="http://www.doxygen.org/index.html">
249<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
250</body>
251</html>
Note: See TracBrowser for help on using the browser.