[353] | 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: mog_diag_em.h Source File</title> |
---|
| 4 | <link href="tabs.css" rel="stylesheet" type="text/css"> |
---|
| 5 | <link href="doxygen.css" rel="stylesheet" type="text/css"> |
---|
| 6 | </head><body> |
---|
| 7 | <!-- Generated by Doxygen 1.5.8 --> |
---|
| 8 | <script type="text/javascript"> |
---|
| 9 | <!-- |
---|
| 10 | function changeDisplayState (e){ |
---|
| 11 | var num=this.id.replace(/[^[0-9]/g,''); |
---|
| 12 | var button=this.firstChild; |
---|
| 13 | var sectionDiv=document.getElementById('dynsection'+num); |
---|
| 14 | if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){ |
---|
| 15 | sectionDiv.style.display='block'; |
---|
| 16 | button.src='open.gif'; |
---|
| 17 | }else{ |
---|
| 18 | sectionDiv.style.display='none'; |
---|
| 19 | button.src='closed.gif'; |
---|
| 20 | } |
---|
| 21 | } |
---|
| 22 | function initDynSections(){ |
---|
| 23 | var divs=document.getElementsByTagName('div'); |
---|
| 24 | var sectionCounter=1; |
---|
| 25 | for(var i=0;i<divs.length-1;i++){ |
---|
| 26 | if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){ |
---|
| 27 | var header=divs[i]; |
---|
| 28 | var section=divs[i+1]; |
---|
| 29 | var button=header.firstChild; |
---|
| 30 | if (button!='IMG'){ |
---|
| 31 | divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild); |
---|
| 32 | button=document.createElement('img'); |
---|
| 33 | divs[i].insertBefore(button,divs[i].firstChild); |
---|
| 34 | } |
---|
| 35 | header.style.cursor='pointer'; |
---|
| 36 | header.onclick=changeDisplayState; |
---|
| 37 | header.id='dynheader'+sectionCounter; |
---|
| 38 | button.src='closed.gif'; |
---|
| 39 | section.id='dynsection'+sectionCounter; |
---|
| 40 | section.style.display='none'; |
---|
| 41 | section.style.marginLeft='14px'; |
---|
| 42 | sectionCounter++; |
---|
| 43 | } |
---|
| 44 | } |
---|
| 45 | } |
---|
| 46 | window.onload = initDynSections; |
---|
| 47 | --> |
---|
| 48 | </script> |
---|
| 49 | <div class="navigation" id="top"> |
---|
| 50 | <div class="tabs"> |
---|
| 51 | <ul> |
---|
| 52 | <li><a href="main.html"><span>Main Page</span></a></li> |
---|
| 53 | <li><a href="pages.html"><span>Related Pages</span></a></li> |
---|
| 54 | <li><a href="modules.html"><span>Modules</span></a></li> |
---|
| 55 | <li><a href="annotated.html"><span>Classes</span></a></li> |
---|
| 56 | <li class="current"><a href="files.html"><span>Files</span></a></li> |
---|
| 57 | </ul> |
---|
| 58 | </div> |
---|
| 59 | <div class="tabs"> |
---|
| 60 | <ul> |
---|
| 61 | <li><a href="files.html"><span>File List</span></a></li> |
---|
| 62 | <li><a href="globals.html"><span>File Members</span></a></li> |
---|
| 63 | </ul> |
---|
| 64 | </div> |
---|
| 65 | <h1>mog_diag_em.h</h1><a href="mog__diag__em_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 |
---|
| 66 | <a name="l00029"></a>00029 <span class="preprocessor">#ifndef MOG_DIAG_EM_H</span> |
---|
| 67 | <a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#define MOG_DIAG_EM_H</span> |
---|
| 68 | <a name="l00031"></a>00031 <span class="preprocessor"></span> |
---|
| 69 | <a name="l00032"></a>00032 <span class="preprocessor">#include <<a class="code" href="mog__diag_8h.html" title="Diagonal Mixture of Gaussians class - header file.">itpp/stat/mog_diag.h</a>></span> |
---|
| 70 | <a name="l00033"></a>00033 |
---|
| 71 | <a name="l00034"></a>00034 |
---|
| 72 | <a name="l00035"></a>00035 <span class="keyword">namespace </span>itpp |
---|
| 73 | <a name="l00036"></a>00036 { |
---|
| 74 | <a name="l00037"></a>00037 |
---|
| 75 | <a name="l00042"></a><a class="code" href="classitpp_1_1MOG__diag__EM__sup.html">00042</a> <span class="keyword">class </span><a class="code" href="classitpp_1_1MOG__diag__EM__sup.html" title="support class for MOG_diag_ML() and MOG_diag_MAP()">MOG_diag_EM_sup</a> : <span class="keyword">public</span> <a class="code" href="classitpp_1_1MOG__diag.html" title="Diagonal Mixture of Gaussians (MOG) class.">MOG_diag</a> |
---|
| 76 | <a name="l00043"></a>00043 { |
---|
| 77 | <a name="l00044"></a>00044 |
---|
| 78 | <a name="l00045"></a>00045 <span class="keyword">public</span>: |
---|
| 79 | <a name="l00046"></a>00046 |
---|
| 80 | <a name="l00048"></a><a class="code" href="classitpp_1_1MOG__diag__EM__sup.html#06eccaf49e6f647d2487918d9e41d2f9">00048</a> <a class="code" href="classitpp_1_1MOG__diag__EM__sup.html#06eccaf49e6f647d2487918d9e41d2f9" title="Default constructor.">MOG_diag_EM_sup</a>() { <a class="code" href="classitpp_1_1MOG__diag__EM__sup.html#7af519474cd8ae2552495ab65cdd18a1" title="Whether we print the progress.">verbose</a> = <span class="keyword">false</span>; } |
---|
| 81 | <a name="l00049"></a>00049 |
---|
| 82 | <a name="l00051"></a><a class="code" href="classitpp_1_1MOG__diag__EM__sup.html#eb190320d30e7be3b17c2890d4d2b30c">00051</a> <a class="code" href="classitpp_1_1MOG__diag__EM__sup.html#eb190320d30e7be3b17c2890d4d2b30c" title="Default destructor.">~MOG_diag_EM_sup</a>() { } |
---|
| 83 | <a name="l00052"></a>00052 |
---|
| 84 | <a name="l00054"></a>00054 <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1MOG__diag__EM__sup.html#929189d3717984ff694062927c1f179e" title="ADD DOCUMENTATION HERE.">ml</a>(<a class="code" href="classitpp_1_1MOG__diag.html" title="Diagonal Mixture of Gaussians (MOG) class.">MOG_diag</a> &model_in, <a class="code" href="classitpp_1_1Array.html">Array<vec></a> &X_in, <span class="keywordtype">int</span> max_iter_in = 10, <span class="keywordtype">double</span> var_floor_in = 0.0, <span class="keywordtype">double</span> weight_floor_in = 0.0, <span class="keywordtype">bool</span> verbose_in = <span class="keyword">false</span>); |
---|
| 85 | <a name="l00056"></a>00056 <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1MOG__diag__EM__sup.html#88f40524228d5af69246e6d45bb68c8e" title="ADD DOCUMENTATION HERE.">map</a>(<a class="code" href="classitpp_1_1MOG__diag.html" title="Diagonal Mixture of Gaussians (MOG) class.">MOG_diag</a> &model_in, <a class="code" href="classitpp_1_1MOG__diag.html" title="Diagonal Mixture of Gaussians (MOG) class.">MOG_diag</a> &prior_model, <a class="code" href="classitpp_1_1Array.html">Array<vec></a> &X_in, <span class="keywordtype">int</span> max_iter_in = 10, <span class="keywordtype">double</span> alpha_in = 0.5, <span class="keywordtype">double</span> var_floor_in = 0.0, <span class="keywordtype">double</span> weight_floor_in = 0.0, <span class="keywordtype">bool</span> verbose_in = <span class="keyword">false</span>); |
---|
| 86 | <a name="l00057"></a>00057 |
---|
| 87 | <a name="l00058"></a>00058 <span class="keyword">protected</span>: |
---|
| 88 | <a name="l00059"></a>00059 |
---|
| 89 | <a name="l00061"></a><a class="code" href="classitpp_1_1MOG__diag__EM__sup.html#7af519474cd8ae2552495ab65cdd18a1">00061</a> <span class="keywordtype">bool</span> <a class="code" href="classitpp_1_1MOG__diag__EM__sup.html#7af519474cd8ae2552495ab65cdd18a1" title="Whether we print the progress.">verbose</a>; |
---|
| 90 | <a name="l00062"></a>00062 |
---|
| 91 | <a name="l00064"></a><a class="code" href="classitpp_1_1MOG__diag__EM__sup.html#51b76acb6256309ad4d77f770c0e9f27">00064</a> <span class="keywordtype">int</span> <a class="code" href="classitpp_1_1MOG__diag__EM__sup.html#51b76acb6256309ad4d77f770c0e9f27" title="number of training vectors">N</a>; |
---|
| 92 | <a name="l00065"></a>00065 |
---|
| 93 | <a name="l00067"></a><a class="code" href="classitpp_1_1MOG__diag__EM__sup.html#031e6fd5468f0ba8afc3600fd6535918">00067</a> <span class="keywordtype">int</span> <a class="code" href="classitpp_1_1MOG__diag__EM__sup.html#031e6fd5468f0ba8afc3600fd6535918" title="Maximum number of iterations.">max_iter</a>; |
---|
| 94 | <a name="l00068"></a>00068 |
---|
| 95 | <a name="l00070"></a><a class="code" href="classitpp_1_1MOG__diag__EM__sup.html#fd42443f486c895d094aadfe2bf98039">00070</a> <span class="keywordtype">double</span> ** <a class="code" href="classitpp_1_1MOG__diag__EM__sup.html#fd42443f486c895d094aadfe2bf98039" title="&#39;C&#39; pointers to training vectors">c_X</a>; |
---|
| 96 | <a name="l00071"></a>00071 |
---|
| 97 | <a name="l00073"></a><a class="code" href="classitpp_1_1MOG__diag__EM__sup.html#04122df146872967af081040f59aa819">00073</a> <span class="keywordtype">double</span> <a class="code" href="classitpp_1_1MOG__diag__EM__sup.html#04122df146872967af081040f59aa819" title="ADD DOCUMENTATION HERE.">var_floor</a>; |
---|
| 98 | <a name="l00075"></a><a class="code" href="classitpp_1_1MOG__diag__EM__sup.html#40c34d38d70c8169c651bb612b84aa6a">00075</a> <span class="keywordtype">double</span> <a class="code" href="classitpp_1_1MOG__diag__EM__sup.html#40c34d38d70c8169c651bb612b84aa6a" title="ADD DOCUMENTATION HERE.">weight_floor</a>; |
---|
| 99 | <a name="l00076"></a>00076 |
---|
| 100 | <a name="l00078"></a>00078 <span class="keywordtype">void</span> <span class="keyword">inline</span> <a class="code" href="classitpp_1_1MOG__diag__EM__sup.html#532a54a91379d1949e63585339ad9419" title="ADD DOCUMENTATION HERE.">update_internals</a>(); |
---|
| 101 | <a name="l00080"></a>00080 <span class="keywordtype">void</span> <span class="keyword">inline</span> <a class="code" href="classitpp_1_1MOG__diag__EM__sup.html#407c7fa985e65066bad7e6ca86cf2f47" title="ADD DOCUMENTATION HERE.">sanitise_params</a>(); |
---|
| 102 | <a name="l00082"></a>00082 <span class="keywordtype">double</span> <a class="code" href="classitpp_1_1MOG__diag__EM__sup.html#a7f4783f45233f2caf53eb8cdfda9b78" title="ADD DOCUMENTATION HERE.">ml_update_params</a>(); |
---|
| 103 | <a name="l00084"></a>00084 <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1MOG__diag__EM__sup.html#babd7d97bf86698a3832bc50303b1e38" title="ADD DOCUMENTATION HERE.">ml_iterate</a>(); |
---|
| 104 | <a name="l00085"></a>00085 |
---|
| 105 | <a name="l00086"></a>00086 <span class="keyword">private</span>: |
---|
| 106 | <a name="l00087"></a>00087 |
---|
| 107 | <a name="l00088"></a>00088 vec tmpvecK; |
---|
| 108 | <a name="l00089"></a>00089 vec tmpvecD; |
---|
| 109 | <a name="l00090"></a>00090 vec acc_loglhood_K; |
---|
| 110 | <a name="l00091"></a>00091 |
---|
| 111 | <a name="l00092"></a>00092 <a class="code" href="classitpp_1_1Array.html">Array<vec></a> acc_means; |
---|
| 112 | <a name="l00093"></a>00093 <a class="code" href="classitpp_1_1Array.html">Array<vec></a> acc_covs; |
---|
| 113 | <a name="l00094"></a>00094 |
---|
| 114 | <a name="l00095"></a>00095 <span class="keywordtype">double</span> * c_tmpvecK; |
---|
| 115 | <a name="l00096"></a>00096 <span class="keywordtype">double</span> * c_tmpvecD; |
---|
| 116 | <a name="l00097"></a>00097 <span class="keywordtype">double</span> * c_acc_loglhood_K; |
---|
| 117 | <a name="l00098"></a>00098 |
---|
| 118 | <a name="l00099"></a>00099 <span class="keywordtype">double</span> ** c_acc_means; |
---|
| 119 | <a name="l00100"></a>00100 <span class="keywordtype">double</span> ** c_acc_covs; |
---|
| 120 | <a name="l00101"></a>00101 |
---|
| 121 | <a name="l00102"></a>00102 |
---|
| 122 | <a name="l00103"></a>00103 }; |
---|
| 123 | <a name="l00104"></a>00104 |
---|
| 124 | <a name="l00105"></a>00105 <span class="comment">//</span> |
---|
| 125 | <a name="l00106"></a>00106 <span class="comment">// convenience functions</span> |
---|
| 126 | <a name="l00107"></a>00107 |
---|
| 127 | <a name="l00135"></a>00135 <span class="keywordtype">void</span> <a class="code" href="group__MOG.html#g7b86d84e61a3056418f08b7ac0686805">MOG_diag_ML</a>(<a class="code" href="classitpp_1_1MOG__diag.html" title="Diagonal Mixture of Gaussians (MOG) class.">MOG_diag</a> &model_in, <a class="code" href="classitpp_1_1Array.html">Array<vec></a> &X_in, <span class="keywordtype">int</span> max_iter_in = 10, <span class="keywordtype">double</span> var_floor_in = 0.0, <span class="keywordtype">double</span> weight_floor_in = 0.0, <span class="keywordtype">bool</span> verbose_in = <span class="keyword">false</span>); |
---|
| 128 | <a name="l00136"></a>00136 |
---|
| 129 | <a name="l00155"></a>00155 <span class="keywordtype">void</span> MOG_diag_MAP(<a class="code" href="classitpp_1_1MOG__diag.html" title="Diagonal Mixture of Gaussians (MOG) class.">MOG_diag</a> &model_in, <a class="code" href="classitpp_1_1MOG__diag.html" title="Diagonal Mixture of Gaussians (MOG) class.">MOG_diag</a> &prior_model_in, <a class="code" href="classitpp_1_1Array.html">Array<vec></a> &X_in, <span class="keywordtype">int</span> max_iter_in = 10, <span class="keywordtype">double</span> alpha_in = 0.5, <span class="keywordtype">double</span> var_floor_in = 0.0, <span class="keywordtype">double</span> weight_floor_in = 0.0, <span class="keywordtype">bool</span> verbose_in = <span class="keyword">false</span>); |
---|
| 130 | <a name="l00156"></a>00156 |
---|
| 131 | <a name="l00157"></a>00157 } |
---|
| 132 | <a name="l00158"></a>00158 |
---|
| 133 | <a name="l00159"></a>00159 <span class="preprocessor">#endif // #ifndef MOG_DIAG_EM_H</span> |
---|
| 134 | <a name="l00160"></a>00160 <span class="preprocessor"></span> |
---|
| 135 | </pre></div></div> |
---|
| 136 | <hr size="1"><address style="text-align: right;"><small>Generated on Tue Jun 2 10:02:12 2009 for mixpp by |
---|
| 137 | <a href="http://www.doxygen.org/index.html"> |
---|
| 138 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address> |
---|
| 139 | </body> |
---|
| 140 | </html> |
---|