#include <cascade.h>
Inheritance diagram for Cascade:
Public Member Functions | |
virtual Cascade * | create () const =0 |
Create a new object using the default constructor. | |
virtual Cascade * | clone () const =0 |
Create a new object by replicating itself. | |
virtual bool | support_weighted_data () const |
virtual REAL | train ()=0 |
Train with preset data set and sample weight. | |
virtual Output | operator() (const Input &) const |
virtual REAL | belief (const LearnModel &, const Input &, const Output &) const |
Belief at a specific pair of input and output. | |
Protected Member Functions | |
virtual bool | serialize (std::ostream &, ver_list &) const |
virtual bool | unserialize (std::istream &, ver_list &, const id_t &=empty_id) |
Protected Attributes | |
std::vector< REAL > | upper_margin |
std::vector< REAL > | lower_margin |
For classification problems, aggregating of hypotheses can be done in a cascade way. That is, a list of classifiers are trained from the training data; an unknown input is first classified using the first hypothesis in the list. If the first hypothesis cannot decide the classification with high reliability, the input is fed into the next one and so on. (See Cascade::operator() for details.) We can have as many hypotheses as the problem demands.
The ``reliability'' of a decision is usually determined by a concept named margin. There exist different definitions in literature, such as in AdaBoost,
in SVM. Despite of the differences in definitions, higher margins usually implicit more robustness to input disturbance and thus better generalization.
When margin is used in cascade to decide whether to go on to the next hypothesis, the real output y is unknown. A natual alternative is to use the ``sign'' part of the margin, i.e., in AdaBoost and
in SVM, and take the magnitude as the margin. Similar concepts, such as belief in belief propagation and log-likelihood in coding, can also be used.
We use the name ``belief'' in this class for binary-class problems. Very positive and very negative beliefs indicate strong confidence in the predicting and thus high reliability.
Definition at line 47 of file cascade.h.
|
Belief at a specific pair of input and output. We use the ``sign'' part of margin in AdaBoost Definition at line 58 of file cascade.cpp. References LearnModel::n_output(). Referenced by Cascade::operator()(). |
|
Create a new object by replicating itself.
return new Derived(*this);
Implements Aggregating. |
|
Create a new object using the default constructor. The code for a derived class Derived is always return new Derived(); Implements Aggregating. |
|
Implements LearnModel. Definition at line 40 of file cascade.cpp. References Cascade::belief(), Aggregating::lm, Cascade::lower_margin, Aggregating::n_in_agg, and Cascade::upper_margin. |
|
Reimplemented from Aggregating. Definition at line 10 of file cascade.cpp. References Aggregating::lm, Cascade::lower_margin, SERIALIZE_PARENT, and Cascade::upper_margin. |
|
Reimplemented from LearnModel. |
|
Train with preset data set and sample weight.
Implements LearnModel. |
|
Reimplemented from Aggregating. Definition at line 20 of file cascade.cpp. References Object::empty_id, Aggregating::lm, Cascade::lower_margin, UNSERIALIZE_PARENT, and Cascade::upper_margin. |
|
Definition at line 50 of file cascade.h. Referenced by Cascade::operator()(), Cascade::serialize(), and Cascade::unserialize(). |
|
Definition at line 49 of file cascade.h. Referenced by Cascade::operator()(), Cascade::serialize(), and Cascade::unserialize(). |