LinearModelNonNeg.h
00001 #ifndef __LINEARMODELNONNEG_
00002 #define __LINEARMODELNONNEG_
00003
00004 #include "StandardAlgorithm.h"
00005 #include "Framework.h"
00006
00015 class LinearModelNonNeg : public StandardAlgorithm, public Framework
00016 {
00017 public:
00018 LinearModelNonNeg();
00019 ~LinearModelNonNeg();
00020
00021 virtual void modelInit();
00022 virtual void modelUpdate ( REAL* input, REAL* target, uint nSamples, uint crossRun );
00023 virtual void predictAllOutputs ( REAL* rawInputs, REAL* outputs, uint nSamples, uint crossRun );
00024 virtual void readSpecificMaps();
00025 virtual void saveWeights ( int cross );
00026 virtual void loadWeights ( int cross );
00027 virtual void loadMetaWeights ( int cross );
00028
00029 static string templateGenerator ( int id, string preEffect, int nameID, bool blendStop );
00030
00031 private:
00032
00033
00034 REAL** m_x;
00035 double m_reg;
00036 double m_scale;
00037 double m_bias;
00038 int m_maxNonNegSolverIterations;
00039
00040 NumericalTools solver;
00041
00042
00043 double m_initReg;
00044 double m_initScale;
00045 double m_initBias;
00046 };
00047
00048
00049 #endif