adaboost_erp.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #ifndef __LEMGA_MULTICLASS_ADABOOST_ERP_H__
00003 #define __LEMGA_MULTICLASS_ADABOOST_ERP_H__
00004 
00011 #include "adaboost_ecoc.h"
00012 
00013 namespace lemga {
00014 
00019 class AdaBoost_ERP : public AdaBoost_ECOC {
00020 protected:
00021     UINT lrs; 
00022     //? shall we save rp_step when serializing?
00023 
00024 public:
00025     AdaBoost_ERP () : AdaBoost_ECOC(), lrs(2) {}
00026     AdaBoost_ERP (const AdaBoost_ECOC& s) : AdaBoost_ECOC(s), lrs(2) {}
00027     explicit AdaBoost_ERP (std::istream& is) : lrs(2) { is >> *this; }
00028 
00029     virtual const id_t& id () const;
00030     virtual AdaBoost_ERP* create () const { return new AdaBoost_ERP(); }
00031     virtual AdaBoost_ERP* clone () const {
00032         return new AdaBoost_ERP(*this); }
00033 
00034     void set_lr_step (UINT s) { assert(s > 1); lrs = s; }
00035 
00036 protected:
00037     pLearnModel train_with_partial_partition (const ECOC_VECTOR&) const;
00038 
00039     virtual bool ECOC_partition (UINT, ECOC_VECTOR&) const;
00040     virtual pLearnModel train_with_partition (ECOC_VECTOR&) const;
00041 };
00042 
00043 } // namespace lemga
00044 
00045 #ifdef  __ADABOOST_ERP_H__
00046 #warning "This header file may conflict with another `adaboost_erp.h' file."
00047 #endif
00048 #define __ADABOOST_ERP_H__
00049 #endif

Generated on Wed Nov 8 08:15:20 2006 for LEMGA by  doxygen 1.4.6