This class implements an instance for binary classification. An instance for binary classification consists of a feature vector (implemented by features_tmpl) and a binary label (implemented in this class). In addition, an instance class exposes the interfaces for instance weighting (implemented by weight_tmpl) and instance group numbers (implemented by group_tmpl).
features_tmpl | The type of a feature (=attribute) vector. | |
weight_tmpl | The base class implementing instance weighting. By default, this class uses weight_base. | |
group_tmpl | The base class implementing group numbers. By default, this class uses group_base. |
Public Types | |
typedef features_tmpl | features_type |
The type of a feature vector. | |
typedef weight_tmpl | weight_type |
The type of a weight interface. | |
typedef group_tmpl | group_type |
The type of a group instance. | |
typedef features_type::identifier_type | attribute_type |
The type of an attribute identifier. | |
typedef features_type::value_type | value_type |
The type of an attribute value. | |
Public Member Functions | |
binary_instance_base () | |
Constructs an object. | |
virtual | ~binary_instance_base () |
Destructs an object. | |
void | set_label (bool l) |
Sets the boolean label of the instance. | |
bool | get_label () const |
Gets the boolean label of the instance. | |
Protected Attributes | |
bool | m_label |
The label (truth) of this instance. |
void classias::binary_instance_base< features_tmpl, weight_tmpl, group_tmpl >::set_label | ( | bool | l | ) | [inline] |
Sets the boolean label of the instance.
l | The boolean label. |
bool classias::binary_instance_base< features_tmpl, weight_tmpl, group_tmpl >::get_label | ( | ) | const [inline] |
Gets the boolean label of the instance.