class DataSet

Provides an interface to manipulate all kind of data.

Inheritance:


Public Fields

[more]int* selected_examples
The indices of all selected examples.
[more]int n_inputs
Frame size of inputs.
[more]int n_targets
Frame size of targets.
[more]int real_current_example_index
Index of the current example.
[more]Sequence* inputs
Pointer on the inputs of the current example
[more]Sequence* targets
Pointer to the targets of the current example
[more]int n_examples
Number of examples in the dataset.
[more]int n_real_examples
Real number of examples in the dataset.

Public Methods

[more] DataSet()
[more]void init(int n_examples_, int n_inputs_, int n_targets_)
Method which initializes some fields of the datasets.
[more]void setExample(int t, bool set_inputs=true, bool set_targets=true)
Set targets and inputs to the targets and inputs of the example with the index selected_examples[t].
[more]virtual void setRealExample(int t, bool set_inputs=true, bool set_targets=true) = 0
Set targets and inputs to the targets and inputs of the example with the index t.
[more]virtual void pushSubset(int* subset_, int n_examples_)
Set a new subset.
[more]virtual void popSubset()
Remove the last subset.
[more]virtual void pushExample() = 0
Tells that the current example must be kept in memory after next calls of setExample().
[more]virtual void popExample() = 0
Tells that the last pushed example will be now the current example, and therefore, will be forgeted after the next call of setExample().
[more]virtual void getNumberOfFrames(int t, int* n_input_frames, int* n_target_frames) = 0
Put in n_input_frames and n_target_frames the number of input frames and target frames for example t.
[more]virtual void preProcess(PreProcessing* pre_processing) = 0
Perform some pre-processing on data


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

Provides an interface to manipulate all kind of data. A dataset contains two kind of things: inputs sequences and targets sequences.

oint* selected_examples
The indices of all selected examples. When select_examples is false, it contains the indices of all examples.

oint n_inputs
Frame size of inputs.

oint n_targets
Frame size of targets.

oint real_current_example_index
Index of the current example. Warning: it's the real index and not the index in the selected_examples table.

oSequence* inputs
Pointer on the inputs of the current example

oSequence* targets
Pointer to the targets of the current example

oint n_examples
Number of examples in the dataset. If you're using select_examples, it's the number of selected examples.

oint n_real_examples
Real number of examples in the dataset. It's the number of examples in memory. (= n_examples if select_examples is false)

o DataSet()

ovoid init(int n_examples_, int n_inputs_, int n_targets_)
Method which initializes some fields of the datasets. It has to be called only in the constructor of your subclasses. Just for developpers of new datasets.

ovoid setExample(int t, bool set_inputs=true, bool set_targets=true)
Set targets and inputs to the targets and inputs of the example with the index selected_examples[t]. Warning: after a setExample() the previous selected example is not supposed to exist... for that, use pushExample().

ovirtual void setRealExample(int t, bool set_inputs=true, bool set_targets=true) = 0
Set targets and inputs to the targets and inputs of the example with the index t. If you create a new dataset, you must update inside current_example_index. Warning: after a setExample() the previous selected example is not supposed to exist... for that, use pushExample().

ovirtual void pushSubset(int* subset_, int n_examples_)
Set a new subset.

ovirtual void popSubset()
Remove the last subset.

ovirtual void pushExample() = 0
Tells that the current example must be kept in memory after next calls of setExample().

ovirtual void popExample() = 0
Tells that the last pushed example will be now the current example, and therefore, will be forgeted after the next call of setExample().

ovirtual void getNumberOfFrames(int t, int* n_input_frames, int* n_target_frames) = 0
Put in n_input_frames and n_target_frames the number of input frames and target frames for example t. This take subsets in account. If one field is NULL, it will not be returned.

ovirtual void preProcess(PreProcessing* pre_processing) = 0
Perform some pre-processing on data


Direct child classes:
MemoryDataSet
FrameSelectorDataSet
ExampleFrameSelectorDataSet
DiskDataSet
ClassFormatDataSet
Author:
Ronan Collobert (collober@idiap.ch)

Alphabetic index HTML hierarchy of classes or Java



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