Cross-validation error for dissimilarity representations
[ERR,STD_ERR] = CROSSVALD(D,CLASSF,N,K,ITER)
Cross-validation estimation of the error and the instability of the untrained classifier CLASSF using the dissimilarity dataset D. The set is randomly permutated and divided in N (almost) equally sized parts. Note that for a dissimilarity matrix, the division has to be applied both to rows and to columns. The classifier is trained on N-1 parts and the remaining part is used for testing. This is rotated over all parts.
ERR is their weighted avarage over the class priors. CERR are the class error
If ITER > 1 the routine is run ITER times and results are averaged. The standard deviation of the error is returned in STD_ERR.
NOTE D is a square dissimilarity matrix for which the representation set has to be reduced to a K-element subset from the training set. This is done by random selection. If K is not chosen the entire training set is used.
A = GENDATB(100);