PageRenderTime 42ms CodeModel.GetById 12ms RepoModel.GetById 1ms app.codeStats 0ms

/matlab/fieldtrip-20101107/external/fastica/gui_help.m

http://github.com/yuval-harpaz/ft_BIU
MATLAB | 224 lines | 190 code | 20 blank | 14 comment | 7 complexity | 604eafc026d32a797265b7c5877f383f MD5 | raw file
Possible License(s): BSD-3-Clause, GPL-3.0, GPL-2.0, AGPL-1.0, LGPL-2.0
  1. function gui_help(which_help)
  2. %
  3. % Used by FASTICAG
  4. % All the help texts and title used by GUI are stored here.
  5. % Make changes here.
  6. % Also displays the helpwindow with the selected text
  7. % @(#)$Id: gui_help.m,v 1.6 2005/10/19 13:05:34 jarmo Exp $
  8. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  9. switch which_help
  10. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  11. case 'pcamat'
  12. helptitle = 'FastICA: Reduce dimension';
  13. helptext=[ ...
  14. 'You may reduce the dimension of the data by selecting only the '
  15. 'subspace corresponding to certain eigenvalues of the covariance '
  16. 'matrix of the data. Give the indices of the first and last '
  17. 'eigenvalues (sorted in descending order) to be included (all '
  18. 'eigenvalues in between will be included as well). The eigenvalues '
  19. 'and their indices can be seen in the graphical plot now on the '
  20. 'screen. The heights of the bars give the eigenvalues, with indices '
  21. 'below. '
  22. ' '
  23. 'For example, give ''1'' and ''n'' if you want to reduce the dimension '
  24. 'to n by principal component analysis, which means discarding the '
  25. 'subspaces corresponding to the smallest eigenvalues. Such a '
  26. 'dimension reduction may reduce noise and improve the performance of'
  27. 'ICA. '];
  28. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  29. case 'gui_cb_about'
  30. helptitle='About FastICA';
  31. helptext =[ ...
  32. 'FastICA for Matlab 7.x and 6.x '
  33. 'Version 2.5, October 19 2005 '
  34. 'Copyright (c) Hugo Gävert, Jarmo Hurri, Jaakko Särelä, and Aapo Hyvärinen.'
  35. ' '
  36. 'For more information please see: '
  37. 'http://www.cis.hut.fi/projects/ica/fastica/ '];
  38. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  39. case 'gui_cb_help'
  40. helptitle='FastICA GUI';
  41. helptext = [...
  42. 'Basic function: '
  43. ' '
  44. '- Click LOAD DATA and give the name of the variable that contains '
  45. ' the data. '
  46. ' '
  47. '- Click DO ICA to perform the analysis. '
  48. ' '
  49. '- Click SAVE RESULTS to store the results for future use. '
  50. ' '
  51. 'Options: '
  52. ' '
  53. 'If the input matrix contains the signals as column vectors instead of '
  54. 'row vectors, click on TRANSPOSE to transpose the data matrix. '
  55. ' '
  56. 'Click on PLOT DATA to see the data as 1-D time signals. '
  57. ' '
  58. 'Clicking REDUCE DIM gives you a graphical plot of the eigenvalue '
  59. 'structure of the covariance matrix of the data. You can then reduce '
  60. 'the dimension of the data by retaining only the subspaces corresponding to '
  61. 'the largest (or smallest) eigenvalues (i.e. variances). To undo this '
  62. 'operation click ORIGINAL DIM. You can plot the whitened (preprocessed '
  63. 'data) by PLOT WHITENED. '
  64. ' '
  65. 'Click on DO ICA to perform independent component analysis. '
  66. 'Clicking on PLOT ICS has the same effect, except that DO ICA forces '
  67. 'recomputation of ICA. '
  68. ' '
  69. 'You can choose the decorrelation approach by the ''Approach'' drop-down menu:'
  70. 'deflation means that the independent components are estimated '
  71. 'one-by-one, whereas in the symmetric approach they are estimated in '
  72. 'parallel. You can now choose the number of independent components to be '
  73. 'estimated in both deflation and symmetric approaches. '
  74. ' '
  75. 'You have a choice of three nonlinearities: '
  76. ' '
  77. '''pow3'' (default) : g(u)=u^3 '
  78. '''tanh'' : g(u)=tanh(u) '
  79. '''gauss'' : g(u)=u*exp(-u^2/2) '
  80. '''skew'' : g(u)=u^2 '
  81. ' '
  82. 'For example, you could choose approach=''symmetric'' and nonlinearity=''tanh'' '
  83. 'to perform maximum likelihood ICA estimation for supergaussian data. '
  84. ' '
  85. 'If the algorithm does not seem to converge, you can use the stabilized '
  86. 'version of the fixed-point algorithm. To use the stabilized version, '
  87. 'choose ''on'' from the drop-down menu ''Stabilization''. '
  88. 'If you have specified a value less than 1 for the parameter ''mu'' from '
  89. 'the ''Advanced Options'' menu then the ''Stabilization'' drop-down menu is '
  90. 'not active. This is because if the parameter ''mu'' is less than 1 then the '
  91. 'program will use the stabilized code. Please see the help for '
  92. 'Advanced Options for more information about stabilization. '
  93. ' '
  94. 'The ADVANCED OPTIONS menu has its own HELP button. '
  95. ' '
  96. 'During computations, an INTERRUPT button appears. Clicking the button '
  97. 'interrupts the computations. '];
  98. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  99. case 'gui_advc'
  100. helptitle='FastICA GUI: Advanced options';
  101. helptext = [...
  102. 'Advanced options: '
  103. ' '
  104. 'In some cases, it may be desired to improve the statistical '
  105. 'performance of the algorithm by using a fine-tuning procedure. This '
  106. 'means that after (initial) convergence, the algorithm is run '
  107. '(possibly) with a different nonlinearity, and using a smaller step '
  108. 'size and the stabilized version of the fixed-point algorithm. '
  109. 'You can specify the nonlinearity that will then be used with the '
  110. 'parameter ''Finetune''. If you set the the finetuning to ''off'', then the'
  111. 'fine-tuning won''t be done. '
  112. ' '
  113. 'You can also fine-tune the nonlinearities used in the fixed-point '
  114. 'algorithm. '
  115. 'The nonlinearities tanh and gauss contain parameters a1 and a2, so '
  116. 'that the nonlinearities are in fact defined as: '
  117. '''tanh'' : g(u)=tanh(a1*u) '
  118. '''gauss'' : g(u)=u*exp(-a2*u^2/2) '
  119. 'The default values of a1 and a2 are 1, in which case they effectively '
  120. 'disappear from the definitions. '
  121. ' '
  122. 'If the algorithm does not seem to converge, you can use the stabilized'
  123. 'version of the fixed-point algorithm. There are two ways of doing '
  124. 'this. The first one is to explicitly specify the value of the step '
  125. 'size parameter ''mu''. The default value is 1. Choosing a value that '
  126. 'is smaller than 1 implies that the computations are made using the '
  127. 'stabilized fixed-point algorithm. The second way to use the stabilized'
  128. 'version is simpler: choose ''on'' in the drop-down menu ''stabilization'' '
  129. '(on the main menu page). Then the value of mu will be changed '
  130. 'automatically during the ICA calculations. If the program senses that '
  131. 'the algorithm is stuck between two points, it will halve the value of '
  132. 'mu (.5 * mu) for duration of one round. (This is called a ''stroke.''). '
  133. 'Also if there is no convergence before half of the maximum number of '
  134. 'iterations has been reached then the mu will be halved for the rest '
  135. 'of the rounds. '
  136. ' '
  137. 'The parameter ''epsilon'' is used to decide if the algorithm has '
  138. 'converged. A larger epsilon makes the convergence test less strict. '
  139. 'Note that if you use finetuning or stabilization, epsilon may need to '
  140. 'be reduced accordingly. '
  141. ' '
  142. '''Maximum number of iterations'' gives the absolute maximum of '
  143. 'iterations used in the estimation procedure. In the deflation '
  144. 'approach, this is iterations per component. '
  145. ' '
  146. 'You can input the ''Initial state'' of the algorithm, i.e. the initial '
  147. 'value for A. Choose ''guess'' in the drop-down menu ''Initial state'', '
  148. 'click on ''Load Initial guess'', and give the name of the variable in '
  149. 'Matlab workspace that contains the initial value. '
  150. ' '
  151. 'In the drop-down menu ''Display mode'' you can choose if the results are'
  152. 'plotted during computations. You may wish to switch this off '
  153. 'especially if you have lots of data which takes a long time to plot. '
  154. '''Iteration between displays'' tells how often the running estimates of '
  155. 'the independent components are plotted: A value of 1 means after every'
  156. 'iteration. '
  157. ' '
  158. 'If the data vector is very long (more than 10 000 points), it may be '
  159. 'advisable to use only a part of the data at every iteration. The '
  160. 'option ''Sample size'' allows you to give the proportion (0-1) of the '
  161. 'data that is used at every step. The sample is chosen randomly at '
  162. 'every step. '
  163. ' '
  164. 'Click on DEFAULT to return to default values for all advanced options.'
  165. 'You can make the new values take effect without closing the window by '
  166. 'clicking APPLY. '];
  167. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  168. case 'gui_lc_data'
  169. helptitle='FastICA GUI: Load data';
  170. helptext = [...
  171. 'Input the name of the variable in Matlab workspace that contains the '
  172. 'data. The data must be in a single matrix, each row (or column) giving'
  173. 'the values of one signal. If the signals are in column vectors, click '
  174. 'TRANSPOSE after loading the data to transpose the data matrix. '
  175. ' '
  176. 'If the data is in a file, load it to Matlab workspace first. '];
  177. case 'gui_lc_guess'
  178. helptitle='FastICA GUI: Load guess';
  179. helptext = [...
  180. 'Input the name of the variable in Matlab workspace that contains the'
  181. 'initial value for the mixing matrix A, and click OK. If the initial '
  182. 'value is in a file, load it to Matlab workspace first. '];
  183. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  184. case 'gui_sc'
  185. helptitle='FastICA GUI: Save results';
  186. helptext = [...
  187. 'The results will be saved as variables in Matlab workspace. '
  188. 'You give a suffix that identifies the variables. For example, if you '
  189. 'give ''_FASTICA'', the results will be stored in the following variables:'
  190. ' '
  191. 'W_FASTICA : estimate of the separating matrix '
  192. 'A_FASTICA : estimate of the mixing matrix '
  193. 'IC_FASTICA : estimated independent components (row vectors) '
  194. ' '
  195. 'Additional results related to preprocessing: '
  196. 'D_FASTICA and E_FASTICA : give the eigenvalue decomposition of the '
  197. ' covariance matrix '
  198. 'whiteningMatrix_FASTICA : matrix performing whitening and dimension '
  199. ' reduction '
  200. 'dewhiteningMatrix_FASTICA : the pseudoinverse of the whitening matrix '
  201. 'whitesig_FASTICA : whitened (i.e. preprocessed) signals. '];
  202. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  203. end
  204. helpwin(helptext, helptitle);