00001 #ifndef __IcaNet2_1__ 00002 #define __IcaNet2_1__ 00003 00029 #include "RealVector.hpp" 00030 00031 class IcaNet2_1 00032 { 00033 private: 00034 00035 bool superGaussian; 00036 00037 double learnRate; 00038 00039 RealVector* w; 00040 double wNorm2; 00041 RealVector* dw; 00042 00043 // moment et kurtosis 00044 double v; 00045 00046 double m2; 00047 double m4; 00048 double kurt; 00049 00050 protected: 00051 00052 virtual void learn(RealVector* sample); 00053 00054 public: 00055 00056 // default is sub-gaussian 00057 IcaNet2_1(double rate=0.1, double weight=0.1) 00058 {learnRate=rate; superGaussian= false; w=0; dw=0; m4=kurt=0.0; v= weight;} 00059 virtual ~IcaNet2_1() 00060 { 00061 if( w != 0 ) 00062 { 00063 delete w; 00064 delete dw; 00065 } 00066 } 00067 virtual RealVector* getW(){return w;} 00068 00069 virtual bool isSuperGaussian(){return superGaussian;} 00070 00071 // learning 00072 virtual void init(int size); 00073 virtual void learning(RealVector* sample, int nmax=1); 00074 00075 // out 00076 virtual double forward(RealVector* src); // maximise abslote value of kurtosis 00077 00078 virtual void output() 00079 { 00080 printf("Single ICA Net"); 00081 } 00082 }; 00083 00084 #endif