[33] | 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"> |
---|
[171] | 3 | <title>mixpp: mprod Class Reference</title> |
---|
[33] | 4 | <link href="doxygen.css" rel="stylesheet" type="text/css"> |
---|
| 5 | <link href="tabs.css" rel="stylesheet" type="text/css"> |
---|
| 6 | </head><body> |
---|
[139] | 7 | <!-- Generated by Doxygen 1.5.6 --> |
---|
[91] | 8 | <div class="navigation" id="top"> |
---|
| 9 | <div class="tabs"> |
---|
| 10 | <ul> |
---|
| 11 | <li><a href="index.html"><span>Main Page</span></a></li> |
---|
| 12 | <li><a href="pages.html"><span>Related Pages</span></a></li> |
---|
| 13 | <li class="current"><a href="annotated.html"><span>Classes</span></a></li> |
---|
| 14 | <li><a href="files.html"><span>Files</span></a></li> |
---|
| 15 | </ul> |
---|
| 16 | </div> |
---|
| 17 | <div class="tabs"> |
---|
| 18 | <ul> |
---|
| 19 | <li><a href="annotated.html"><span>Class List</span></a></li> |
---|
| 20 | <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> |
---|
| 21 | <li><a href="functions.html"><span>Class Members</span></a></li> |
---|
| 22 | </ul> |
---|
| 23 | </div> |
---|
[33] | 24 | </div> |
---|
[91] | 25 | <div class="contents"> |
---|
[171] | 26 | <h1>mprod Class Reference</h1><!-- doxytag: class="mprod" --><!-- doxytag: inherits="mpdf" -->Chain rule decomposition of <a class="el" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>. |
---|
[33] | 27 | <a href="#_details">More...</a> |
---|
| 28 | <p> |
---|
[171] | 29 | <code>#include <<a class="el" href="emix_8h-source.html">emix.h</a>></code> |
---|
[33] | 30 | <p> |
---|
| 31 | <div class="dynheader"> |
---|
[171] | 32 | Inheritance diagram for mprod:</div> |
---|
[33] | 33 | <div class="dynsection"> |
---|
[171] | 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="classmerger.html" title="Function for general combination of pdfs." alt="" coords="5,161,72,188"><area shape="rect" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies." alt="" coords="12,7,65,33"></map> |
---|
[33] | 37 | <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> |
---|
| 38 | <div class="dynheader"> |
---|
[171] | 39 | Collaboration diagram for mprod:</div> |
---|
[33] | 40 | <div class="dynsection"> |
---|
[171] | 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="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies." alt="" coords="11,204,64,231"><area shape="rect" href="classRV.html" title="Class representing variables, most often random variables." alt="" coords="24,7,61,33"><area shape="rect" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density." alt="" coords="59,105,107,132"></map> |
---|
[33] | 44 | <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> |
---|
| 45 | |
---|
| 46 | <p> |
---|
[171] | 47 | <a href="classmprod-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> |
---|
[33] | 48 | <tr><td></td></tr> |
---|
| 49 | <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> |
---|
[171] | 50 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="37f028561c45ce5fd3a1351a911e31dc"></a><!-- doxytag: member="mprod::mprod" ref="37f028561c45ce5fd3a1351a911e31dc" args="(Array< mpdf * > mFacs, bool overlap=false)" --> |
---|
| 51 | </td><td class="memItemRight" valign="bottom"><a class="el" href="classmprod.html#37f028561c45ce5fd3a1351a911e31dc">mprod</a> (Array< <a class="el" href="classmpdf.html">mpdf</a> * > mFacs, bool overlap=false)</td></tr> |
---|
[33] | 52 | |
---|
[171] | 53 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor from list of mFacs, Additional parameter overlap is left for future use. Do not set to true for <a class="el" href="classmprod.html" title="Chain rule decomposition of epdf.">mprod</a>. <br></td></tr> |
---|
| 54 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c15df5d0c7bb9dc82dd78f037b2550a8"></a><!-- doxytag: member="mprod::evalpdflog" ref="c15df5d0c7bb9dc82dd78f037b2550a8" args="(const vec &val) const " --> |
---|
| 55 | double </td><td class="memItemRight" valign="bottom"><b>evalpdflog</b> (const vec &val) const </td></tr> |
---|
[33] | 56 | |
---|
[171] | 57 | <tr><td class="memItemLeft" nowrap align="right" valign="top">vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classmprod.html#a48887eb8738a9e5550bfc38eb8e9d68">samplecond</a> (const vec &cond, double &ll)</td></tr> |
---|
[139] | 58 | |
---|
[171] | 59 | <tr><td class="mdescLeft"> </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> |
---|
| 60 | <tr><td class="memItemLeft" nowrap align="right" valign="top">mat </td><td class="memItemRight" valign="bottom"><a class="el" href="classmprod.html#e171c40e210539c2af01d6237785620b">samplecond</a> (const vec &cond, vec &ll, int N)</td></tr> |
---|
| 61 | |
---|
| 62 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns. <a href="#e171c40e210539c2af01d6237785620b"></a><br></td></tr> |
---|
| 63 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0f95a0cc6ab40611f46804682446ed83"></a><!-- doxytag: member="mprod::condition" ref="0f95a0cc6ab40611f46804682446ed83" args="(const vec &cond)" --> |
---|
[33] | 64 | virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classmpdf.html#0f95a0cc6ab40611f46804682446ed83">condition</a> (const vec &cond)</td></tr> |
---|
| 65 | |
---|
| 66 | <tr><td class="mdescLeft"> </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> |
---|
[171] | 67 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="80b738ece5bd4f8c4edaee4b38906f91"></a><!-- doxytag: member="mprod::evalcond" ref="80b738ece5bd4f8c4edaee4b38906f91" args="(const vec &dt, const vec &cond)" --> |
---|
[33] | 68 | virtual double </td><td class="memItemRight" valign="bottom"><a class="el" href="classmpdf.html#80b738ece5bd4f8c4edaee4b38906f91">evalcond</a> (const vec &dt, const vec &cond)</td></tr> |
---|
| 69 | |
---|
| 70 | <tr><td class="mdescLeft"> </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> |
---|
[171] | 71 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ec9c850305984582548e8deb64f0ffe8"></a><!-- doxytag: member="mprod::_rvc" ref="ec9c850305984582548e8deb64f0ffe8" args="()" --> |
---|
[33] | 72 | <a class="el" href="classRV.html">RV</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmpdf.html#ec9c850305984582548e8deb64f0ffe8">_rvc</a> ()</td></tr> |
---|
| 73 | |
---|
| 74 | <tr><td class="mdescLeft"> </td><td class="mdescRight">access function <br></td></tr> |
---|
[171] | 75 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1e71ad4c66d5884c82d4a3b06b42fe32"></a><!-- doxytag: member="mprod::_rv" ref="1e71ad4c66d5884c82d4a3b06b42fe32" args="()" --> |
---|
[162] | 76 | <a class="el" href="classRV.html">RV</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmpdf.html#1e71ad4c66d5884c82d4a3b06b42fe32">_rv</a> ()</td></tr> |
---|
| 77 | |
---|
| 78 | <tr><td class="mdescLeft"> </td><td class="mdescRight">access function <br></td></tr> |
---|
[171] | 79 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e17780ee5b2cfe05922a6c56af1462f8"></a><!-- doxytag: member="mprod::_epdf" ref="e17780ee5b2cfe05922a6c56af1462f8" args="()" --> |
---|
[33] | 80 | <a class="el" href="classepdf.html">epdf</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classmpdf.html#e17780ee5b2cfe05922a6c56af1462f8">_epdf</a> ()</td></tr> |
---|
| 81 | |
---|
| 82 | <tr><td class="mdescLeft"> </td><td class="mdescRight">access function <br></td></tr> |
---|
| 83 | <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> |
---|
[171] | 84 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7dcf1dde4a220f8c7b97ed987bff6c1f"></a><!-- doxytag: member="mprod::n" ref="7dcf1dde4a220f8c7b97ed987bff6c1f" args="" --> |
---|
| 85 | int </td><td class="memItemRight" valign="bottom"><b>n</b></td></tr> |
---|
| 86 | |
---|
| 87 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0883ce383e8475546df138719918f70e"></a><!-- doxytag: member="mprod::epdfs" ref="0883ce383e8475546df138719918f70e" args="" --> |
---|
| 88 | Array< <a class="el" href="classepdf.html">epdf</a> * > </td><td class="memItemRight" valign="bottom"><b>epdfs</b></td></tr> |
---|
| 89 | |
---|
| 90 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2389c7585ac5d0d79587625186818889"></a><!-- doxytag: member="mprod::mpdfs" ref="2389c7585ac5d0d79587625186818889" args="" --> |
---|
| 91 | Array< <a class="el" href="classmpdf.html">mpdf</a> * > </td><td class="memItemRight" valign="bottom"><b>mpdfs</b></td></tr> |
---|
| 92 | |
---|
| 93 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c8f78fbcdb4e38ecd3197d2958082497"></a><!-- doxytag: member="mprod::rvinds" ref="c8f78fbcdb4e38ecd3197d2958082497" args="" --> |
---|
| 94 | Array< ivec > </td><td class="memItemRight" valign="bottom"><a class="el" href="classmprod.html#c8f78fbcdb4e38ecd3197d2958082497">rvinds</a></td></tr> |
---|
| 95 | |
---|
| 96 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Indeces of rvs in common rv. <br></td></tr> |
---|
| 97 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1725c7b497a27ab3c4889b846666b516"></a><!-- doxytag: member="mprod::rvcinrv" ref="1725c7b497a27ab3c4889b846666b516" args="" --> |
---|
| 98 | Array< ivec > </td><td class="memItemRight" valign="bottom"><a class="el" href="classmprod.html#1725c7b497a27ab3c4889b846666b516">rvcinrv</a></td></tr> |
---|
| 99 | |
---|
| 100 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Indeces of rvc in common rv. <br></td></tr> |
---|
| 101 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="cc85192d8abc01832937ed8b62e363a6"></a><!-- doxytag: member="mprod::rvcinds" ref="cc85192d8abc01832937ed8b62e363a6" args="" --> |
---|
| 102 | Array< ivec > </td><td class="memItemRight" valign="bottom"><a class="el" href="classmprod.html#cc85192d8abc01832937ed8b62e363a6">rvcinds</a></td></tr> |
---|
| 103 | |
---|
| 104 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Indeces of rvc in common rvc. <br></td></tr> |
---|
| 105 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f6687c07ff07d47812dd565368ca59eb"></a><!-- doxytag: member="mprod::rv" ref="f6687c07ff07d47812dd565368ca59eb" args="" --> |
---|
[33] | 106 | <a class="el" href="classRV.html">RV</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmpdf.html#f6687c07ff07d47812dd565368ca59eb">rv</a></td></tr> |
---|
| 107 | |
---|
| 108 | <tr><td class="mdescLeft"> </td><td class="mdescRight">modeled random variable <br></td></tr> |
---|
[171] | 109 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="acb7dda792b3cd5576f39fa3129abbab"></a><!-- doxytag: member="mprod::rvc" ref="acb7dda792b3cd5576f39fa3129abbab" args="" --> |
---|
[33] | 110 | <a class="el" href="classRV.html">RV</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmpdf.html#acb7dda792b3cd5576f39fa3129abbab">rvc</a></td></tr> |
---|
| 111 | |
---|
| 112 | <tr><td class="mdescLeft"> </td><td class="mdescRight">random variable in condition <br></td></tr> |
---|
[171] | 113 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7aa894208a32f3487827df6d5054424c"></a><!-- doxytag: member="mprod::ep" ref="7aa894208a32f3487827df6d5054424c" args="" --> |
---|
[33] | 114 | <a class="el" href="classepdf.html">epdf</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classmpdf.html#7aa894208a32f3487827df6d5054424c">ep</a></td></tr> |
---|
| 115 | |
---|
| 116 | <tr><td class="mdescLeft"> </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> |
---|
| 117 | </table> |
---|
| 118 | <hr><a name="_details"></a><h2>Detailed Description</h2> |
---|
[171] | 119 | Chain rule decomposition of <a class="el" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>. |
---|
[33] | 120 | <p> |
---|
[171] | 121 | Probability 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> |
---|
| 122 | <a class="anchor" name="a48887eb8738a9e5550bfc38eb8e9d68"></a><!-- doxytag: member="mprod::samplecond" ref="a48887eb8738a9e5550bfc38eb8e9d68" args="(const vec &cond, double &ll)" --> |
---|
[33] | 123 | <div class="memitem"> |
---|
| 124 | <div class="memproto"> |
---|
| 125 | <table class="memname"> |
---|
| 126 | <tr> |
---|
[171] | 127 | <td class="memname">vec mprod::samplecond </td> |
---|
[33] | 128 | <td>(</td> |
---|
[162] | 129 | <td class="paramtype">const vec & </td> |
---|
[33] | 130 | <td class="paramname"> <em>cond</em>, </td> |
---|
| 131 | </tr> |
---|
| 132 | <tr> |
---|
| 133 | <td class="paramkey"></td> |
---|
| 134 | <td></td> |
---|
| 135 | <td class="paramtype">double & </td> |
---|
| 136 | <td class="paramname"> <em>ll</em></td><td> </td> |
---|
| 137 | </tr> |
---|
| 138 | <tr> |
---|
| 139 | <td></td> |
---|
| 140 | <td>)</td> |
---|
[171] | 141 | <td></td><td></td><td><code> [inline, virtual]</code></td> |
---|
[33] | 142 | </tr> |
---|
| 143 | </table> |
---|
| 144 | </div> |
---|
| 145 | <div class="memdoc"> |
---|
| 146 | |
---|
| 147 | <p> |
---|
| 148 | 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>. |
---|
| 149 | <p> |
---|
| 150 | Returns 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> |
---|
| 151 | <table border="0" cellspacing="2" cellpadding="0"> |
---|
| 152 | <tr><td valign="top"></td><td valign="top"><em>cond</em> </td><td>is numeric value of <code>rv</code> </td></tr> |
---|
| 153 | <tr><td valign="top"></td><td valign="top"><em>ll</em> </td><td>is a return value of log-likelihood of the sample. </td></tr> |
---|
| 154 | </table> |
---|
| 155 | </dl> |
---|
| 156 | |
---|
[171] | 157 | <p>Reimplemented from <a class="el" href="classmpdf.html#3f172b79ec4a5ebc87898a5381141f1b">mpdf</a>.</p> |
---|
[33] | 158 | |
---|
[171] | 159 | <p>References <a class="el" href="libBM_8h-source.html#l00069">RV::count()</a>, <a class="el" href="libBM_8h-source.html#l00186">mpdf::rv</a>, <a class="el" href="emix_8h-source.html#l00083">rvcinds</a>, <a class="el" href="emix_8h-source.html#l00081">rvcinrv</a>, and <a class="el" href="emix_8h-source.html#l00079">rvinds</a>.</p> |
---|
[91] | 160 | |
---|
[171] | 161 | <p>Referenced by <a class="el" href="emix_8h-source.html#l00128">samplecond()</a>.</p> |
---|
| 162 | |
---|
[33] | 163 | </div> |
---|
| 164 | </div><p> |
---|
[171] | 165 | <a class="anchor" name="e171c40e210539c2af01d6237785620b"></a><!-- doxytag: member="mprod::samplecond" ref="e171c40e210539c2af01d6237785620b" args="(const vec &cond, vec &ll, int N)" --> |
---|
[139] | 166 | <div class="memitem"> |
---|
| 167 | <div class="memproto"> |
---|
| 168 | <table class="memname"> |
---|
| 169 | <tr> |
---|
[171] | 170 | <td class="memname">mat mprod::samplecond </td> |
---|
[139] | 171 | <td>(</td> |
---|
[162] | 172 | <td class="paramtype">const vec & </td> |
---|
[139] | 173 | <td class="paramname"> <em>cond</em>, </td> |
---|
| 174 | </tr> |
---|
| 175 | <tr> |
---|
| 176 | <td class="paramkey"></td> |
---|
| 177 | <td></td> |
---|
| 178 | <td class="paramtype">vec & </td> |
---|
| 179 | <td class="paramname"> <em>ll</em>, </td> |
---|
| 180 | </tr> |
---|
| 181 | <tr> |
---|
| 182 | <td class="paramkey"></td> |
---|
| 183 | <td></td> |
---|
| 184 | <td class="paramtype">int </td> |
---|
| 185 | <td class="paramname"> <em>N</em></td><td> </td> |
---|
| 186 | </tr> |
---|
| 187 | <tr> |
---|
| 188 | <td></td> |
---|
| 189 | <td>)</td> |
---|
[171] | 190 | <td></td><td></td><td><code> [inline, virtual]</code></td> |
---|
[139] | 191 | </tr> |
---|
| 192 | </table> |
---|
| 193 | </div> |
---|
| 194 | <div class="memdoc"> |
---|
| 195 | |
---|
| 196 | <p> |
---|
[145] | 197 | Returns. |
---|
[139] | 198 | <p> |
---|
| 199 | <dl compact><dt><b>Parameters:</b></dt><dd> |
---|
| 200 | <table border="0" cellspacing="2" cellpadding="0"> |
---|
[145] | 201 | <tr><td valign="top"></td><td valign="top"><em>N</em> </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> |
---|
[139] | 202 | <tr><td valign="top"></td><td valign="top"><em>cond</em> </td><td>is numeric value of <code>rv</code> </td></tr> |
---|
| 203 | <tr><td valign="top"></td><td valign="top"><em>ll</em> </td><td>is a return value of log-likelihood of the sample. </td></tr> |
---|
| 204 | </table> |
---|
| 205 | </dl> |
---|
| 206 | |
---|
[171] | 207 | <p>Reimplemented from <a class="el" href="classmpdf.html#0e37163660f93df2a4d723cedb1da89c">mpdf</a>.</p> |
---|
[139] | 208 | |
---|
[171] | 209 | <p>References <a class="el" href="libBM_8h-source.html#l00069">RV::count()</a>, <a class="el" href="libBM_8h-source.html#l00186">mpdf::rv</a>, and <a class="el" href="emix_8h-source.html#l00105">samplecond()</a>.</p> |
---|
| 210 | |
---|
[139] | 211 | </div> |
---|
| 212 | </div><p> |
---|
[171] | 213 | <hr>The documentation for this class was generated from the following files:<ul> |
---|
| 214 | <li>work/git/mixpp/bdm/stat/<a class="el" href="emix_8h-source.html">emix.h</a><li>work/git/mixpp/bdm/stat/emix.cpp</ul> |
---|
[91] | 215 | </div> |
---|
[171] | 216 | <hr size="1"><address style="text-align: right;"><small>Generated on Tue Sep 23 16:00:54 2008 for mixpp by |
---|
[33] | 217 | <a href="http://www.doxygen.org/index.html"> |
---|
[139] | 218 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address> |
---|
[33] | 219 | </body> |
---|
| 220 | </html> |
---|