probsvm(x, y, fold=5,
kernel=c("linear","polynomial","radial"),
kparam=NULL, Inum=20, type="ovr",
lambdas=2^(-10:10))
kernel="linear"
for linear kernel (default), kernel="polynomial"
for polynomial kernel, and kernel="radial"
for radial(gaussian) kernel.20
.ovo
is for the one-versus-one method, and ovr
is for the one-versus-rest method (default).2^(-10:10)
.probsvm
.Wang, J., X. Shen, and Y. Liu (2008). Probability estimation for large margin classifiers. Biometrika 95(1), 149-167.
Wu, T.-F., C.-J. Lin, and R. C. Weng (2004). Probability estimates for multi-class classification by pairwise coupling. Journal of Machine Learning Research 5, 975-1005.
predict.probsvm
# iris data #
data(iris)
iris.x=iris[c(1:20,51:70,101:120),-5]
iris.y=iris[c(1:20,51:70,101:120),5]
iris.test=iris[c(21:50,71:100,121:150),-5]
a = probsvm(iris.x,iris.y,type="ovo",
Inum=10,fold=2,lambdas=2^seq(-10,10,by=3))
predict(a, iris.test)
Run the code above in your browser using DataLab