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