root/doc/html/fastica_8h-source.html @ 353

Revision 353, 13.6 kB (checked in by smidl, 16 years ago)

doc

RevLine 
[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: fastica.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<!--
10function 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}
22function 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}
46window.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&nbsp;Page</span></a></li>
53      <li><a href="pages.html"><span>Related&nbsp;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&nbsp;List</span></a></li>
62      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
63    </ul>
64  </div>
65<h1>fastica.h</h1><a href="fastica_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001
66<a name="l00062"></a>00062 <span class="preprocessor">#ifndef FASTICA_H</span>
67<a name="l00063"></a>00063 <span class="preprocessor"></span><span class="preprocessor">#define FASTICA_H</span>
68<a name="l00064"></a>00064 <span class="preprocessor"></span>
69<a name="l00065"></a>00065 <span class="preprocessor">#include &lt;<a class="code" href="mat_8h.html" title="Matrix Class Definitions.">itpp/base/mat.h</a>&gt;</span>
70<a name="l00066"></a>00066
71<a name="l00067"></a>00067
72<a name="l00069"></a><a class="code" href="fastica_8h.html#d1f545693a7caf99d42e7bd0b6c6c9fd">00069</a> <span class="preprocessor">#define FICA_APPROACH_DEFL 2</span>
73<a name="l00071"></a><a class="code" href="fastica_8h.html#ac33dc925ad4c4e9bd9ea1c2bc972178">00071</a> <span class="preprocessor">#define FICA_APPROACH_SYMM 1</span>
74<a name="l00072"></a>00072 <span class="preprocessor"></span>
75<a name="l00074"></a><a class="code" href="fastica_8h.html#335a77f36fe4193000c24be53806dd4e">00074</a> <span class="preprocessor">#define FICA_NONLIN_POW3 10</span>
76<a name="l00076"></a><a class="code" href="fastica_8h.html#f55288e52a8e7a40ae253228ae01e439">00076</a> <span class="preprocessor">#define FICA_NONLIN_TANH 20</span>
77<a name="l00078"></a><a class="code" href="fastica_8h.html#a218f0ad3979a6de7005eeb86e15eb54">00078</a> <span class="preprocessor">#define FICA_NONLIN_GAUSS 30</span>
78<a name="l00080"></a><a class="code" href="fastica_8h.html#ed6ec962554dcf6914d8213f349ba8ff">00080</a> <span class="preprocessor">#define FICA_NONLIN_SKEW 40</span>
79<a name="l00081"></a>00081 <span class="preprocessor"></span>
80<a name="l00083"></a><a class="code" href="fastica_8h.html#87e4b97f3d0283410cc273c80db405d6">00083</a> <span class="preprocessor">#define FICA_INIT_RAND  0</span>
81<a name="l00085"></a><a class="code" href="fastica_8h.html#2ec5d4482d4345e6ee684f3e0bfb0be0">00085</a> <span class="preprocessor">#define FICA_INIT_GUESS 1</span>
82<a name="l00086"></a>00086 <span class="preprocessor"></span>
83<a name="l00088"></a><a class="code" href="fastica_8h.html#eafa658d11e26fe56b0b5450469ee119">00088</a> <span class="preprocessor">#define FICA_TOL 1e-9</span>
84<a name="l00089"></a>00089 <span class="preprocessor"></span>
85<a name="l00090"></a>00090 <span class="keyword">namespace </span>itpp
86<a name="l00091"></a>00091 {
87<a name="l00092"></a>00092
88<a name="l00097"></a>00097 <span class="comment">//---------------------- FastICA --------------------------------------</span>
89<a name="l00098"></a>00098
90<a name="l00118"></a><a class="code" href="classitpp_1_1Fast__ICA.html">00118</a> <span class="keyword">class </span><a class="code" href="classitpp_1_1Fast__ICA.html" title="Fast_ICA Fast Independent Component Analysis (Fast ICA)The software is based upon...">Fast_ICA</a>
91<a name="l00119"></a>00119 {
92<a name="l00120"></a>00120
93<a name="l00121"></a>00121 <span class="keyword">public</span>:
94<a name="l00122"></a>00122
95<a name="l00130"></a>00130   <a class="code" href="classitpp_1_1Fast__ICA.html#049966f677a58984671e3ddae1bda816" title="Constructor.">Fast_ICA</a>(mat ma_mixed_sig);
96<a name="l00131"></a>00131
97<a name="l00137"></a>00137   <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Fast__ICA.html#f97dfb9927a72e4f7d9b5cd95b1c32aa" title="Explicit launch of main FastICA function.">separate</a>(<span class="keywordtype">void</span>);
98<a name="l00138"></a>00138
99<a name="l00146"></a>00146   <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Fast__ICA.html#362175bfd800195843eda2051ccbfb73" title="Set approach : FICA_APPROACH_DEFL or FICA_APPROACH_SYMM (default).">set_approach</a>(<span class="keywordtype">int</span> in_approach);
100<a name="l00147"></a>00147
101<a name="l00155"></a>00155   <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Fast__ICA.html#fe4c36330cba0e22e8dcce3b694d63b1" title="Set number of independent components to separate.">set_nrof_independent_components</a>(<span class="keywordtype">int</span> in_nrIC);
102<a name="l00156"></a>00156
103<a name="l00164"></a>00164   <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Fast__ICA.html#7a85ae226dbd916fb32855b3c0c7ea13" title="Set non-linearity.">set_non_linearity</a>(<span class="keywordtype">int</span> in_g);
104<a name="l00165"></a>00165
105<a name="l00173"></a>00173   <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Fast__ICA.html#de8e827ab21bfbe2ddb37079b8f5a270" title="Set fine tuning.">set_fine_tune</a>(<span class="keywordtype">bool</span> in_finetune);
106<a name="l00174"></a>00174
107<a name="l00182"></a>00182   <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Fast__ICA.html#283c87044e9cb5f685ed3beba229ece1" title="Set  parameter.">set_a1</a>(<span class="keywordtype">double</span> fl_a1);
108<a name="l00183"></a>00183
109<a name="l00191"></a>00191   <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Fast__ICA.html#4b5a90b2c3dfd866021722013879197f" title="Set  parameter.">set_a2</a>(<span class="keywordtype">double</span> fl_a2);
110<a name="l00192"></a>00192
111<a name="l00200"></a>00200   <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Fast__ICA.html#24080ec83e0eef5fce26e6354db8a5e1" title="Set  parameter.">set_mu</a>(<span class="keywordtype">double</span> fl_mu);
112<a name="l00201"></a>00201
113<a name="l00209"></a>00209   <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Fast__ICA.html#902f4190e0a1b2f105424001bff8404c" title="Set convergence parameter .">set_epsilon</a>(<span class="keywordtype">double</span> fl_epsilon);
114<a name="l00210"></a>00210
115<a name="l00218"></a>00218   <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Fast__ICA.html#763df3b1c388c335bf3dd6177f74cf7f" title="Set sample size.">set_sample_size</a>(<span class="keywordtype">double</span> fl_sampleSize);
116<a name="l00219"></a>00219
117<a name="l00227"></a>00227   <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Fast__ICA.html#cdff1cc7a22ecd80b4f584d3374f3074" title="Set stabilization mode true or off.">set_stabilization</a>(<span class="keywordtype">bool</span> in_stabilization);
118<a name="l00228"></a>00228
119<a name="l00236"></a>00236   <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Fast__ICA.html#c30c899a1b1842bac9a4621c76cfc424" title="Set maximum number of iterations.">set_max_num_iterations</a>(<span class="keywordtype">int</span> in_maxNumIterations);
120<a name="l00237"></a>00237
121<a name="l00245"></a>00245   <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Fast__ICA.html#3aa0eeac18475d6b24c700df91f1e318" title="Set maximum number of iterations for fine tuning.">set_max_fine_tune</a>(<span class="keywordtype">int</span> in_maxFineTune);
122<a name="l00246"></a>00246
123<a name="l00254"></a>00254   <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Fast__ICA.html#7093b79902af24bbd7f8a19f90b5ca7d" title="Set first eigenvalue index to take into account.">set_first_eig</a>(<span class="keywordtype">int</span> in_firstEig);
124<a name="l00255"></a>00255
125<a name="l00263"></a>00263   <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Fast__ICA.html#c62cf3dcca78e4be1483d369aec79c43" title="Set last eigenvalue index to take into account.">set_last_eig</a>(<span class="keywordtype">int</span> in_lastEig);
126<a name="l00264"></a>00264
127<a name="l00272"></a>00272   <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Fast__ICA.html#45171a86aefc07a2f2950f13b61199f8" title="If true, only perform Principal Component Analysis (default = false).">set_pca_only</a>(<span class="keywordtype">bool</span> in_PCAonly);
128<a name="l00273"></a>00273
129<a name="l00281"></a>00281   <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Fast__ICA.html#055b4ee2ea9ec8478917e8342edefe75" title="Set initial guess matrix instead of random (default).">set_init_guess</a>(mat ma_initGuess);
130<a name="l00282"></a>00282
131<a name="l00283"></a>00283
132<a name="l00291"></a>00291   mat <a class="code" href="classitpp_1_1Fast__ICA.html#8aadde7b27ad5b96d8ea5648e14e5c4b" title="Get mixing matrix.">get_mixing_matrix</a>();
133<a name="l00292"></a>00292
134<a name="l00300"></a>00300   mat <a class="code" href="classitpp_1_1Fast__ICA.html#d656cd3ec1ae2dbdb8b4f0d75cd12e41" title="Get separating matrix.">get_separating_matrix</a>();
135<a name="l00301"></a>00301
136<a name="l00309"></a>00309   mat <a class="code" href="classitpp_1_1Fast__ICA.html#6e7e2d14c3349a4df7f64e39b8d52340" title="Get separated signals.">get_independent_components</a>();
137<a name="l00310"></a>00310
138<a name="l00318"></a>00318   <span class="keywordtype">int</span> <a class="code" href="classitpp_1_1Fast__ICA.html#f511dddf613b81f69367b5ecce453173" title="Get number of independent components.">get_nrof_independent_components</a>();
139<a name="l00319"></a>00319
140<a name="l00327"></a>00327   mat <a class="code" href="classitpp_1_1Fast__ICA.html#db59f7e4c803c92eae02e1334b93180b" title="Get nrIC first columns of the de-whitening matrix.">get_principal_eigenvectors</a>();
141<a name="l00328"></a>00328
142<a name="l00336"></a>00336   mat <a class="code" href="classitpp_1_1Fast__ICA.html#b0345814f26620c561e0989678ce172f" title="Get the whitening matrix.">get_whitening_matrix</a>();
143<a name="l00337"></a>00337
144<a name="l00345"></a>00345   mat <a class="code" href="classitpp_1_1Fast__ICA.html#055d92100892bfbfcb87cd61277219a3" title="Get the de-whitening matrix.">get_dewhitening_matrix</a>();
145<a name="l00346"></a>00346
146<a name="l00354"></a>00354   mat <a class="code" href="classitpp_1_1Fast__ICA.html#003151031bfcada70d9dd94ddaf558f9" title="Get whitened signals.">get_white_sig</a>();
147<a name="l00355"></a>00355
148<a name="l00356"></a>00356 <span class="keyword">private</span>:
149<a name="l00357"></a>00357
150<a name="l00358"></a>00358   <span class="keywordtype">int</span> approach, numOfIC, g, initState;
151<a name="l00359"></a>00359   <span class="keywordtype">bool</span> finetune, stabilization, PCAonly;
152<a name="l00360"></a>00360   <span class="keywordtype">double</span> a1, a2, mu, epsilon, sampleSize;
153<a name="l00361"></a>00361   <span class="keywordtype">int</span> maxNumIterations, maxFineTune;
154<a name="l00362"></a>00362
155<a name="l00363"></a>00363   <span class="keywordtype">int</span> firstEig, lastEig;
156<a name="l00364"></a>00364
157<a name="l00365"></a>00365   mat initGuess;
158<a name="l00366"></a>00366
159<a name="l00367"></a>00367   mat mixedSig, A, W, icasig;
160<a name="l00368"></a>00368
161<a name="l00369"></a>00369   mat whiteningMatrix;
162<a name="l00370"></a>00370   mat dewhiteningMatrix;
163<a name="l00371"></a>00371   mat whitesig;
164<a name="l00372"></a>00372
165<a name="l00373"></a>00373   mat E, VecPr;
166<a name="l00374"></a>00374   vec D;
167<a name="l00375"></a>00375
168<a name="l00376"></a>00376 }; <span class="comment">// class Fast_ICA</span>
169<a name="l00377"></a>00377
170<a name="l00378"></a>00378 } <span class="comment">// namespace itpp</span>
171<a name="l00379"></a>00379
172<a name="l00380"></a>00380
173<a name="l00381"></a>00381 <span class="preprocessor">#endif // #ifndef FASTICA_H</span>
174</pre></div></div>
175<hr size="1"><address style="text-align: right;"><small>Generated on Tue Jun 2 10:02:11 2009 for mixpp by&nbsp;
176<a href="http://www.doxygen.org/index.html">
177<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
178</body>
179</html>
Note: See TracBrowser for help on using the browser.