[R] kernlab | ksvm error

Uwe Ligges ligges at statistik.tu-dortmund.de
Sun Aug 26 10:22:18 CEST 2012



On 25.08.2012 02:12, Reza Salimi-Khorshidi wrote:
> Dear Uwe,
> I appreciate that if you let me know why, when using the attached file,
> the following script (two lines) doesn't work once in 10s of times.
> Best, Reza
>
> svm.pol4<- ksvm(class.labs~ ., data= train.data, prob.model= T, scale=
> T, kernel= "polydot")
>
> svm.pol.prd4<- predict(svm.pol4, train.data, type= "probabilities")[,2]
>
>


Some randomness is involved, and when you get an unfortunate subsample 
(e.g. if in the internal cross-validation one class is not selected at 
all) it won't work anymore.

Best,
Uwe Ligges




More information about the R-help mailing list