Show
Ignore:
Timestamp:
02/11/09 14:15:39 (16 years ago)
Author:
smidl
Message:

doc

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • doc/html/libEF_8h-source.html

    r264 r269  
    3131<a name="l00025"></a>00025 <span class="keyword">extern</span> Uniform_RNG <a class="code" href="namespacebdm.html#96288dbda6916cd442af735f66a9f40b" title="Global Uniform_RNG.">UniRNG</a>; 
    3232<a name="l00027"></a>00027 <span class="keyword">extern</span> Normal_RNG <a class="code" href="namespacebdm.html#c959a7382efbcc31af4b58cf0f0f951a" title="Global Normal_RNG.">NorRNG</a>; 
    33 <a name="l00029"></a>00029 <span class="keyword">extern</span> <a class="code" href="classitpp_1_1Gamma__RNG.html" title="Gamma distribution.">Gamma_RNG</a> <a class="code" href="namespacebdm.html#2828dc833cc283a1fb39a5e8dc06518f" title="Global Gamma_RNG.">GamRNG</a>; 
     33<a name="l00029"></a>00029 <span class="keyword">extern</span> Gamma_RNG <a class="code" href="namespacebdm.html#2828dc833cc283a1fb39a5e8dc06518f" title="Global Gamma_RNG.">GamRNG</a>; 
    3434<a name="l00030"></a>00030  
    3535<a name="l00037"></a><a class="code" href="classbdm_1_1eEF.html">00037</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1eEF.html" title="General conjugate exponential family posterior density.">eEF</a> : <span class="keyword">public</span> <a class="code" href="classbdm_1_1epdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> { 
     
    5555<a name="l00071"></a>00071 }; 
    5656<a name="l00072"></a>00072  
    57 <a name="l00074"></a><a class="code" href="classbdm_1_1BMEF.html">00074</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1BMEF.html" title="Estimator for Exponential family.">BMEF</a> : <span class="keyword">public</span> <a class="code" href="classbdm_1_1BM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities.">BM</a> { 
     57<a name="l00074"></a><a class="code" href="classbdm_1_1BMEF.html">00074</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1BMEF.html" title="Estimator for Exponential family.">BMEF</a> : <span class="keyword">public</span> <a class="code" href="classbdm_1_1BM.html" title="Bayesian Model of a system, i.e. all uncertainty is modeled by probabilities.">BM</a> { 
    5858<a name="l00075"></a>00075 <span class="keyword">protected</span>: 
    5959<a name="l00077"></a><a class="code" href="classbdm_1_1BMEF.html#1331865e10fb1ccef65bb4c47fa3be64">00077</a>         <span class="keywordtype">double</span> <a class="code" href="classbdm_1_1BMEF.html#1331865e10fb1ccef65bb4c47fa3be64" title="forgetting factor">frg</a>; 
    6060<a name="l00079"></a><a class="code" href="classbdm_1_1BMEF.html#06e7b3ac03e10017d4288c76888e2865">00079</a>         <span class="keywordtype">double</span> <a class="code" href="classbdm_1_1BMEF.html#06e7b3ac03e10017d4288c76888e2865" title="cached value of lognc() in the previous step (used in evaluation of ll )">last_lognc</a>; 
    6161<a name="l00080"></a>00080 <span class="keyword">public</span>: 
    62 <a name="l00082"></a><a class="code" href="classbdm_1_1BMEF.html#73bccd1d8142d4d330e35637ca30decc">00082</a>         <a class="code" href="classbdm_1_1BMEF.html#73bccd1d8142d4d330e35637ca30decc" title="Default constructor.">BMEF</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &amp;<a class="code" href="classbdm_1_1BM.html#18d6db4af8ee42077741d9e3618153ca" title="Random variable of the posterior.">rv</a>, <span class="keywordtype">double</span> frg0=1.0 ) :<a class="code" href="classbdm_1_1BM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities.">BM</a> ( rv ), <a class="code" href="classbdm_1_1BMEF.html#1331865e10fb1ccef65bb4c47fa3be64" title="forgetting factor">frg</a> ( frg0 ) {} 
    63 <a name="l00084"></a><a class="code" href="classbdm_1_1BMEF.html#9662379513101405e159e76717104e62">00084</a>         <a class="code" href="classbdm_1_1BMEF.html#73bccd1d8142d4d330e35637ca30decc" title="Default constructor.">BMEF</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1BMEF.html" title="Estimator for Exponential family.">BMEF</a> &amp;B ) :<a class="code" href="classbdm_1_1BM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities.">BM</a> ( B ), <a class="code" href="classbdm_1_1BMEF.html#1331865e10fb1ccef65bb4c47fa3be64" title="forgetting factor">frg</a> ( B.<a class="code" href="classbdm_1_1BMEF.html#1331865e10fb1ccef65bb4c47fa3be64" title="forgetting factor">frg</a> ), <a class="code" href="classbdm_1_1BMEF.html#06e7b3ac03e10017d4288c76888e2865" title="cached value of lognc() in the previous step (used in evaluation of ll )">last_lognc</a> ( B.<a class="code" href="classbdm_1_1BMEF.html#06e7b3ac03e10017d4288c76888e2865" title="cached value of lognc() in the previous step (used in evaluation of ll )">last_lognc</a> ) {} 
     62<a name="l00082"></a><a class="code" href="classbdm_1_1BMEF.html#73bccd1d8142d4d330e35637ca30decc">00082</a>         <a class="code" href="classbdm_1_1BMEF.html#73bccd1d8142d4d330e35637ca30decc" title="Default constructor.">BMEF</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &amp;<a class="code" href="classbdm_1_1BM.html#18d6db4af8ee42077741d9e3618153ca" title="Random variable of the posterior.">rv</a>, <span class="keywordtype">double</span> frg0=1.0 ) :<a class="code" href="classbdm_1_1BM.html" title="Bayesian Model of a system, i.e. all uncertainty is modeled by probabilities.">BM</a> ( rv ), <a class="code" href="classbdm_1_1BMEF.html#1331865e10fb1ccef65bb4c47fa3be64" title="forgetting factor">frg</a> ( frg0 ) {} 
     63<a name="l00084"></a><a class="code" href="classbdm_1_1BMEF.html#9662379513101405e159e76717104e62">00084</a>         <a class="code" href="classbdm_1_1BMEF.html#73bccd1d8142d4d330e35637ca30decc" title="Default constructor.">BMEF</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1BMEF.html" title="Estimator for Exponential family.">BMEF</a> &amp;B ) :<a class="code" href="classbdm_1_1BM.html" title="Bayesian Model of a system, i.e. all uncertainty is modeled by probabilities.">BM</a> ( B ), <a class="code" href="classbdm_1_1BMEF.html#1331865e10fb1ccef65bb4c47fa3be64" title="forgetting factor">frg</a> ( B.<a class="code" href="classbdm_1_1BMEF.html#1331865e10fb1ccef65bb4c47fa3be64" title="forgetting factor">frg</a> ), <a class="code" href="classbdm_1_1BMEF.html#06e7b3ac03e10017d4288c76888e2865" title="cached value of lognc() in the previous step (used in evaluation of ll )">last_lognc</a> ( B.<a class="code" href="classbdm_1_1BMEF.html#06e7b3ac03e10017d4288c76888e2865" title="cached value of lognc() in the previous step (used in evaluation of ll )">last_lognc</a> ) {} 
    6464<a name="l00086"></a><a class="code" href="classbdm_1_1BMEF.html#d2b528b7a41ca67163152142f5404051">00086</a>         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1BMEF.html#d2b528b7a41ca67163152142f5404051" title="get statistics from another model">set_statistics</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1BMEF.html" title="Estimator for Exponential family.">BMEF</a>* BM0 ) {it_error ( <span class="stringliteral">"Not implemented"</span> );}; 
    6565<a name="l00088"></a><a class="code" href="classbdm_1_1BMEF.html#bf58deb99af2a6cc674f13ff90300de6">00088</a>         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1BMEF.html#bf58deb99af2a6cc674f13ff90300de6" title="Weighted update of sufficient statistics (Bayes rule).">bayes</a> ( <span class="keyword">const</span> vec &amp;data, <span class="keyword">const</span> <span class="keywordtype">double</span> w ) {}; 
     
    190190<a name="l00267"></a><a class="code" href="classbdm_1_1multiBM.html#65dc7567b67ce86a8f339dd496ed8e88">00267</a>         <a class="code" href="classbdm_1_1multiBM.html#65dc7567b67ce86a8f339dd496ed8e88" title="Default constructor.">multiBM</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &amp;<a class="code" href="classbdm_1_1BM.html#18d6db4af8ee42077741d9e3618153ca" title="Random variable of the posterior.">rv</a>, <span class="keyword">const</span> vec beta0 ) : <a class="code" href="classbdm_1_1BMEF.html" title="Estimator for Exponential family.">BMEF</a> ( rv ),<a class="code" href="classbdm_1_1multiBM.html#9ecc6878abbd20eb8d8e43b6ab3f941a" title="Conjugate prior and posterior.">est</a> ( rv,beta0 ),<a class="code" href="classbdm_1_1multiBM.html#044263356944c92209eecd39a5187d25" title="Pointer inside est to sufficient statistics.">beta</a> ( <a class="code" href="classbdm_1_1multiBM.html#9ecc6878abbd20eb8d8e43b6ab3f941a" title="Conjugate prior and posterior.">est</a>._beta() ) {<span class="keywordflow">if</span>(<a class="code" href="classbdm_1_1multiBM.html#044263356944c92209eecd39a5187d25" title="Pointer inside est to sufficient statistics.">beta</a>.length()&gt;0){<a class="code" href="classbdm_1_1BMEF.html#06e7b3ac03e10017d4288c76888e2865" title="cached value of lognc() in the previous step (used in evaluation of ll )">last_lognc</a>=<a class="code" href="classbdm_1_1multiBM.html#9ecc6878abbd20eb8d8e43b6ab3f941a" title="Conjugate prior and posterior.">est</a>.<a class="code" href="classbdm_1_1eDirich.html#279a99f6266c82fe2273e83841f19eb2" title="logarithm of the normalizing constant, ">lognc</a>();}<span class="keywordflow">else</span>{<a class="code" href="classbdm_1_1BMEF.html#06e7b3ac03e10017d4288c76888e2865" title="cached value of lognc() in the previous step (used in evaluation of ll )">last_lognc</a>=0.0;}} 
    191191<a name="l00269"></a><a class="code" href="classbdm_1_1multiBM.html#c4378cf8037f6bed29c74eea63344b31">00269</a>         <a class="code" href="classbdm_1_1multiBM.html#65dc7567b67ce86a8f339dd496ed8e88" title="Default constructor.">multiBM</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1multiBM.html" title="Estimator for Multinomial density.">multiBM</a> &amp;B ) : <a class="code" href="classbdm_1_1BMEF.html" title="Estimator for Exponential family.">BMEF</a> ( B ),<a class="code" href="classbdm_1_1multiBM.html#9ecc6878abbd20eb8d8e43b6ab3f941a" title="Conjugate prior and posterior.">est</a> ( <a class="code" href="classbdm_1_1BM.html#18d6db4af8ee42077741d9e3618153ca" title="Random variable of the posterior.">rv</a>,B.<a class="code" href="classbdm_1_1multiBM.html#044263356944c92209eecd39a5187d25" title="Pointer inside est to sufficient statistics.">beta</a> ),<a class="code" href="classbdm_1_1multiBM.html#044263356944c92209eecd39a5187d25" title="Pointer inside est to sufficient statistics.">beta</a> ( <a class="code" href="classbdm_1_1multiBM.html#9ecc6878abbd20eb8d8e43b6ab3f941a" title="Conjugate prior and posterior.">est</a>._beta() ) {} 
    192 <a name="l00271"></a><a class="code" href="classbdm_1_1multiBM.html#dbe6b90d410dc062a233d1dc09eeba52">00271</a>         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1multiBM.html#dbe6b90d410dc062a233d1dc09eeba52" title="Sets sufficient statistics to match that of givefrom mB0.">set_statistics</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1BM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities.">BM</a>* mB0 ) {<span class="keyword">const</span> <a class="code" href="classbdm_1_1multiBM.html" title="Estimator for Multinomial density.">multiBM</a>* mB=<span class="keyword">dynamic_cast&lt;</span><span class="keyword">const </span><a class="code" href="classbdm_1_1multiBM.html" title="Estimator for Multinomial density.">multiBM</a>*<span class="keyword">&gt;</span> ( mB0 ); <a class="code" href="classbdm_1_1multiBM.html#044263356944c92209eecd39a5187d25" title="Pointer inside est to sufficient statistics.">beta</a>=mB-&gt;<a class="code" href="classbdm_1_1multiBM.html#044263356944c92209eecd39a5187d25" title="Pointer inside est to sufficient statistics.">beta</a>;} 
     192<a name="l00271"></a><a class="code" href="classbdm_1_1multiBM.html#dbe6b90d410dc062a233d1dc09eeba52">00271</a>         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1multiBM.html#dbe6b90d410dc062a233d1dc09eeba52" title="Sets sufficient statistics to match that of givefrom mB0.">set_statistics</a> ( <span class="keyword">const</span> <a class="code" href="classbdm_1_1BM.html" title="Bayesian Model of a system, i.e. all uncertainty is modeled by probabilities.">BM</a>* mB0 ) {<span class="keyword">const</span> <a class="code" href="classbdm_1_1multiBM.html" title="Estimator for Multinomial density.">multiBM</a>* mB=<span class="keyword">dynamic_cast&lt;</span><span class="keyword">const </span><a class="code" href="classbdm_1_1multiBM.html" title="Estimator for Multinomial density.">multiBM</a>*<span class="keyword">&gt;</span> ( mB0 ); <a class="code" href="classbdm_1_1multiBM.html#044263356944c92209eecd39a5187d25" title="Pointer inside est to sufficient statistics.">beta</a>=mB-&gt;<a class="code" href="classbdm_1_1multiBM.html#044263356944c92209eecd39a5187d25" title="Pointer inside est to sufficient statistics.">beta</a>;} 
    193193<a name="l00272"></a><a class="code" href="classbdm_1_1multiBM.html#1e4bf41b61937fd80f34049742e23f95">00272</a>         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1multiBM.html#1e4bf41b61937fd80f34049742e23f95" title="Incremental Bayes rule.">bayes</a> ( <span class="keyword">const</span> vec &amp;dt ) { 
    194194<a name="l00273"></a>00273                 <span class="keywordflow">if</span> ( <a class="code" href="classbdm_1_1BMEF.html#1331865e10fb1ccef65bb4c47fa3be64" title="forgetting factor">frg</a>&lt;1.0 ) {<a class="code" href="classbdm_1_1multiBM.html#044263356944c92209eecd39a5187d25" title="Pointer inside est to sufficient statistics.">beta</a>*=<a class="code" href="classbdm_1_1BMEF.html#1331865e10fb1ccef65bb4c47fa3be64" title="forgetting factor">frg</a>;<a class="code" href="classbdm_1_1BMEF.html#06e7b3ac03e10017d4288c76888e2865" title="cached value of lognc() in the previous step (used in evaluation of ll )">last_lognc</a>=<a class="code" href="classbdm_1_1multiBM.html#9ecc6878abbd20eb8d8e43b6ab3f941a" title="Conjugate prior and posterior.">est</a>.<a class="code" href="classbdm_1_1eDirich.html#279a99f6266c82fe2273e83841f19eb2" title="logarithm of the normalizing constant, ">lognc</a>();} 
     
    611611<a name="l00837"></a>00837 <span class="preprocessor">#endif //EF_H</span> 
    612612</pre></div></div> 
    613 <hr size="1"><address style="text-align: right;"><small>Generated on Fri Feb 6 19:49:45 2009 for mixpp by&nbsp; 
     613<hr size="1"><address style="text-align: right;"><small>Generated on Wed Feb 11 10:20:05 2009 for mixpp by&nbsp; 
    614614<a href="http://www.doxygen.org/index.html"> 
    615615<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>