I use caret package. In certain cases, for example, but not only in the example below, the carriage will cause the following error:
Something is wrong; all the ROC metric values are missing:
Error in train.default(x, y, weights = w, ...) : Stopping
The strange thing is that the carriage can do this with almost the same calls. For example. - the first call for the following works, the second call causes an error. I had a similar problem when I turned on, for example. Verbose argument keeping all things equal or when I run certain packages in a carriage (e.g. SVM).
I read that the problem may be the definition of a class variable, but my main variable is a standard factor with 2 levels, for example. (Coefficient w / 2 of the level "NP", "P": 1 1 1 1 1 1 1 1 1 1 1 ...).
Does anyone have any tips?
(apologies for the exclusion of the reproducible example)
Call 1
gbmFit1 <- train(class ~., data = dt_fulltrain,method = "gbm",metric="ROC",trControl = fitControl)
Call2
gbmFit1 <- train(class ~., data = dt_fulltrain,method = "gbm",metric="ROC",trControl = fitControl, strata = dt_fulltrain$class, sampsize = rep(nmin, 2))
source
share