问题
On numerous occasions I've been getting this error when trying to fit a gbm or rpart model. Finally I was able to reproduce it consistently using publicly available data. I have noticed that this error happens when using CV (or repeated cv). When I don't use any fit control I don't get this error. Can some shed some light one why I keep getting error consistently.
fitControl= trainControl("repeatedcv", repeats=5)
ds = read.csv("http://www.math.smith.edu/r/data/help.csv")
ds$sub = as.factor(ds$substance)
rpartFit1 <- train(homeless ~ female + i1 + sub + sexrisk + mcs + pcs,
tcControl=fitControl,
method = "rpart",
data=ds)
来源:https://stackoverflow.com/questions/31685757/caret-train-method-complains-something-is-wrong-all-the-rmse-metric-values-are