PRTools Contents

PRTools User Guide

loso

LOSO

Leave_One_Set_Out crossvalidation

     [E,C,D] = LOSO(A,CLASSF,LABLISTNAME)
     [E,C,D] = LOSO(A,CLASSF,SET_LABELS)
     [E,C,D] = LOSO(A,CLASSF,SET_LABELS,SET_LABLIST)

Input
 A Dataset
 CLASSF Untrained classifier
 LABLISTNAME Name of label list in case of multiple labeling
 SET_LABELS Set of labels for objects in A
 SET_LABLIST Order and selection of labels in SET_LABELS

Output
 E Classification error
 C Array with numbers of erroneaously clasified objects  per label (vertically) and per class (horizontally)
 D Classification matrix of classified objects  (order may be different from A)

Description

In crossvalidation it may be desired that sets of corresponding objects  (e.g. pixels from the same image) are all together in the training set or  in the test set. This might be enabled by adding an additional labeling to  the dataset A (see ADDLABELS) corresponding to the sets and running LOSO with the corresponding LABLISTNAME.  Alternatively, the set labels may be supplied in the call. In SET_LABLIST a ranking of the used labels can be supplied that will be used in C.  In case SET_LABLIST does not contain all set labels used in SET_LABELS LOSO will only test the set labels given in SET_LABLIST and thereby  perform areduced crosvalidation.

The reported error E identical to E = sum(C)./classsizes(D)*getprior(A)'; By confmat(D) a confusion matrix can be visualised.

See also

datasets, mappings, testc, confmat,

PRTools Contents

PRTools User Guide

This file has been automatically generated. If badly readable, use the help-command in Matlab.