csys.cv <- function(train, labels, classifier, iterance = 10, ...)
{
    if(nrow(train) != length(labels)) {
        stop("The number of samples is diff. with the number of labels")
    }

    tbs = NULL
    for (i in 1 : iterance) {
        pred = predict(classifier, train, ...)

        if(length(pred) != length(labels)) {
            if(length(pred$class) != 0) {
                pred = pred$class
            }
            else {
                stop("The prediction result is not compatible with the given labels.")
            }
        }

        ## compare table

        tb = table(pred, labels, dnn = c("prediction","true values"))

        tbs = c(tbs, list(prediction = pred, comparison.table = tb))
    }

    return(tbs)
}
