Dear Max,

thanks for your valuable comment. I assume that you used the function  
for regression - not classification.

I use Mac OS X plattform (version 10.5.6). The R version is 2.8.1 (I  
prefer to update to 2.9.1 not 2.9.0). The kernlab package version is  
0.9-8.

The x and y-input into LSSVM regression can be reproduced by:
x<-<- 
matrix 
(data 
= 
rnorm 
(n 
= 
12800 
,mean 
=0.0053,sd=0.0146),nrow=100,ncol=128,dimnames=list(c(1:100),c(1:128)));
y<-rnorm(n=100,mean=0.7958,sd=0.1900);

The function is:
test 
< 
_lssvm 
(test 
,test.ref,scale=F,type="regression",kernel="rbfdot",kpar=list(sigma=5));

The error message is:
Error in if (n != dim(y)[1]) stop("Labels y and data x dont match") :
   argument is of length zero.

This error message does not make sense to me. The R documentation for  
the lssvm function states that y can be a vector. The dimension of a  
vector is always NULL. Thus, the check function in the error message  
[if(n !=dim(y)[1]) stop] does not add up for me.

Regards,

Thomas

On 14 May 2009, at 15:33, Max Kuhn wrote:

>> To make things easier (using only two optimization parameters and not
>> loosing performance) I wanted to use LS SVM regression  
>> (lssvm{kernlab}). But
>> it looks to me that it is not yet implemented. At least I got error
>> messages, which I could not find a solution for (Error in if (n ! 
>> _dim(y)[1]
>> stop ("Labels y and data x dont match").
>
> I've used the lssvm function in kernlab without issue.
>
> You should follow the posting guide and provide a reproducible example
> so that there is a possibility of answering your question. Plus, what
> versions etc.
>
> Max



        [[alternative HTML version deleted]]

______________________________________________
R-help@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.

Reply via email to