src/AdaBoostMHLearner.h

Go to the documentation of this file.
00001 /*
00002 * This file is part of MultiBoost, a multi-class 
00003 * AdaBoost learner/classifier
00004 *
00005 * Copyright (C) 2005 Norman Casagrande
00006 * For informations write to nova77@gmail.com
00007 *
00008 * This library is free software; you can redistribute it and/or
00009 * modify it under the terms of the GNU Lesser General Public
00010 * License as published by the Free Software Foundation; either
00011 * version 2.1 of the License, or (at your option) any later version.
00012 *
00013 * This library is distributed in the hope that it will be useful,
00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016 * Lesser General Public License for more details.
00017 *
00018 * You should have received a copy of the GNU Lesser General Public
00019 * License along with this library; if not, write to the Free Software
00020 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00021 *
00022 */
00023 
00028 #ifndef __ADA_BOOST_H
00029 #define __ADA_BOOST_H
00030 
00031 #include "IO/InputData.h"
00032 #include "Utils/Args.h"
00033 #include "WeakLearners/BaseLearner.h"
00034 
00035 using namespace std;
00036 
00039 
00040 namespace MultiBoost {
00041 
00047 class AdaBoostLearner
00048 {
00049 public:
00050 
00059    AdaBoostLearner(nor_utils::Args& args, int verbose = 1);
00060 
00070    void run(int numIterations, const string& trainFileName, const string& testFileName = "");
00071    
00072 protected:
00073 
00101    double updateWeights(InputData* pTrainData, BaseLearner* pWeakHypothesis);
00102 
00103    vector<BaseLearner*>  _foundHypotheses; 
00104 
00105    InputData*  _pTrainData; 
00106    InputData*  _pTestData; 
00107 
00108    string      _basicLearnerName; 
00109    string      _shypFileName; 
00110 
00111    int         _maxTime; 
00112    double      _theta; 
00113 
00114    nor_utils::Args&  _args;  
00115 
00123    int         _verbose;
00124    string      _outputInfoFile; 
00125 
00126    const double _smallVal; 
00127 
00129    
00130 };
00131 
00132 } // end of namespace MultiBoost
00133 
00134 #endif // __ADA_BOOST_H

Generated on Mon Nov 28 21:43:46 2005 for MultiBoost by  doxygen 1.4.5