LibCapy - kfoldCrossValid

k-fold cross validation class.

Macros:

Enumerations:

None.

Typedefs:

None.

Struct CapyKfoldCrossValidResPredictor :

Struct CapyKfoldCrossValidResPredictor'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 CapyKfoldCrossValidResPredictor'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 predictor and a dataset

Input argument(s):

predictor: the predictor
dataset: the dataset

Output and side effect(s):

The dataset is split into k folds (the original dataset is not modified), the predictor is trained on all combination of (k-1) fold and evaluated on the remaining fold.

Functions:

Create a CapyKfoldCrossValidResPredictor

Input argument(s):

k: the number of fold

Output and side effect(s):

Return a CapyKfoldCrossValidResPredictor

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

2022-11-24
in LibCapy,
46 views
Copyright 2021-2024 Baillehache Pascal