Hello ! I`m using SVMs for multi-class classification problems. Therefore I`m using the svm() function in the package "e1071". If I use svm(...type="C-classification") everything works fine. But if I want to use nu-SVM with svm(..., type="nu-classification", nu=0.5) R crashes immediately. No error message - just crash. Did anybody had the same problem and maybe a solution? I`m using R 2.10.0 and the latest Version of e1071 Thanks TIM BTW: Using the LibSVM wrapper in Weka the same happens. Maybe there is a problem in the LibSVM code... ----------------------------------------------------------------------------------- Tim H?ring Bavarian State Institute of Forest Research Department of Forest Ecology Hans-Carl-von-Carlowitz-Platz 1 D-85354 Freising E-Mail: tim.haering at lwf.bayern.de http://www.lwf.bayern.de
On 02.03.2010 15:41, H?ring, Tim (LWF) wrote:> Hello ! > > I`m using SVMs for multi-class classification problems. Therefore I`m using the svm() function in the package "e1071". > If I use svm(...type="C-classification") everything works fine. But if I want to use nu-SVM with svm(..., type="nu-classification", nu=0.5) R crashes immediately. No error message - just crash. > > Did anybody had the same problem and maybe a solution? > I`m using R 2.10.0 and the latest Version of e1071Maybe for your unstated OS with unstated version of e1071 on an outdated version of R without a reproducible example given. For my WinXP, R-2.10.1, e1071 1.5-22 I get: library(e1071) data(iris) model <- svm(Species ~ ., data = iris, type="nu-classification") model #Call: #svm(formula = Species ~ ., data = iris, type = "nu-classification") # # #Parameters: # SVM-Type: nu-classification # SVM-Kernel: radial # gamma: 0.25 # nu: 0.5 # #Number of Support Vectors: 103 Uwe Ligges> Thanks > TIM > > BTW: Using the LibSVM wrapper in Weka the same happens. Maybe there is a problem in the LibSVM code... > > ----------------------------------------------------------------------------------- > Tim H?ring > Bavarian State Institute of Forest Research > Department of Forest Ecology > Hans-Carl-von-Carlowitz-Platz 1 > D-85354 Freising > > E-Mail: tim.haering at lwf.bayern.de > http://www.lwf.bayern.de > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
> > I`m using SVMs for multi-class classification problems. Therefore I`m > using the svm() function in the package "e1071". > > If I use svm(...type="C-classification") everything works fine. But > if I want to use nu-SVM with svm(..., type="nu-classification", nu=0.5) > R crashes immediately. No error message - just crash. > > > > Did anybody had the same problem and maybe a solution? > > I`m using R 2.10.0 and the latest Version of e1071 > > > Maybe for your unstated OS with unstated version of e1071 on an > outdated > version of R without a reproducible example given. > > For my WinXP, R-2.10.1, e1071 1.5-22 I get: > > library(e1071) > data(iris) > model <- svm(Species ~ ., data = iris, type="nu-classification") > model >O.k. - sorry for my sparse information. I just made an update to R-2.10.1 and e1071 version 1.5-22 on WinXP. I can reproduce the example with the iris dataset. However R crashes when I call svm() with my dataset model <- svm(soil_unit ~ ., data = traindat, type="nu-classification") My dataset consists of 9259 obs. of 14 variables. My target variable is a factor variable with 22 levels (multi-class classification). Predictors are 12 numeric and 1 factor variables. Hoping this information is enough. TIM
On 02.03.2010 17:05, H?ring, Tim (LWF) wrote:> >>> I`m using SVMs for multi-class classification problems. Therefore I`m >> using the svm() function in the package "e1071". >>> If I use svm(...type="C-classification") everything works fine. But >> if I want to use nu-SVM with svm(..., type="nu-classification", nu=0.5) >> R crashes immediately. No error message - just crash. >>> >>> Did anybody had the same problem and maybe a solution? >>> I`m using R 2.10.0 and the latest Version of e1071 >> >> >> Maybe for your unstated OS with unstated version of e1071 on an >> outdated >> version of R without a reproducible example given. >> >> For my WinXP, R-2.10.1, e1071 1.5-22 I get: >> >> library(e1071) >> data(iris) >> model<- svm(Species ~ ., data = iris, type="nu-classification") >> model >> > > O.k. - sorry for my sparse information. > I just made an update to R-2.10.1 and e1071 version 1.5-22 on WinXP. > I can reproduce the example with the iris dataset. However R crashes when I call svm() with my dataset > > model<- svm(soil_unit ~ ., data = traindat, type="nu-classification") > > My dataset consists of 9259 obs. of 14 variables. My target variable is a factor variable with 22 levels (multi-class classification). Predictors are 12 numeric and 1 factor variables. > > Hoping this information is enough.Well, you might want to send the *reproducible* example (i.e. including data that reproduces a crash) to the e1071 maintainer (CCing David). Maybe he will be unable to help given it is a problem in the underlying libsvm code in which case it might be better to contact the libsvm maintainers. Uwe Ligges> TIM