AdaBoost Class Reference

AdaBoost (adaptive boosting). More...

#include <adaboost.h>

Inheritance diagram for AdaBoost:

Inheritance graph
[legend]
Collaboration diagram for AdaBoost:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 AdaBoost (bool cvx=false, const cost::Cost &c=cost::_cost)
 AdaBoost (const Boosting &s)
 AdaBoost (std::istream &is)
virtual const id_tid () const
virtual AdaBoostcreate () const
 Create a new object using the default constructor.
virtual AdaBoostclone () const
 Create a new object by replicating itself.
virtual void train ()
 Train with preset data set and sample weight.

Protected Member Functions

virtual REAL convex_weight (const DataWgt &, const LearnModel &)
virtual REAL linear_weight (const DataWgt &, const LearnModel &)
virtual void linear_smpwgt (DataWgt &)

Protected Attributes

std::vector< REALcur_err
 data only valid within training (remove?)

Detailed Description

AdaBoost (adaptive boosting).

AdaBoost can be seen as gradient descent in the function space where the pointwise cost functional is defined as

\[ c(F(x_i),y_i) = e^{-y_i F(x_i)}\,. \]

Definition at line 21 of file adaboost.h.


Constructor & Destructor Documentation

AdaBoost bool  cvx = false,
const cost::Cost c = cost::_cost
[inline, explicit]
 

Definition at line 23 of file adaboost.h.

Referenced by AdaBoost::clone(), and AdaBoost::create().

AdaBoost const Boosting s  )  [inline]
 

Definition at line 25 of file adaboost.h.

AdaBoost std::istream &  is  )  [inline, explicit]
 

Definition at line 26 of file adaboost.h.


Member Function Documentation

virtual AdaBoost* clone  )  const [inline, virtual]
 

Create a new object by replicating itself.

Returns:
A pointer to the new copy.
The code for a derived class Derived is always
 return new Derived(*this); 
Though seemingly redundant, it helps to copy an object without knowing the real type of the object.
See also:
C++ FAQ Lite 20.6

Reimplemented from Boosting.

Definition at line 30 of file adaboost.h.

References AdaBoost::AdaBoost().

REAL convex_weight const DataWgt ,
const LearnModel
[protected, virtual]
 

Assign weight to a newly generated hypothesis.

We assume l is not but will be added.

Parameters:
sw the sample weight used in training l.
l the newly generated hypothesis.
Returns:
The weight of l. A nonpositive weight means the hypothesis l should not be added into the aggregation.

Reimplemented from Boosting.

Definition at line 43 of file adaboost.cpp.

References OBJ_FUNC_UNDEFINED.

virtual AdaBoost* create  )  const [inline, virtual]
 

Create a new object using the default constructor.

The code for a derived class Derived is always

 return new Derived(); 

Reimplemented from Boosting.

Definition at line 29 of file adaboost.h.

References AdaBoost::AdaBoost().

virtual const id_t& id  )  const [virtual]
 

Returns:
Class ID string (class name)

Reimplemented from Boosting.

void linear_smpwgt DataWgt  )  [protected, virtual]
 

Reimplemented from Boosting.

Definition at line 53 of file adaboost.cpp.

References AdaBoost::cur_err, Boosting::lm_wgt, Aggregating::n_in_agg, and LearnModel::n_samples.

REAL linear_weight const DataWgt ,
const LearnModel
[protected, virtual]
 

Reimplemented from Boosting.

Definition at line 20 of file adaboost.cpp.

References LearnModel::c_error(), AdaBoost::cur_err, LearnModel::exact_dimensions(), LearnModel::get_output(), LearnModel::n_samples, LearnModel::ptd, and LearnModel::train_data().

void train  )  [virtual]
 

Train with preset data set and sample weight.

Reimplemented from Boosting.

Definition at line 14 of file adaboost.cpp.

References AdaBoost::cur_err, LearnModel::n_samples, and Boosting::train().


Member Data Documentation

std::vector<REAL> cur_err [protected]
 

data only valid within training (remove?)

Definition at line 36 of file adaboost.h.

Referenced by AdaBoost::linear_smpwgt(), AdaBoost::linear_weight(), and AdaBoost::train().


The documentation for this class was generated from the following files:
Generated on Wed Nov 8 08:16:33 2006 for LEMGA by  doxygen 1.4.6