I have some SVM models. E.g., moSvmN2C20F1
.
I tried
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"
every name but was not able to find the class weights.
Where can I find them? In the $call
I have the calling variables:
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)
Explaining better, moSvmN2C20F1$cost
retrieves the cost parameter of the model. moSvmN2C20F1$gamma
retrieves the gamma parameter of the model.
How can I retrieve the class.weigths
parameter of the model? Where is this information? I expect something like:
moSvmN2C20F1$class.weights
'0' '1'
0.4 0.6