Provides an interface to manipulate all kind of data.
Inheritance:
Public Fields
-
int* selected_examples
- The indices of all selected examples.
-
int n_inputs
- Frame size of inputs.
-
int n_targets
- Frame size of targets.
-
int real_current_example_index
- Index of the current example.
-
Sequence* inputs
- Pointer on the inputs of the current example
-
Sequence* targets
- Pointer to the targets of the current example
-
int n_examples
- Number of examples in the dataset.
-
int n_real_examples
- Real number of examples in the dataset.
Public Methods
-
DataSet()
-
void init(int n_examples_, int n_inputs_, int n_targets_)
- Method which initializes some fields of the datasets.
-
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].
-
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.
-
virtual void pushSubset(int* subset_, int n_examples_)
- Set a new subset.
-
virtual void popSubset()
- Remove the last subset.
-
virtual void pushExample() = 0
- Tells that the current example must be kept in memory after next calls of setExample().
-
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().
-
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.
-
virtual void preProcess(PreProcessing* pre_processing) = 0
- Perform some pre-processing on data
Inherited from Object:
Public Fields
-
Allocator* allocator
Public Methods
-
void addOption(const char* name, int size, void* ptr, const char* help="")
-
void addIOption(const char* name, int* ptr, int init_value, const char* help="")
-
void addROption(const char* name, real* ptr, real init_value, const char* help="")
-
void addBOption(const char* name, bool* ptr, bool init_value, const char* help="")
-
void addOOption(const char* name, Object** ptr, Object* init_value, const char* help="")
-
void setOption(const char* name, void* ptr)
-
void setIOption(const char* name, int option)
-
void setROption(const char* name, real option)
-
void setBOption(const char* name, bool option)
-
void setOOption(const char* name, Object* option)
-
virtual void loadXFile(XFile* file)
-
virtual void saveXFile(XFile* file)
-
void load(const char* filename)
-
void save(const char* filename)
-
void* operator new(size_t size, Allocator* allocator_=NULL)
-
void* operator new(size_t size, Allocator* allocator_, void* ptr_)
-
void 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.
int* selected_examples
- The indices of all selected examples.
When select_examples is false, it contains
the indices of all examples.
int n_inputs
- Frame size of inputs.
int n_targets
- Frame size of targets.
int real_current_example_index
- Index of the current example.
Warning: it's the real index and not the index
in the selected_examples table.
Sequence* inputs
- Pointer on the inputs of the current example
Sequence* targets
- Pointer to the targets of the current example
int n_examples
- Number of examples in the dataset.
If you're using select_examples, it's
the number of selected examples.
int 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)
DataSet()
void 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.
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].
Warning: after a setExample() the previous selected example
is not supposed to exist... for that, use pushExample().
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. 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().
virtual void pushSubset(int* subset_, int n_examples_)
- Set a new subset.
- subset_ (of size n_examples_) is a set
of indices which define a subset of data.
- if a pushSubset() has been already called,
the next pushSubset() defines a subset of the
previous subset, and so on...
- this function set select_examples to true
and set the read indices of the examples in
selected_examples.
virtual void popSubset()
- Remove the last subset.
- recomputes "selected_examples".
- if it was the last subset, set select_examples
to false.
virtual void pushExample() = 0
- Tells that the current example must be kept in memory
after next calls of setExample().
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().
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.
This take subsets in account.
If one field is NULL, it will not be returned.
virtual 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++.