LogisticRegression.h

00001 #ifndef __LOGISTIC_REGRESSION_
00002 #define __LOGISTIC_REGRESSION_
00003 
00004 #include "StandardAlgorithm.h"
00005 #include "Framework.h"
00006 
00021 class LogisticRegression : public StandardAlgorithm, public Framework
00022 {
00023 public:
00024     LogisticRegression();
00025     ~LogisticRegression();
00026 
00027     virtual void modelInit();
00028     virtual void modelUpdate ( REAL* input, REAL* target, uint nSamples, uint crossRun );
00029     virtual void predictAllOutputs ( REAL* rawInputs, REAL* outputs, uint nSamples, uint crossRun );
00030     virtual void readSpecificMaps();
00031     virtual void saveWeights ( int cross );
00032     virtual void loadWeights ( int cross );
00033     virtual void loadMetaWeights ( int cross );
00034 
00035     static string templateGenerator ( int id, string preEffect, int nameID, bool blendStop );
00036 
00037 private:
00038 
00039     // solution weights (per cross validation set)
00040     REAL** m_x;
00041     double m_reg;
00042     double m_scale;  // target transformation: targetNew = target*scale + offset
00043     double m_offset; // ouput transformation : outoutNew = (output-offset)/scale
00044     bool m_tuneOffsetScale;
00045 
00046     NumericalTools solver;
00047 };
00048 
00049 
00050 #endif

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