Inheritance diagram for classias::binary_data_base< instance_tmpl >:

This class represents a data set for training a binary classifier. The class stores instances into a vector. This class implements the necessary functions num_attributes(), num_features(), and num_labels() for training algorithms. Do not forget to call set_num_features() to specify the total number of features.
| instance_tmpl | The type of an instance. | 
Public Types | |
| typedef instance_tmpl | instance_type | 
| The type of an instance.  | |
| typedef std::vector< instance_type > | instances_type | 
| A type providing a container of instances.  | |
| typedef instances_type::size_type | size_type | 
| A type counting the number of pairs in a container.  | |
| typedef instances_type::iterator | iterator | 
| A type providing a random-access iterator.  | |
| typedef instances_type::const_iterator | const_iterator | 
| A type providing a read-only random-access iterator.  | |
| typedef instance_type::attribute_type | attribute_type | 
| The type of an attribute.  | |
Public Member Functions | |
| binary_data_base () | |
| Constructs the object.  | |
| virtual | ~binary_data_base () | 
| Destructs the object.  | |
| void | clear () | 
| Erases all the instances of the data.  | |
| bool | empty () const | 
| Tests if the data is empty.   | |
| size_type | size () const | 
| Returns the number of instances in the data.   | |
| instance_type & | operator[] (size_type i) | 
| Returns a read/write reference to an instance.   | |
| const instance_type & | operator[] (size_type i) const | 
| Returns a read-only reference to an instance.   | |
| iterator | begin () | 
| Returns a random-access iterator to the first instance.   | |
| const_iterator | begin () const | 
| Returns a random-access iterator to the first instance.   | |
| iterator | end () | 
| Returns a random-access iterator pointing just beyond the last instance.   | |
| const_iterator | end () const | 
| Returns a random-access iterator pointing just beyond the last instance.   | |
| instance_type & | back () | 
| Returns the reference to the last instance.   | |
| instance_type & | new_element () | 
| Creates and returns a new instance.   | |
| void | set_user_feature_start (int index) | 
| Sets the start index of user features.   | |
| int | get_user_feature_start () const | 
| Returns the start index of user features.   | |
| void | set_num_features (int num) | 
| Sets the total number of features.   | |
| int | num_attributes () const | 
| Returns the total number of attributes.   | |
| int | num_labels () const | 
| Returns the total number of labels.   | |
| int | num_features () const | 
| Returns the total number of features.   | |
Protected Attributes | |
| instances_type | instances | 
| A container of instances.  | |
| int | m_num_features | 
| The number of features.  | |
| int | m_feature_start_index | 
| The start index of features.  | |
| bool classias::binary_data_base< instance_tmpl >::empty | ( | ) |  const [inline] | 
        
Tests if the data is empty.
| bool | true if the data is empty, false otherwise.  | 
| size_type classias::binary_data_base< instance_tmpl >::size | ( | ) |  const [inline] | 
        
Returns the number of instances in the data.
| size_type | The current size of the data. | 
| instance_type& classias::binary_data_base< instance_tmpl >::operator[] | ( | size_type | i | ) |  [inline] | 
        
Returns a read/write reference to an instance.
| i | The index number for an instance. | 
| instance_type& | Reference to the instance. | 
| const instance_type& classias::binary_data_base< instance_tmpl >::operator[] | ( | size_type | i | ) |  const [inline] | 
        
Returns a read-only reference to an instance.
| i | The index number for an instance. | 
| const | instance_type& Reference to the instance. | 
| iterator classias::binary_data_base< instance_tmpl >::begin | ( | ) |  [inline] | 
        
Returns a random-access iterator to the first instance.
| iterator | A random-access iterator (for read/write) addressing the first instance in the data or to the location succeeding an empty instance. | 
| const_iterator classias::binary_data_base< instance_tmpl >::begin | ( | ) |  const [inline] | 
        
Returns a random-access iterator to the first instance.
| iterator | A random-access iterator (for read-only) addressing the first instance in the data or to the location succeeding an empty instance. | 
| iterator classias::binary_data_base< instance_tmpl >::end | ( | ) |  [inline] | 
        
Returns a random-access iterator pointing just beyond the last instance.
| iterator | A random-access iterator (for read/write) addressing the end of the instance. | 
| const_iterator classias::binary_data_base< instance_tmpl >::end | ( | ) |  const [inline] | 
        
Returns a random-access iterator pointing just beyond the last instance.
| iterator | A random-access iterator (for read-only) addressing the end of the instance. | 
| instance_type& classias::binary_data_base< instance_tmpl >::back | ( | ) |  [inline] | 
        
Returns the reference to the last instance.
| instance_type& | The reference pointing to the last instance in the data. | 
| instance_type& classias::binary_data_base< instance_tmpl >::new_element | ( | ) |  [inline] | 
        
Creates and returns a new instance.
| instance_type& | The reference to the new instance. | 
| void classias::binary_data_base< instance_tmpl >::set_user_feature_start | ( | int | index | ) |  [inline] | 
        
Sets the start index of user features.
| index | The start index of user features. | 
| int classias::binary_data_base< instance_tmpl >::get_user_feature_start | ( | ) |  const [inline] | 
        
Returns the start index of user features.
| void classias::binary_data_base< instance_tmpl >::set_num_features | ( | int | num | ) |  [inline] | 
        
Sets the total number of features.
| num | The number of features. | 
| int classias::binary_data_base< instance_tmpl >::num_attributes | ( | ) |  const [inline] | 
        
Returns the total number of attributes.
Reimplemented in classias::binary_data_with_quark_base< instance_tmpl, attributes_quark_tmpl >, classias::candidate_data_base< instance_tmpl, feature_generator_tmpl >, classias::candidate_data_with_quark_base< instance_tmpl, attributes_quark_tmpl, labels_quark_tmpl, feature_generator_tmpl >, classias::multi_data_base< instance_tmpl, feature_generator_tmpl >, and classias::multi_data_with_quark_base< instance_tmpl, attributes_quark_tmpl, labels_quark_tmpl, feature_generator_tmpl >.
| int classias::binary_data_base< instance_tmpl >::num_labels | ( | ) |  const [inline] | 
        
Returns the total number of labels.
Reimplemented in classias::binary_data_with_quark_base< instance_tmpl, attributes_quark_tmpl >, classias::candidate_data_base< instance_tmpl, feature_generator_tmpl >, classias::candidate_data_with_quark_base< instance_tmpl, attributes_quark_tmpl, labels_quark_tmpl, feature_generator_tmpl >, classias::multi_data_base< instance_tmpl, feature_generator_tmpl >, and classias::multi_data_with_quark_base< instance_tmpl, attributes_quark_tmpl, labels_quark_tmpl, feature_generator_tmpl >.
| int classias::binary_data_base< instance_tmpl >::num_features | ( | ) |  const [inline] | 
        
Returns the total number of features.
Reimplemented in classias::binary_data_with_quark_base< instance_tmpl, attributes_quark_tmpl >, classias::candidate_data_base< instance_tmpl, feature_generator_tmpl >, classias::candidate_data_with_quark_base< instance_tmpl, attributes_quark_tmpl, labels_quark_tmpl, feature_generator_tmpl >, classias::multi_data_base< instance_tmpl, feature_generator_tmpl >, and classias::multi_data_with_quark_base< instance_tmpl, attributes_quark_tmpl, labels_quark_tmpl, feature_generator_tmpl >.