#include <ordinal_ble.h>
Inheritance diagram for Ordinal_BLE:
Public Member Functions | |
Ordinal_BLE () | |
Ordinal_BLE (const Ordinal_BLE &) | |
const Ordinal_BLE & | operator= (const Ordinal_BLE &) |
Ordinal_BLE (std::istream &is) | |
virtual const id_t & | id () const |
virtual Ordinal_BLE * | create () const |
Create a new object using the default constructor. | |
virtual Ordinal_BLE * | clone () const |
Create a new object by replicating itself. | |
void | set_model (const LearnModel &) |
set the underlying learning model | |
const LearnModel & | model () const |
the underlying model | |
UINT | n_rank () const |
the number of ranks from the training set | |
virtual bool | support_weighted_data () const |
Whether the learning model/algorithm supports unequally weighted data. | |
virtual REAL | c_error (const Output &out, const Output &y) const |
Error measure for classification problems. | |
virtual REAL | r_error (const Output &out, const Output &y) const |
Error measure for regression problems. | |
virtual void | set_train_data (const pDataSet &, const pDataWgt &=0) |
Set the data set and sample weight to be used in training. | |
virtual void | train () |
Train with preset data set and sample weight. | |
virtual void | reset () |
virtual Output | operator() (const Input &) const |
bool | full_extension () const |
void | set_full_extension (bool=true) |
const ECOC_TABLE & | ECOC_table () const |
const EXT_TABLE & | extension_table () const |
void | set_tables (const ECOC_TABLE &, const EXT_TABLE &) |
void | set_tables (BLE_TYPE, UINT) |
Protected Member Functions | |
void | extend_input (const Input &, UINT, Input &) const |
void | extend_example (const Input &, UINT, UINT, Input &, REAL &) const |
void | extend_data () |
virtual REAL | ECOC_distance (const Output &, const ECOC_VECTOR &) const |
const std::vector< REAL > & | distances (const Input &) const |
virtual bool | serialize (std::ostream &, ver_list &) const |
virtual bool | unserialize (std::istream &, ver_list &, const id_t &=NIL_ID) |
Protected Attributes | |
pLearnModel | lm |
the learning model | |
bool | full_ext |
use the full extension or the partial one? | |
ECOC_TABLE | out_tab |
K (nrank) by T (n_hyp) output ECC matrix. | |
EXT_TABLE | ext_tab |
T (n_hyp) by E (n_ext) extension matrix. | |
UINT | n_ext |
pDataSet | ext_d |
the extended dataset | |
pDataWgt | ext_w |
the weight for the extended set | |
UINT | d_nrank |
number of ranking levels of the training set | |
bool | reset_data |
whether to reset the training set for lm | |
std::vector< REAL > | local_d |
Definition at line 23 of file ordinal_ble.h.
|
Definition at line 32 of file ordinal_ble.h. References LearnModel::set_dimensions(). Referenced by Ordinal_BLE::clone(), and Ordinal_BLE::create(). |
|
Definition at line 78 of file ordinal_ble.cpp. References Ordinal_BLE::lm. |
|
Definition at line 36 of file ordinal_ble.h. |
|
Error measure for classification problems.
Reimplemented from LearnModel. Definition at line 152 of file ordinal_ble.cpp. References LearnModel::n_output(), OUT2RANK, and VALIDRANK. |
|
Create a new object by replicating itself.
return new Derived(*this);
Implements LearnModel. Definition at line 40 of file ordinal_ble.h. References Ordinal_BLE::Ordinal_BLE(). |
|
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 39 of file ordinal_ble.h. References Ordinal_BLE::Ordinal_BLE(). |
|
Definition at line 304 of file ordinal_ble.cpp. References Ordinal_BLE::extend_input(), and Ordinal_BLE::lm. Referenced by Ordinal_BLE::operator()(). |
|
Definition at line 295 of file ordinal_ble.cpp. |
|
Definition at line 50 of file ordinal_ble.h. References Ordinal_BLE::out_tab. |
|
Definition at line 203 of file ordinal_ble.cpp. References dataset::append(), Ordinal_BLE::extend_example(), LearnModel::n_samples, nrank, OUT2RANK, and LearnModel::ptd. Referenced by Ordinal_BLE::train(). |
|
Definition at line 287 of file ordinal_ble.cpp. References Ordinal_BLE::extend_input(), nrank, and Ordinal_BLE::out_tab. Referenced by Ordinal_BLE::extend_data(). |
|
Definition at line 278 of file ordinal_ble.cpp. References Ordinal_BLE::ext_tab. Referenced by Ordinal_BLE::distances(), and Ordinal_BLE::extend_example(). |
|
Definition at line 51 of file ordinal_ble.h. References Ordinal_BLE::ext_tab. |
|
Definition at line 48 of file ordinal_ble.h. References Ordinal_BLE::full_ext. |
|
Implements Object. |
|
the underlying model
Definition at line 45 of file ordinal_ble.h. References Ordinal_BLE::lm. |
|
the number of ranks from the training set
Definition at line 57 of file ordinal_ble.h. References Ordinal_BLE::d_nrank. |
|
Implements LearnModel. Definition at line 270 of file ordinal_ble.cpp. References Ordinal_BLE::distances(), GET_BEST_RANK, RANK2OUT, and LearnModel::valid_dimensions(). |
|
Definition at line 87 of file ordinal_ble.cpp. References Ordinal_BLE::d_nrank, Ordinal_BLE::ext_d, Ordinal_BLE::ext_tab, Ordinal_BLE::ext_w, Ordinal_BLE::full_ext, Ordinal_BLE::lm, Ordinal_BLE::n_ext, Ordinal_BLE::out_tab, and Ordinal_BLE::reset_data. |
|
Error measure for regression problems.
Reimplemented from LearnModel. Definition at line 157 of file ordinal_ble.cpp. References LearnModel::n_output(), and VALIDRANK. |
|
Cleaning up the learning model but keeping most settings.
Reimplemented from LearnModel. Definition at line 257 of file ordinal_ble.cpp. References Ordinal_BLE::lm, and LearnModel::reset(). |
|
Reimplemented from LearnModel. Definition at line 18 of file ordinal_ble.cpp. References Ordinal_BLE::full_ext, Ordinal_BLE::lm, Ordinal_BLE::n_ext, n_hyp, nrank, Ordinal_BLE::out_tab, and SERIALIZE_PARENT. |
|
Definition at line 105 of file ordinal_ble.cpp. References Ordinal_BLE::ext_d, Ordinal_BLE::ext_w, and Ordinal_BLE::full_ext. |
|
set the underlying learning model
Definition at line 100 of file ordinal_ble.cpp. References LearnModel::clone(), Ordinal_BLE::lm, and Ordinal_BLE::reset_data. |
|
Definition at line 126 of file ordinal_ble.cpp. References lemga::MULTI_THRESHOLD. |
|
Definition at line 113 of file ordinal_ble.cpp. References Ordinal_BLE::ext_tab, Ordinal_BLE::local_d, nrank, and Ordinal_BLE::out_tab. Referenced by Ordinal_BLE::train(). |
|
Set the data set and sample weight to be used in training.
If the learning model/algorithm can only do training using uniform sample weight, i.e., support_weighted_data() returns
In order to make the life easier, when support_weighted_data() returns
Reimplemented from LearnModel. Definition at line 162 of file ordinal_ble.cpp. References Ordinal_BLE::d_nrank, Ordinal_BLE::ext_d, Ordinal_BLE::ext_w, LearnModel::n_samples, OUT2RANK, LearnModel::ptd, LearnModel::set_train_data(), and VALIDRANK. |
|
Whether the learning model/algorithm supports unequally weighted data.
Reimplemented from LearnModel. Definition at line 59 of file ordinal_ble.h. |
|
Train with preset data set and sample weight.
Implements LearnModel. Definition at line 232 of file ordinal_ble.cpp. References lemga::BLE_DEFAULT, Ordinal_BLE::d_nrank, Ordinal_BLE::ext_d, Ordinal_BLE::ext_w, Ordinal_BLE::extend_data(), Ordinal_BLE::lm, nrank, LearnModel::ptd, LearnModel::ptw, Ordinal_BLE::reset_data, LearnModel::set_dimensions(), and Ordinal_BLE::set_tables(). |
|
Reimplemented from LearnModel. Definition at line 45 of file ordinal_ble.cpp. References Ordinal_BLE::d_nrank, Ordinal_BLE::ext_d, Ordinal_BLE::ext_tab, Ordinal_BLE::ext_w, Ordinal_BLE::full_ext, Ordinal_BLE::lm, Ordinal_BLE::n_ext, n_hyp, Object::NIL_ID, nrank, Ordinal_BLE::out_tab, LearnModel::ptd, LearnModel::ptw, Ordinal_BLE::reset_data, and UNSERIALIZE_PARENT. |
|
number of ranking levels of the training set
Definition at line 70 of file ordinal_ble.h. Referenced by Ordinal_BLE::n_rank(), Ordinal_BLE::operator=(), Ordinal_BLE::set_train_data(), Ordinal_BLE::train(), and Ordinal_BLE::unserialize(). |
|
the extended dataset
Definition at line 68 of file ordinal_ble.h. Referenced by Ordinal_BLE::operator=(), Ordinal_BLE::set_full_extension(), Ordinal_BLE::set_train_data(), Ordinal_BLE::train(), and Ordinal_BLE::unserialize(). |
|
T (n_hyp) by E (n_ext) extension matrix.
Definition at line 28 of file ordinal_ble.h. Referenced by Ordinal_BLE::extend_input(), Ordinal_BLE::extension_table(), Ordinal_BLE::operator=(), Ordinal_BLE::set_tables(), and Ordinal_BLE::unserialize(). |
|
the weight for the extended set
Definition at line 69 of file ordinal_ble.h. Referenced by Ordinal_BLE::operator=(), Ordinal_BLE::set_full_extension(), Ordinal_BLE::set_train_data(), Ordinal_BLE::train(), and Ordinal_BLE::unserialize(). |
|
use the full extension or the partial one?
Definition at line 26 of file ordinal_ble.h. Referenced by Ordinal_BLE::full_extension(), Ordinal_BLE::operator=(), Ordinal_BLE::serialize(), Ordinal_BLE::set_full_extension(), and Ordinal_BLE::unserialize(). |
|
the learning model
Definition at line 25 of file ordinal_ble.h. Referenced by Ordinal_BLE::distances(), Ordinal_BLE::model(), Ordinal_BLE::operator=(), Ordinal_BLE::Ordinal_BLE(), Ordinal_BLE::reset(), Ordinal_BLE::serialize(), Ordinal_BLE::set_model(), Ordinal_BLE::train(), and Ordinal_BLE::unserialize(). |
|
Definition at line 78 of file ordinal_ble.h. Referenced by Ordinal_BLE::set_tables(). |
|
Definition at line 29 of file ordinal_ble.h. Referenced by Ordinal_BLE::operator=(), Ordinal_BLE::serialize(), and Ordinal_BLE::unserialize(). |
|
K (nrank) by T (n_hyp) output ECC matrix.
Definition at line 27 of file ordinal_ble.h. Referenced by Ordinal_BLE::ECOC_table(), Ordinal_BLE::extend_example(), Ordinal_BLE::operator=(), Ordinal_BLE::serialize(), Ordinal_BLE::set_tables(), and Ordinal_BLE::unserialize(). |
|
whether to reset the training set for lm
Definition at line 71 of file ordinal_ble.h. Referenced by Ordinal_BLE::operator=(), Ordinal_BLE::set_model(), Ordinal_BLE::train(), and Ordinal_BLE::unserialize(). |