PRTools contents |
CLEVAL
E = CLEVAL(A,CLASSF,TRAINSIZES,NREPS,T,TESTFUN)
Input | |
A | Training dataset |
CLASSF | Classifier to evaluate |
TRAINSIZE | Vector of training set sizes, used to generate subsets of A (default [2,3,5,7,10,15,20,30,50,70,100]). TRAINSIZE is per class unless A has no priors set or has soft labels. |
NREPS | Number of repetitions (default 1) |
T | Tuning dataset (default [], use remaining samples in A) |
TESTFUN | Mapping,evaluation function (default classification error) |
Output | |
E | Error structure (see PLOTE) containing training and test errors |
Generates at random, for all class sizes defined in TRAINSIZES, training sets out of the dataset A and uses these for training the untrained classifier CLASSF. CLASSF may also be a cell array of untrained classifiers; in this case the routine will be run for all of them. The resulting trained classifiers are tested on the training objects and on the left-over test objects. This procedure is then repeated NREPS times. The default test routine is classification error estimation by TESTC([],'crisp').
Training set generation is done "with replacement" and such that for each run the larger training sets include the smaller ones and that for all classifiers the same training sets are used.
If CLASSF is fully deterministic, this function uses the RAND random generator and thereby reproduces if its seed is reset (see RAND). If CLASSF uses RANDN, its seed may have to be set as well.
Per default both the true error (error on the test set) and the apparent error (error on the training set) are computed. They will be visible when the curves are plotted using PLOTE.
prex_cleval,
mappings, datasets, clevalb, testc, plote,
PRTools contents |