KernelRidgeRegression.h

00001 #ifndef __KERNEL_RIDGE_REGRESSION_
00002 #define __KERNEL_RIDGE_REGRESSION_
00003 
00004 #include "StandardAlgorithm.h"
00005 #include "Framework.h"
00006 
00019 class KernelRidgeRegression : public StandardAlgorithm, public Framework
00020 {
00021 public:
00022     KernelRidgeRegression();
00023     ~KernelRidgeRegression();
00024 
00025     virtual void modelInit();
00026     virtual void modelUpdate ( REAL* input, REAL* target, uint nSamples, uint crossRun );
00027     virtual void predictAllOutputs ( REAL* rawInputs, REAL* outputs, uint nSamples, uint crossRun );
00028     virtual void readSpecificMaps();
00029     virtual void saveWeights ( int cross );
00030     virtual void loadWeights ( int cross );
00031     virtual void loadMetaWeights ( int cross );
00032 
00033     static string templateGenerator ( int id, string preEffect, int nameID, bool blendStop );
00034 
00035 private:
00036 
00037     // solution weights (per cross validation set)
00038     REAL** m_x;
00039     REAL* m_trainMatrix;
00040     double m_reg;
00041 
00042     // polynomial kernel
00043     double m_polyScale;
00044     double m_polyBiasPos;
00045     double m_polyBiasNeg;
00046     double m_polyPower;
00047 
00048     // gauss kernel
00049     double m_gaussSigma;
00050 
00051     // tanh kernel
00052     double m_tanhScale;
00053     double m_tanhBiasPos;
00054     double m_tanhBiasNeg;
00055 
00056     // dsc file
00057     string m_kernelType;
00058 };
00059 
00060 
00061 #endif

Generated on Tue Jan 26 09:20:59 2010 for ELF by  doxygen 1.5.8