Following up from Invalid probability model for large support vector machines using ksvm in R:
I am training an SVM using ksvm from the kernlab package in R. I want
It seems to me that the problem occurs randomly. Thus, I circumvented the problem by fitting the ksvm model as many times until it worked.
stop.crit = 1
while (stop.crit <= 10) {
stop.crit = stop.crit + 1
MOD = ksvm(...)
tryCatch(PRED = predict(...), error = function(e) e)
if (exists("PRED") == TRUE) stop.crit = 11
}