root/doc/html/classmlnorm.html @ 167

Revision 162, 16.5 kB (checked in by smidl, 16 years ago)

opravy a 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: mlnorm&lt; sq_T &gt; Class Template 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>mlnorm&lt; sq_T &gt; Class Template Reference</h1><!-- doxytag: class="mlnorm" --><!-- doxytag: inherits="mEF" -->Normal distributed linear function with linear function of mean value;. 
27<a href="#_details">More...</a>
28<p>
29<code>#include &lt;<a class="el" href="libEF_8h-source.html">libEF.h</a>&gt;</code>
30<p>
31<div class="dynheader">
32Inheritance diagram for mlnorm&lt; sq_T &gt;:</div>
33<div class="dynsection">
34<p><center><img src="classmlnorm__inherit__graph.png" border="0" usemap="#mlnorm_3_01sq__T_01_4__inherit__map" alt="Inheritance graph"></center>
35<map name="mlnorm_3_01sq__T_01_4__inherit__map">
36<area shape="rect" href="classmEF.html" title="Exponential family model." alt="" coords="40,82,88,106"><area shape="rect" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies." alt="" coords="39,7,89,31"></map>
37<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>
38<div class="dynheader">
39Collaboration diagram for mlnorm&lt; sq_T &gt;:</div>
40<div class="dynsection">
41<p><center><img src="classmlnorm__coll__graph.png" border="0" usemap="#mlnorm_3_01sq__T_01_4__coll__map" alt="Collaboration graph"></center>
42<map name="mlnorm_3_01sq__T_01_4__coll__map">
43<area shape="rect" href="classmEF.html" title="Exponential family model." alt="" coords="40,263,88,287"><area shape="rect" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies." alt="" coords="39,186,89,210"><area shape="rect" href="classRV.html" title="Class representing variables, most often random variables." alt="" coords="51,7,88,31"><area shape="rect" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density." alt="" coords="84,96,129,120"></map>
44<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>
45
46<p>
47<a href="classmlnorm-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="f927203b3f31171c5c10ffc7caa797f5"></a><!-- doxytag: member="mlnorm::mlnorm" ref="f927203b3f31171c5c10ffc7caa797f5" args="(RV &amp;rv, RV &amp;rvc)" -->
51&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmlnorm.html#f927203b3f31171c5c10ffc7caa797f5">mlnorm</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">Constructor. <br></td></tr>
54<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b6749030c5d5abcb3eb6898f74cea3c0"></a><!-- doxytag: member="mlnorm::set_parameters" ref="b6749030c5d5abcb3eb6898f74cea3c0" args="(const mat &amp;A, const sq_T &amp;R)" -->
55void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmlnorm.html#b6749030c5d5abcb3eb6898f74cea3c0">set_parameters</a> (const mat &amp;A, const sq_T &amp;R)</td></tr>
56
57<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set <code>A</code> and <code>R</code>. <br></td></tr>
58<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="decf3e3b5c8e0812e5b4dbe94fa2ae18"></a><!-- doxytag: member="mlnorm::samplecond" ref="decf3e3b5c8e0812e5b4dbe94fa2ae18" args="(vec &amp;cond, double &amp;lik)" -->
59vec&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmlnorm.html#decf3e3b5c8e0812e5b4dbe94fa2ae18">samplecond</a> (vec &amp;cond, double &amp;lik)</td></tr>
60
61<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Generate one sample of the posterior. <br></td></tr>
62<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="215fb88cc8b95d64cdefd6849abdd1e8"></a><!-- doxytag: member="mlnorm::samplecond" ref="215fb88cc8b95d64cdefd6849abdd1e8" args="(vec &amp;cond, vec &amp;lik, int n)" -->
63mat&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmlnorm.html#215fb88cc8b95d64cdefd6849abdd1e8">samplecond</a> (vec &amp;cond, vec &amp;lik, int n)</td></tr>
64
65<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Generate matrix of samples of the posterior. <br></td></tr>
66<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5232fc7e305eceab4e2bd6a8daa44195"></a><!-- doxytag: member="mlnorm::condition" ref="5232fc7e305eceab4e2bd6a8daa44195" args="(vec &amp;cond)" -->
67void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmlnorm.html#5232fc7e305eceab4e2bd6a8daa44195">condition</a> (vec &amp;cond)</td></tr>
68
69<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set value of <code>rvc</code> . Result of this operation is stored in <code><a class="el" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a></code> use function <code>_ep</code> to access it. <br></td></tr>
70<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>
71
72<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>
73<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>
74
75<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns.  <a href="#0e37163660f93df2a4d723cedb1da89c"></a><br></td></tr>
76<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0f95a0cc6ab40611f46804682446ed83"></a><!-- doxytag: member="mlnorm::condition" ref="0f95a0cc6ab40611f46804682446ed83" args="(const vec &amp;cond)" -->
77virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmpdf.html#0f95a0cc6ab40611f46804682446ed83">condition</a> (const vec &amp;cond)</td></tr>
78
79<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>
80<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="80b738ece5bd4f8c4edaee4b38906f91"></a><!-- doxytag: member="mlnorm::evalcond" ref="80b738ece5bd4f8c4edaee4b38906f91" args="(const vec &amp;dt, const vec &amp;cond)" -->
81virtual 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>
82
83<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>
84<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ec9c850305984582548e8deb64f0ffe8"></a><!-- doxytag: member="mlnorm::_rvc" ref="ec9c850305984582548e8deb64f0ffe8" args="()" -->
85<a class="el" href="classRV.html">RV</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmpdf.html#ec9c850305984582548e8deb64f0ffe8">_rvc</a> ()</td></tr>
86
87<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">access function <br></td></tr>
88<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1e71ad4c66d5884c82d4a3b06b42fe32"></a><!-- doxytag: member="mlnorm::_rv" ref="1e71ad4c66d5884c82d4a3b06b42fe32" args="()" -->
89<a class="el" href="classRV.html">RV</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmpdf.html#1e71ad4c66d5884c82d4a3b06b42fe32">_rv</a> ()</td></tr>
90
91<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">access function <br></td></tr>
92<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e17780ee5b2cfe05922a6c56af1462f8"></a><!-- doxytag: member="mlnorm::_epdf" ref="e17780ee5b2cfe05922a6c56af1462f8" args="()" -->
93<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>
94
95<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">access function <br></td></tr>
96<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
97<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f6687c07ff07d47812dd565368ca59eb"></a><!-- doxytag: member="mlnorm::rv" ref="f6687c07ff07d47812dd565368ca59eb" args="" -->
98<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>
99
100<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">modeled random variable <br></td></tr>
101<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="acb7dda792b3cd5576f39fa3129abbab"></a><!-- doxytag: member="mlnorm::rvc" ref="acb7dda792b3cd5576f39fa3129abbab" args="" -->
102<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>
103
104<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">random variable in condition <br></td></tr>
105<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7aa894208a32f3487827df6d5054424c"></a><!-- doxytag: member="mlnorm::ep" ref="7aa894208a32f3487827df6d5054424c" args="" -->
106<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>
107
108<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>
109</table>
110<hr><a name="_details"></a><h2>Detailed Description</h2>
111<h3>template&lt;class sq_T&gt;<br>
112 class mlnorm&lt; sq_T &gt;</h3>
113
114Normal distributed linear function with linear function of mean value;.
115<p>
116Mean value <img class="formulaInl" alt="$mu=A*rvc$" src="form_40.png">. <hr><h2>Member Function Documentation</h2>
117<a class="anchor" name="3f172b79ec4a5ebc87898a5381141f1b"></a><!-- doxytag: member="mlnorm::samplecond" ref="3f172b79ec4a5ebc87898a5381141f1b" args="(const vec &amp;cond, double &amp;ll)" -->
118<div class="memitem">
119<div class="memproto">
120      <table class="memname">
121        <tr>
122          <td class="memname">virtual vec mpdf::samplecond           </td>
123          <td>(</td>
124          <td class="paramtype">const vec &amp;&nbsp;</td>
125          <td class="paramname"> <em>cond</em>, </td>
126        </tr>
127        <tr>
128          <td class="paramkey"></td>
129          <td></td>
130          <td class="paramtype">double &amp;&nbsp;</td>
131          <td class="paramname"> <em>ll</em></td><td>&nbsp;</td>
132        </tr>
133        <tr>
134          <td></td>
135          <td>)</td>
136          <td></td><td></td><td><code> [inline, virtual, inherited]</code></td>
137        </tr>
138      </table>
139</div>
140<div class="memdoc">
141
142<p>
143Returns the required moment of the <a class="el" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>.
144<p>
145Returns 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>
146  <table border="0" cellspacing="2" cellpadding="0">
147    <tr><td valign="top"></td><td valign="top"><em>cond</em>&nbsp;</td><td>is numeric value of <code>rv</code> </td></tr>
148    <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>
149  </table>
150</dl>
151
152<p>References <a class="el" href="libBM_8h-source.html#l00195">mpdf::condition()</a>, <a class="el" href="libBM_8h-source.html#l00178">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>
153
154<p>Referenced by <a class="el" href="libPF_8h-source.html#l00137">MPF&lt; BM_T &gt;::bayes()</a>, and <a class="el" href="libPF_8cpp-source.html#l00007">PF::bayes()</a>.</p>
155
156</div>
157</div><p>
158<a class="anchor" name="0e37163660f93df2a4d723cedb1da89c"></a><!-- doxytag: member="mlnorm::samplecond" ref="0e37163660f93df2a4d723cedb1da89c" args="(const vec &amp;cond, vec &amp;ll, int N)" -->
159<div class="memitem">
160<div class="memproto">
161      <table class="memname">
162        <tr>
163          <td class="memname">virtual mat mpdf::samplecond           </td>
164          <td>(</td>
165          <td class="paramtype">const vec &amp;&nbsp;</td>
166          <td class="paramname"> <em>cond</em>, </td>
167        </tr>
168        <tr>
169          <td class="paramkey"></td>
170          <td></td>
171          <td class="paramtype">vec &amp;&nbsp;</td>
172          <td class="paramname"> <em>ll</em>, </td>
173        </tr>
174        <tr>
175          <td class="paramkey"></td>
176          <td></td>
177          <td class="paramtype">int&nbsp;</td>
178          <td class="paramname"> <em>N</em></td><td>&nbsp;</td>
179        </tr>
180        <tr>
181          <td></td>
182          <td>)</td>
183          <td></td><td></td><td><code> [inline, virtual, inherited]</code></td>
184        </tr>
185      </table>
186</div>
187<div class="memdoc">
188
189<p>
190Returns.
191<p>
192<dl compact><dt><b>Parameters:</b></dt><dd>
193  <table border="0" cellspacing="2" cellpadding="0">
194    <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>
195    <tr><td valign="top"></td><td valign="top"><em>cond</em>&nbsp;</td><td>is numeric value of <code>rv</code> </td></tr>
196    <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>
197  </table>
198</dl>
199
200<p>References <a class="el" href="libBM_8h-source.html#l00195">mpdf::condition()</a>, <a class="el" href="libBM_8h-source.html#l00069">RV::count()</a>, <a class="el" href="libBM_8h-source.html#l00178">mpdf::ep</a>, <a class="el" href="classepdf.html#6aef3eca74899692503769c18add1a4c">epdf::evalpdflog()</a>, <a class="el" href="libBM_8h-source.html#l00174">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="libEF_8h-source.html">libEF.h</a></ul>
206</div>
207<hr size="1"><address style="text-align: right;"><small>Generated on Thu Sep 4 19:28:12 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.