Provides an interface to sample data, for use by methods such as cross-validation
Inheritance:
Public Fields
-
int** train_subsets
- Training examples for each fold
-
int** test_subsets
- Test examples for each fold
-
int* n_train_subsets
- Number of training examples for each fold
-
int* n_test_subsets
- Number of test examples for each fold
Public Methods
-
KFold(Trainer* trainer_, int kfold_)
-
virtual void crossValidate(DataSet* data, MeasurerList* train_measurers=NULL, MeasurerList* test_measurers=NULL, MeasurerList* cross_valid_measurers=NULL)
- Do a cross-validation over data.
-
virtual void sample(int n_examples)
- Prepare the sample.
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 sample data, for use by methods such
as cross-validation
- int** train_subsets
- Training examples for each fold
- int** test_subsets
- Test examples for each fold
- int* n_train_subsets
- Number of training examples for each fold
- int* n_test_subsets
- Number of test examples for each fold
- KFold(Trainer* trainer_, int kfold_)
- virtual void crossValidate(DataSet* data, MeasurerList* train_measurers=NULL, MeasurerList* test_measurers=NULL, MeasurerList* cross_valid_measurers=NULL)
- Do a cross-validation over data.
train_measurers are called in each "train pass" for each fold.
test_measurers are called in each "test pass" for each fold.
cross_valid_measurers are called during the cross-validation loop.
- virtual void sample(int n_examples)
- Prepare the sample.
Given n_examples, puts the right examples-indices in train_subsets
and test_subsets, and updates n_train_subsets and n_test_subsets.
(You don't have to allocate these arrays).
The provided sample function is a standard sample for cross-validation,
but you could imagine what you want!
- This class has no child classes.
- Author:
- Samy Bengio (bengio@idiap.ch)
Ronan Collobert (collober@idiap.ch)
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.