|
FreeLing
4.0
|
Class AdaBoost implement a generic AB learner/classifier, which may be based on any kind of weak rule. More...
#include <adaboost.h>


Public Member Functions | |
| adaboost (int nl, std::wstring t) | |
| constructors, destructor and access methods | |
| adaboost (const std::wstring &file, const std::wstring &codes) | |
| int | n_rules () const |
| void | classify (const example &i, double pred[]) const |
| classification methods. | |
| std::vector< double > | classify (const example &i) const |
| classification returning vector: useful for Java API | |
| void | pcl_ini_pointer () |
| partial classification | |
| int | pcl_advance_pointer (int steps) |
| void | pcl_classify (const example &i, double *pred, int nrules) |
| Important: pred is an array of predictions, one for each label the function *adds* its predicion for each label. | |
| void | learn (dataset &ds, int nrounds, bool init, wr_params *p) |
| learning methods | |
| void | learn (dataset &ds, int nrounds, bool init, wr_params *p, const std::wstring &outf) |
| void | set_output (std::wostream *os) |
| I/O methods. | |
| void | read_from_stream (std::wistream *in) |
| void | read_from_file (const std::wstring &f) |
| void | set_initialize_weights (bool b) |
Private Member Functions | |
| void | initialize_weights (dataset &ds) |
| auxiliar learning functions | |
| void | update_weights (weak_rule *wr, double Z, dataset &ds) |
| void | add_weak_rule (weak_rule *wr) |
| adaboost (const adaboost &old_bab) | |
| copy constructor forbidden | |
Private Attributes | |
| bool | option_initialize_weights |
| class parameters | |
| std::wstring | wr_type |
| type of used weak rules | |
| adaboost::const_iterator | pcl_pointer |
| int | nrules |
| std::wostream * | out |
| output | |
Class AdaBoost implement a generic AB learner/classifier, which may be based on any kind of weak rule.
| freeling::adaboost::adaboost | ( | const adaboost & | old_bab | ) | [private] |
copy constructor forbidden
| freeling::adaboost::adaboost | ( | int | nl, |
| std::wstring | t | ||
| ) |
constructors, destructor and access methods
| freeling::adaboost::adaboost | ( | const std::wstring & | file, |
| const std::wstring & | codes | ||
| ) |
| void freeling::adaboost::add_weak_rule | ( | weak_rule * | wr | ) | [private] |
| void freeling::adaboost::classify | ( | const example & | i, |
| double | pred[] | ||
| ) | const [virtual] |
classification methods.
Important: pred is an array of predictions, one for each label the function *assigns* its predicion for each label.
Implements freeling::classifier.
| std::vector<double> freeling::adaboost::classify | ( | const example & | i | ) | const |
classification returning vector: useful for Java API
| void freeling::adaboost::initialize_weights | ( | dataset & | ds | ) | [private] |
auxiliar learning functions
| void freeling::adaboost::learn | ( | dataset & | ds, |
| int | nrounds, | ||
| bool | init, | ||
| wr_params * | p | ||
| ) |
learning methods
| void freeling::adaboost::learn | ( | dataset & | ds, |
| int | nrounds, | ||
| bool | init, | ||
| wr_params * | p, | ||
| const std::wstring & | outf | ||
| ) |
| int freeling::adaboost::n_rules | ( | ) | const |
| void freeling::adaboost::pcl_classify | ( | const example & | i, |
| double * | pred, | ||
| int | nrules | ||
| ) |
Important: pred is an array of predictions, one for each label the function *adds* its predicion for each label.
| void freeling::adaboost::pcl_ini_pointer | ( | ) |
partial classification
| void freeling::adaboost::read_from_file | ( | const std::wstring & | f | ) |
| void freeling::adaboost::read_from_stream | ( | std::wistream * | in | ) |
| void freeling::adaboost::set_initialize_weights | ( | bool | b | ) |
| void freeling::adaboost::set_output | ( | std::wostream * | os | ) |
I/O methods.
| void freeling::adaboost::update_weights | ( | weak_rule * | wr, |
| double | Z, | ||
| dataset & | ds | ||
| ) | [private] |
int freeling::adaboost::nrules [private] |
bool freeling::adaboost::option_initialize_weights [private] |
class parameters
std::wostream* freeling::adaboost::out [private] |
output
adaboost::const_iterator freeling::adaboost::pcl_pointer [private] |
std::wstring freeling::adaboost::wr_type [private] |
type of used weak rules
1.7.6.1