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