我正在使用“分而治之”内核SVM的swarmSVM实现来解决二进制分类问题。
获得预测标签对我来说还不够,我还需要概率估计。以下代码返回预测的标签,并显示警告消息“尚未使用probability = TRUE
训练SVM,概率不可用于预测。” :
library(SwarmSVM)
data(svmguide1)
svmguide1.t = as.matrix(svmguide1[[2]])
svmguide1 = as.matrix(svmguide1[[1]])
dcsvm.model = dcSVM(x = svmguide1[,-1], y = svmguide1[,1],
k = 4, max.levels = 4, seed = 0, cost = 32, gamma = 2,
kernel = 3,early = 0, m = 800)
predict(object=dcsvm.model, newdata=svmguide1.t[,-1], probability=T)
不幸的是,当我在训练模型时尝试启用probability = TRUE
时,R崩溃了。
dcsvm.model = dcSVM(x = svmguide1[,-1], y = svmguide1[,1],
k = 4, max.levels = 4, seed = 0, cost = 32, gamma = 2,
kernel = 3,early = 0, m = 800,
probability=T)
R遇到致命错误。会话已终止
能否在dcSVM中获得概率输出?