IT++ Logo

fastica.h

Go to the documentation of this file.
00001 
00063 #ifndef FASTICA_H
00064 #define FASTICA_H
00065 
00066 #include <itpp/base/mat.h>
00067 
00068 
00070 #define FICA_APPROACH_DEFL 2
00072 #define FICA_APPROACH_SYMM 1
00073 
00075 #define FICA_NONLIN_POW3 10
00077 #define FICA_NONLIN_TANH 20
00079 #define FICA_NONLIN_GAUSS 30
00081 #define FICA_NONLIN_SKEW 40
00082 
00084 #define FICA_INIT_RAND  0
00086 #define FICA_INIT_GUESS 1
00087 
00089 #define FICA_TOL 1e-9
00090 
00091 namespace itpp
00092 {
00093 
00098 //---------------------- FastICA --------------------------------------
00099 
00119 class Fast_ICA
00120 {
00121 
00122 public:
00123 
00131   Fast_ICA(mat ma_mixed_sig);
00132 
00138   void separate(void);
00139 
00147   void set_approach(int in_approach);
00148 
00156   void set_nrof_independent_components(int in_nrIC);
00157 
00165   void set_non_linearity(int in_g);
00166 
00174   void set_fine_tune(bool in_finetune);
00175 
00183   void set_a1(double fl_a1);
00184 
00192   void set_a2(double fl_a2);
00193 
00201   void set_mu(double fl_mu);
00202 
00210   void set_epsilon(double fl_epsilon);
00211 
00219   void set_sample_size(double fl_sampleSize);
00220 
00228   void set_stabilization(bool in_stabilization);
00229 
00237   void set_max_num_iterations(int in_maxNumIterations);
00238 
00246   void set_max_fine_tune(int in_maxFineTune);
00247 
00255   void set_first_eig(int in_firstEig);
00256 
00264   void set_last_eig(int in_lastEig);
00265 
00273   void set_pca_only(bool in_PCAonly);
00274 
00282   void set_init_guess(mat ma_initGuess);
00283 
00284 
00292   mat get_mixing_matrix();
00293 
00301   mat get_separating_matrix();
00302 
00310   mat get_independent_components();
00311 
00319   int get_nrof_independent_components();
00320 
00328   mat get_principal_eigenvectors();
00329 
00337   mat get_whitening_matrix();
00338 
00346   mat get_dewhitening_matrix();
00347 
00355   mat get_white_sig();
00356 
00357 private:
00358 
00359   int approach, numOfIC, g, initState;
00360   bool finetune, stabilization, PCAonly;
00361   double a1, a2, mu, epsilon, sampleSize;
00362   int maxNumIterations, maxFineTune;
00363 
00364   int firstEig, lastEig;
00365 
00366   mat initGuess;
00367 
00368   mat mixedSig, A, W, icasig;
00369 
00370   mat whiteningMatrix;
00371   mat dewhiteningMatrix;
00372   mat whitesig;
00373 
00374   mat E, VecPr;
00375   vec D;
00376 
00377 }; // class Fast_ICA
00378 
00379 } // namespace itpp
00380 
00381 
00382 #endif // #ifndef FASTICA_H
SourceForge Logo

Generated on Thu Apr 23 20:07:47 2009 for IT++ by Doxygen 1.5.8