BlendingNN.h

00001 #ifndef __BLENDING_NN_
00002 #define __BLENDING_NN_
00003 
00004 #include "Data.h"
00005 #include "Framework.h"
00006 #include "nn.h"
00007 #include "AutomaticParameterTuner.h"
00008 
00009 using namespace std;
00010 
00021 class BlendingNN : public Data, public AutomaticParameterTuner, public Framework
00022 {
00023 public:
00024     BlendingNN();
00025     ~BlendingNN();
00026 
00027     void readSpecificMaps();
00028     void init();
00029     void train();
00030 
00031     // re-implemented here (for parameter tuner)
00032     double calcRMSEonProbe();
00033     double calcRMSEonBlend();
00034     void saveBestPrediction();
00035     void loadWeights();
00036 
00037     // prediction
00038     void predictEnsembleOutput ( REAL** predictions, REAL* output );
00039 
00040 private:
00041 
00042     // the NNs
00043     NN** m_nn;
00044 
00045     // train data
00046     REAL** m_fullPredictionsReal;
00047     REAL** m_inputsTrain;
00048     REAL** m_inputsProbe;
00049 
00050     // mean and std
00051     REAL* m_meanBlend;
00052     REAL* m_stdBlend;
00053 
00054     // prediction cache
00055     REAL* m_predictionCache;
00056 
00057     int m_nPredictors;
00058     vector<string> m_usedFiles;
00059 
00060     int m_epochs;
00061     int m_epochsBest;
00062 
00063     // dsc file
00064     int m_minTuninigEpochs;
00065     int m_maxTuninigEpochs;
00066     int m_nrLayer;
00067     int m_batchSize;
00068     double m_offsetOutputs;
00069     double m_scaleOutputs;
00070     double m_initWeightFactor;
00071     double m_learnrate;
00072     double m_learnrateMinimum;
00073     double m_learnrateSubtractionValueAfterEverySample;
00074     double m_learnrateSubtractionValueAfterEveryEpoch;
00075     double m_momentum;
00076     double m_weightDecay;
00077     double m_minUpdateErrorBound;
00078     double m_etaPosRPROP;
00079     double m_etaNegRPROP;
00080     double m_minUpdateRPROP;
00081     double m_maxUpdateRPROP;
00082     bool m_enableRPROP;
00083     bool m_useBLASforTraining;
00084     string m_neuronsPerLayer;
00085     string m_weightFile;
00086 
00087 };
00088 
00089 
00090 #endif

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