R - 如何检索SVM模型的类权重(e1071)?

时间:2016-12-20 18:39:17

标签: r svm

我有一些SVM模型。例如,moSvmN2C20F1。 我试过了

names(moSvmN2C20F1)
 [1] "call"         "type"         "kernel"       "cost"         "degree"       "gamma"        "coef0"       
 [8] "nu"           "epsilon"      "sparse"       "scaled"       "x.scale"      "y.scale"      "nclasses"    
[15] "levels"       "tot.nSV"      "nSV"          "labels"       "SV"           "index"        "rho"         
[22] "compprob"     "probA"        "probB"        "sigma"        "coefs"        "na.action"    "accuracies"  
[29] "tot.accuracy" "terms"   

每个名字但无法找到班级重量 我在哪里可以找到它们?在$call我有调用变量:

moSvmN2C20F1$call
svm(formula = f1, data = aa, type = NULL, kernel = "radial", 
    gamma = teste$gama[l], cost = teste$cost[l], class.weights = c(`0` = (1 - 
    teste$c1[l]), `1` = teste$c1[l]), shrinking = F, cross = 10, 
    probability = F, fitted = F, scale = F)

更好地解释,moSvmN2C20F1$cost检索模型的成本参数。 moSvmN2C20F1$gamma检索模型的gamma参数 如何检索模型的class.weigths参数?这些信息在哪里?我希望有类似的东西:

moSvmN2C20F1$class.weights
 '0'    '1'
 0.4    0.6

0 个答案:

没有答案