classias::multi_data_with_quark_base< instance_tmpl, attributes_quark_tmpl, labels_quark_tmpl, feature_generator_tmpl > Class Template Reference

Inheritance diagram for classias::multi_data_with_quark_base< instance_tmpl, attributes_quark_tmpl, labels_quark_tmpl, feature_generator_tmpl >:

classias::multi_data_base< instance_tmpl, feature_generator_tmpl > classias::candidate_data_base< instance_tmpl, feature_generator_tmpl > classias::binary_data_base< instance_tmpl >

Detailed Description

template<class instance_tmpl, class attributes_quark_tmpl, class labels_quark_tmpl, class feature_generator_tmpl>
class classias::multi_data_with_quark_base< instance_tmpl, attributes_quark_tmpl, labels_quark_tmpl, feature_generator_tmpl >

Data set for classification instances.

This class provides a data set for classification (attribute-label) instances.

Parameters:
instance_tmpl The type of an instance.
attributes_quark_tmpl The type of an attribute quark.
label_quark_tmpl The type of a label quark.
feature_generator_tmpl The type of a feature generator.


Public Types

typedef instance_tmpl instance_type
 The type of an instance.
typedef attributes_quark_tmpl attributes_quark_type
 The type of a feature vector.
typedef labels_quark_tmpl labels_quark_type
 The type of label quark.
typedef feature_generator_tmpl feature_generator_type
 The type of the feature-generator class.
typedef multi_data_base< instance_tmpl,
feature_generator_tmpl > 
base_type
 The base class.
typedef base_type::instances_type instances_type
 A type providing a container of instances.
typedef base_type::size_type size_type
 A type counting the number of pairs in a container.
typedef base_type::iterator iterator
 A type providing a random-access iterator.
typedef base_type::const_iterator const_iterator
 A type providing a read-only random-access iterator.
typedef base_type::attribute_type attribute_type
 The type of an attribute.
typedef labels_quark_type::value_type label_type
 The type of a label.

Public Member Functions

 multi_data_with_quark_base ()
 Constructs the object.
virtual ~multi_data_with_quark_base ()
 Destructs the object.
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.
void generate_bias_features (const attribute_type &a)
 Reserves bias features for all of possible labels.
void generate_features ()
 Finalize the data set.

Data Fields

attributes_quark_type attributes
 A set of attributes in the data set.
labels_quark_type labels
 A set of labels in the data set.


Member Function Documentation

template<class instance_tmpl, class attributes_quark_tmpl, class labels_quark_tmpl, class feature_generator_tmpl>
int classias::multi_data_with_quark_base< instance_tmpl, attributes_quark_tmpl, labels_quark_tmpl, feature_generator_tmpl >::num_attributes (  )  const [inline]

Returns the total number of attributes.

Returns:
int The total number of attributes.

Reimplemented from classias::multi_data_base< instance_tmpl, feature_generator_tmpl >.

template<class instance_tmpl, class attributes_quark_tmpl, class labels_quark_tmpl, class feature_generator_tmpl>
int classias::multi_data_with_quark_base< instance_tmpl, attributes_quark_tmpl, labels_quark_tmpl, feature_generator_tmpl >::num_labels (  )  const [inline]

Returns the total number of labels.

Returns:
int The total number of labels.

Reimplemented from classias::multi_data_base< instance_tmpl, feature_generator_tmpl >.

template<class instance_tmpl, class attributes_quark_tmpl, class labels_quark_tmpl, class feature_generator_tmpl>
int classias::multi_data_with_quark_base< instance_tmpl, attributes_quark_tmpl, labels_quark_tmpl, feature_generator_tmpl >::num_features (  )  const [inline]

Returns the total number of features.

Returns:
int The total number of features.

Reimplemented from classias::multi_data_base< instance_tmpl, feature_generator_tmpl >.

template<class instance_tmpl, class attributes_quark_tmpl, class labels_quark_tmpl, class feature_generator_tmpl>
void classias::multi_data_with_quark_base< instance_tmpl, attributes_quark_tmpl, labels_quark_tmpl, feature_generator_tmpl >::generate_bias_features ( const attribute_type a  )  [inline]

Reserves bias features for all of possible labels.

Parameters:
a The attribute identifier for the bias feature.

Reimplemented from classias::multi_data_base< instance_tmpl, feature_generator_tmpl >.

template<class instance_tmpl, class attributes_quark_tmpl, class labels_quark_tmpl, class feature_generator_tmpl>
void classias::multi_data_with_quark_base< instance_tmpl, attributes_quark_tmpl, labels_quark_tmpl, feature_generator_tmpl >::generate_features (  )  [inline]

Finalize the data set.

This function generates features for pairs of attributes and labels.

Reimplemented from classias::multi_data_base< instance_tmpl, feature_generator_tmpl >.


Copyright (c) 2002-2009 by Naoaki Okazaki
Mon Dec 28 23:41:05 2009