I am using the svm function in the e1071 package of R. Using svm function I could get an accuracy of 74% for my data, but when I try to use the predict function for a test dataset, it returns all of the data in one of the two categories and shows 0 in the other. This is what the code looks like
test <- read.table(file.choose(), header=T)
pred <- predict(modelb, test)
summary(pred)
0 1
101 0