Bagging Class Reference

Bagging (boostrap aggregating). More...

#include <bagging.h>

Inheritance diagram for Bagging:

Inheritance graph
[legend]
Collaboration diagram for Bagging:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Bagging (UINT max=0)
 Bagging (std::istream &is)
virtual const id_tid () const
virtual Baggingcreate () const
 Create a new object using the default constructor.
virtual Baggingclone () const
 Create a new object by replicating itself.
virtual bool support_weighted_data () const
 Whether the learning model/algorithm supports unequally weighted data.
virtual REAL train ()
 Train with preset data set and sample weight.
virtual Output operator() (const Input &) const

Detailed Description

Bagging (boostrap aggregating).

Bagging averages over all hypotheses.

Todo:
Documentation

Definition at line 20 of file bagging.h.


Constructor & Destructor Documentation

Bagging UINT  max = 0  )  [explicit]
 

Definition at line 12 of file bagging.cpp.

References Aggregating::set_max_models().

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

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

Definition at line 23 of file bagging.h.


Member Function Documentation

virtual Bagging* 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

Implements Aggregating.

Definition at line 27 of file bagging.h.

References Bagging::Bagging().

virtual Bagging* create  )  const [inline, virtual]
 

Create a new object using the default constructor.

The code for a derived class Derived is always

 return new Derived(); 

Implements Aggregating.

Definition at line 26 of file bagging.h.

References Bagging::Bagging().

virtual const id_t& id  )  const [virtual]
 

Returns:
Class ID string (class name)

Implements Object.

Output operator() const Input  )  const [virtual]
 

Implements LearnModel.

Definition at line 16 of file bagging.cpp.

References LearnModel::_n_out, Aggregating::lm, Aggregating::n_in_agg, and Aggregating::size().

virtual bool support_weighted_data  )  const [inline, virtual]
 

Whether the learning model/algorithm supports unequally weighted data.

Returns:
true if supporting; false otherwise. The default is false, just for safety.
See also:
set_train_data()

Reimplemented from LearnModel.

Definition at line 29 of file bagging.h.

REAL train  )  [virtual]
 

Train with preset data set and sample weight.

Returns:
Probably the training error.
Todo:
Make the return type void

Implements LearnModel.

Definition at line 33 of file bagging.cpp.

References Aggregating::empty(), LearnModel::initialize(), Aggregating::lm, Aggregating::lm_base, Aggregating::max_n_model, Aggregating::n_in_agg, LearnModel::n_samples, LearnModel::ptd, LearnModel::ptw, LearnModel::set_train_data(), LearnModel::train(), and VERBOSE_OUTPUT.


The documentation for this class was generated from the following files:
Generated on Mon Jan 9 23:44:34 2006 for LEMGA by  doxygen 1.4.6