FreeLing  4.0
Public Member Functions | Private Member Functions | Private Attributes
freeling::adaboost Class Reference

Class AdaBoost implement a generic AB learner/classifier, which may be based on any kind of weak rule. More...

#include <adaboost.h>

Inheritance diagram for freeling::adaboost:
Inheritance graph
[legend]
Collaboration diagram for freeling::adaboost:
Collaboration graph
[legend]

List of all members.

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

Detailed Description

Class AdaBoost implement a generic AB learner/classifier, which may be based on any kind of weak rule.


Constructor & Destructor Documentation

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 
)

Member Function Documentation

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

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 
)
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.

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_output ( std::wostream *  os)

I/O methods.

void freeling::adaboost::update_weights ( weak_rule wr,
double  Z,
dataset ds 
) [private]

Member Data Documentation

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


The documentation for this class was generated from the following file: