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_, DataSet* data_)
[more]virtual void bootstrapData(int* selected, int* is_selected)
create a boostrap of the data and put in in selected


Inherited from Trainer:

Public Methods

ovirtual void train(List* measurers)
ovirtual void test(List* measurers)
ovirtual void testExample(List* measurers, int t)
ovirtual void crossValidate(int k_fold, List* train_measurers, List* test_measurers, List* cross_valid_measurers=NULL)
ovirtual void loadFILE(FILE* file)
ovirtual void saveFILE(FILE* file)


Inherited from Object:

Public Methods

ovirtual void init()
ovoid addOption(const char* name, int size, void* ptr, const char* help="", bool is_allowed_after_init=false)
ovoid addIOption(const char* name, int* ptr, int init_value, const char* help="", bool is_allowed_after_init=false)
ovoid addROption(const char* name, real* ptr, real init_value, const char* help="", bool is_allowed_after_init=false)
ovoid addBOption(const char* name, bool* ptr, bool init_value, const char* help="", bool is_allowed_after_init=false)
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 load(const char* filename)
ovoid save(const char* filename)


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_, DataSet* data_)

ovirtual void bootstrapData(int* selected, int* is_selected)
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++.