class Bagging

This class represents a Trainer that implements the well-known Bagging algorithm (Breiman, 1996).

Inheritance:


Public Fields

[more]WeightedSumMachine* w_machine
This machine performs the combination.
[more]int n_trainers
The number of trainers in the bagging
[more]int** unselected_examples
for each trainer, keep the indices of examples not used during training
[more]int** selected_examples
for each trainer, keep the indices of examples used during training
[more]int* n_unselected_examples
for each trainer, keep the number of examples not used during training
[more]int* is_selected_examples
for each trainer, keep the number of examples used during training

Public Methods

[more] Bagging(WeightedSumMachine* w_machine)
[more]virtual void bootstrapData(int* selected, int* is_selected, int n_examples)
create a boostrap of the data and put in in selected


Inherited from Trainer:

Public Methods

ovirtual void train(DataSet* data_, MeasurerList* measurers)
ovirtual void test(MeasurerList* measurers)
ostatic Allocator* extractMeasurers(MeasurerList* measurers, DataSet* train, DataSet*** datas, Measurer**** meas, int** n_meas, int* n_datas)
ovirtual void loadXFile(XFile* file)
ovirtual void saveXFile(XFile* file)


Inherited from Object:

Public Fields

oAllocator* allocator

Public Methods

ovoid addOption(const char* name, int size, void* ptr, const char* help="")
ovoid addIOption(const char* name, int* ptr, int init_value, const char* help="")
ovoid addROption(const char* name, real* ptr, real init_value, const char* help="")
ovoid addBOption(const char* name, bool* ptr, bool init_value, const char* help="")
ovoid addOOption(const char* name, Object** ptr, Object* init_value, const char* help="")
ovoid setOption(const char* name, void* ptr)
ovoid setIOption(const char* name, int option)
ovoid setROption(const char* name, real option)
ovoid setBOption(const char* name, bool option)
ovoid setOOption(const char* name, Object* option)
ovoid load(const char* filename)
ovoid save(const char* filename)
ovoid* operator new(size_t size, Allocator* allocator_=NULL)
ovoid* operator new(size_t size, Allocator* allocator_, void* ptr_)
ovoid operator delete(void* ptr)


Documentation

This class represents a Trainer that implements the well-known Bagging algorithm (Breiman, 1996). A "bagger" contains a series of trainers, each trained on a bootstrap of the original dataset. The output of the bagging is then the average of the output of each trainer.

It is implemented using a WeightedSumMachine that performs the combination.

oWeightedSumMachine* w_machine
This machine performs the combination. It contains many trainers.

oint n_trainers
The number of trainers in the bagging

oint** unselected_examples
for each trainer, keep the indices of examples not used during training

oint** selected_examples
for each trainer, keep the indices of examples used during training

oint* n_unselected_examples
for each trainer, keep the number of examples not used during training

oint* is_selected_examples
for each trainer, keep the number of examples used during training

o Bagging(WeightedSumMachine* w_machine)

ovirtual void bootstrapData(int* selected, int* is_selected, int n_examples)
create a boostrap of the data and put in in selected


This class has no child classes.
Author:
Samy Bengio (bengio@idiap.ch)
See Also:
WeightedSumMachine

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.