k-fold cross validation class.
Macros:
Enumerations:
None.
Typedefs:
None.
Struct CapyKfoldCrossValidResClassifier :
Struct CapyKfoldCrossValidResClassifier's properties:
Number of folds
Result of evaluation training/validation
Min/avg/max accuracy on training/validation (in [0,1], higher is better)
Min/avg/max fitness on training/validation (in [0,1], higher is better)
Struct CapyKfoldCrossValidResClassifier's methods:
Destructor
Struct CapyKfoldCrossValid :
Struct CapyKfoldCrossValid's properties:
Number of fold
Flag to memorise the verbose mode (default: false)
Stream for the output in verbose mode (default: stdout)
Seed for the pseudo-random generator (default: 0)
Stream for the splits definition, if not null it is used to create the split during evaluation, else random splits are created (default: NULL). The stream is expected to be in same format as the splits file imported using openmlImport.
Struct CapyKfoldCrossValid's methods:
Destructor
Run the k-fold cross validation for a classifier and a dataset
Input argument(s):
classifier: the classifier
dataset: the dataset
Output and side effect(s):
The dataset is split into k folds (the original dataset is not modified), the classifier is trained on all combination of (k-1) fold and evaluated on the remaining fold.
Functions:
Create a CapyKfoldCrossValidResClassifier
Input argument(s):
k: the number of fold
Output and side effect(s):
Return a CapyKfoldCrossValidResClassifier
Create a CapyKfoldCrossValid
Input argument(s):
k: the number of fold
Output and side effect(s):
Return a CapyKfoldCrossValid
Allocate memory for a new CapyKfoldCrossValid and create it
Input argument(s):
k: the number of fold
Exception(s):
May raise CapyExc_MallocFailed.
Free the memory used by a CapyKfoldCrossValid* and reset '*that' to NULL
Input argument(s):
that: a pointer to the CapyKfoldCrossValid to free