I am using the Kaggle Scikit data to learn R.
I am using the R e1071 SVM function to predict classes.
When I use:
svm(train, trainLabels, scale = TRUE, type = NULL, kernel = "polynomial")
I obtain this level of accuracy on a sample of the Train data:
> table(pred, trainLabels)
trainLabels
pred 0 1
0 478 8
1 12 502
which I interpret as being 98% accurate (8+12) / (478+8+12+502).
Though when I use the same prediction model on the Test data, Kaggle returns a 0.82 score, based on classification accuracy.
Can you explain why I can get such a different accuracy level?