[R] kernlab | ksvm error

Uwe Ligges ligges at statistik.tu-dortmund.de
Sun Aug 19 17:10:58 CEST 2012



On 19.08.2012 11:06, Reza Salimi-Khorshidi wrote:
> Dear list,
> I am using the ksvm function from kernlab as follows:
>
> (1) learning
>> svm.pol4 <- ksvm(class.labs ~ ., data = train.data, prob.model = T, scale
> = T, kernel = "polydot")
>
> (2) prediction
>> svm.pol.prd4 <- predict(svm.pol4, train.data, type = "probabilities")[,2]
>
> But unfortunately, when calling the prediction, once in every 10s of times
> (using the exact same data), it returns the following error message:
>
> Error in prob.model(object)[[p]]$A :
>    $ operator is invalid for atomic vectors
> Calls: predict -> predict -> .local -> .SigmoidPredict
> Execution halted
>
> Does anyone know what the problem is? Any help will be much appreciated.


We need a reproducible example.

Best,
Uwe Ligges



> Cheers
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> 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.
>




More information about the R-help mailing list