PolynomialRegression.h
00001 #ifndef __POLYNOMIAL_REGRESSION_
00002 #define __POLYNOMIAL_REGRESSION_
00003
00004 #include "StandardAlgorithm.h"
00005 #include "Framework.h"
00006
00019 class PolynomialRegression : public StandardAlgorithm, public Framework
00020 {
00021 public:
00022 PolynomialRegression();
00023 ~PolynomialRegression();
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 REAL power ( REAL x, int e );
00037
00038
00039 REAL** m_x;
00040 double m_reg;
00041 int m_inputDim;
00042
00043
00044
00045
00046 NumericalTools solver;
00047
00048 REAL* m_polyMean;
00049 REAL* m_polyStd;
00050
00051
00052 int m_polyOrder;
00053 bool m_enableCrossInteractions;
00054 };
00055
00056
00057 #endif