Change predict behaviour so that all levels in training data are returned predict(rm, head(iris)) rm <- cba(iris, "Species") predict(rm, head(iris)) should list all levels in the training fold.