class ClassFormatDataSet

Given a DataSet, convert (on-the-fly) targets using a conversion table.

Inheritance:


Public Fields

[more]DataSet* data
The provided DataSet
[more]Sequence* class_labels
The class label translation table

Public Methods

[more] ClassFormatDataSet(DataSet* data_, Sequence* class_labels_)
Here you provide the translation table in class_labels_
[more] ClassFormatDataSet(DataSet* data_, int n_classes=-1)
We assume here that you want the one-hot encoding format.


Inherited from DataSet:

Public Fields

oint* selected_examples
oint n_inputs
oint n_targets
oint real_current_example_index
oSequence* inputs
oSequence* targets
oint n_examples
oint n_real_examples

Public Methods

ovoid init(int n_examples_, int n_inputs_, int n_targets_)
ovoid setExample(int t, bool set_inputs=true, bool set_targets=true)
ovirtual void setRealExample(int t, bool set_inputs=true, bool set_targets=true)
ovirtual void pushSubset(int* subset_, int n_examples_)
ovirtual void popSubset()
ovirtual void pushExample()
ovirtual void popExample()
ovirtual void getNumberOfFrames(int t, int* n_input_frames, int* n_target_frames)
ovirtual void preProcess(PreProcessing* pre_processing)


Inherited from Object:

Public Fields

oAllocator* allocator

Public Methods

ovoid addOption(const char* name, int size, void* ptr, const char* help="")
ovoid addIOption(const char* name, int* ptr, int init_value, const char* help="")
ovoid addROption(const char* name, real* ptr, real init_value, const char* help="")
ovoid addBOption(const char* name, bool* ptr, bool init_value, const char* help="")
ovoid addOOption(const char* name, Object** ptr, Object* init_value, const char* help="")
ovoid setOption(const char* name, void* ptr)
ovoid setIOption(const char* name, int option)
ovoid setROption(const char* name, real option)
ovoid setBOption(const char* name, bool option)
ovoid setOOption(const char* name, Object* option)
ovirtual void loadXFile(XFile* file)
ovirtual void saveXFile(XFile* file)
ovoid load(const char* filename)
ovoid save(const char* filename)
ovoid* operator new(size_t size, Allocator* allocator_=NULL)
ovoid* operator new(size_t size, Allocator* allocator_, void* ptr_)
ovoid operator delete(void* ptr)


Documentation

Given a DataSet, convert (on-the-fly) targets using a conversion table.

The targets of the given DataSet should be 0,1,2... for the class 0, class 1, class 2, and so on. Note that is must START AT 0.

After a setExample(), the inputs of this DataSet will be the same as the provided one. The targets will be class_labels->frames[i], where i is contained in the targets of the provided DataSet.

oDataSet* data
The provided DataSet

oSequence* class_labels
The class label translation table

o ClassFormatDataSet(DataSet* data_, Sequence* class_labels_)
Here you provide the translation table in class_labels_

o ClassFormatDataSet(DataSet* data_, int n_classes=-1)
We assume here that you want the one-hot encoding format. The number of classes is given by n_classes, if positive. Otherwise, the number of classes is guessed by taking the maximum value of the targets of the provided DataSet.


This class has no child classes.
Author:
Ronan Collobert (collober@idiap.ch)

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.