[R] probabilities in svm output in e1071 package

David Meyer david.meyer at wu.ac.at
Thu May 6 00:53:17 CEST 2010


Dear Changbin,

that looks odd indeed - can you cast your example in a reproducible one 
so I can track this down (or at least send me the data offline?)

Thanks
David

Changbin Du wrote:
> svm.fit<-svm(as.factor(out) ~ ., data=all_h, method="C-classification", 
> kernel="radial", cost=bestc, gamma=bestg, cross=10) # model fitting
> 
> svm.pred<-predict(svm.fit, hh, decision.values = TRUE, probability = 
> TRUE) # find the probability, but can not find.
> 
> attr(svm.pred, "probabilities")
> 
>  > attr(svm.pred, "probabilities")
>      1 0
> 1    0 0
> 2    0 0
> 3    0 0
> 5    0 0
> 6    0 0
> 7    0 0
> 8    0 0
> 9    0 0
> 
> Hi, Dear R community,
> 
> IN my data, the out variable is the target variable (0, and 1),   hh is 
> the new data set does not contain the out variable. I trained the model 
> svm.fit in training data. And want to predict the out in the new data 
> set hh.
> 
> WHy the probabilities are both 0 in 1 and 0 class?
> 
> 
> 
> 
> 
> 
> -- 
> Sincerely,
> Changbin
> --
> 
> Changbin Du
> DOE Joint Genome Institute
> Bldg 400 Rm 457
> 2800 Mitchell Dr
> Walnut Creet, CA 94598
> Phone: 925-927-2856
> 
> 

-- 
Priv.-Doz. Dr. David Meyer
Department of Information Systems and Operations

WU
Wirtschaftsuniversität Wien
Vienna University of Economics and Business
Augasse 2-6, 1090 Vienna, Austria
Tel: +43-1-313-36-4393
Fax: +43-1-313-36-90-4393
HP:  http://ec.wu.ac.at/~meyer



More information about the R-help mailing list