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