#include <stump.h>
Inheritance diagram for Stump:
Public Member Functions | |
Stump (UINT n_in=0) | |
Stump (std::istream &is) | |
virtual const id_t & | id () const |
virtual Stump * | create () const |
Create a new object using the default constructor. | |
virtual Stump * | clone () const |
Create a new object by replicating itself. | |
UINT | index () const |
REAL | threshold () const |
bool | direction () const |
bool | soft_threshold () const |
void | use_soft_threshold (bool s=true) |
virtual bool | support_weighted_data () const |
Whether the learning model/algorithm supports unequally weighted data. | |
virtual void | train () |
Train with preset data set and sample weight. | |
virtual Output | operator() (const Input &) const |
Static Public Member Functions | |
static REAL | train_1d (const std::vector< REAL > &, const std::vector< REAL > &, REAL, bool &, bool &, REAL &, REAL &) |
Find the optimal threshold and direction (prefer the middle thresholds). | |
static REAL | train_1d (const std::vector< REAL > &, const std::vector< REAL > &) |
Find the optimal threshold for positive direction. | |
Protected Member Functions | |
virtual bool | serialize (std::ostream &, ver_list &) const |
virtual bool | unserialize (std::istream &, ver_list &, const id_t &=NIL_ID) |
Definition at line 18 of file stump.h.
|
Definition at line 25 of file stump.h. Referenced by Stump::clone(), and Stump::create(). |
|
|
|
Create a new object by replicating itself.
return new Derived(*this);
Implements LearnModel. Definition at line 31 of file stump.h. References Stump::Stump(). |
|
Create a new object using the default constructor. The code for a derived class Derived is always return new Derived(); Implements LearnModel. Definition at line 30 of file stump.h. References Stump::Stump(). |
|
|
|
Implements Object. |
|
|
|
Implements LearnModel. Definition at line 194 of file stump.cpp. References LearnModel::n_input(). |
|
Reimplemented from LearnModel. Definition at line 16 of file stump.cpp. References SERIALIZE_PARENT. |
|
|
|
Whether the learning model/algorithm supports unequally weighted data.
Reimplemented from LearnModel. |
|
|
|
Train with preset data set and sample weight.
Implements LearnModel. Definition at line 160 of file stump.cpp. References LearnModel::_n_in, LearnModel::n_samples, LearnModel::ptd, LearnModel::ptw, LearnModel::set_dimensions(), and Stump::train_1d(). |
|
Find the optimal threshold for positive direction.
Definition at line 43 of file stump.cpp. References INFINITESIMAL, and INFINITY. |
|
Find the optimal threshold and direction (prefer the middle thresholds).
Definition at line 82 of file stump.cpp. References INFINITESIMAL. Referenced by Stump::train(). |
|
Reimplemented from LearnModel. Definition at line 22 of file stump.cpp. References LearnModel::_n_in, LearnModel::_n_out, Object::NIL_ID, and UNSERIALIZE_PARENT. |
|
|