Line search fails in training ksvm prob.model

后端 未结 3 1785
独厮守ぢ
独厮守ぢ 2020-12-31 05:30

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

3条回答
  •  半阙折子戏
    2020-12-31 05:43

    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
    }
    

提交回复
热议问题