I've build two models using Support Vector Machines, one with 'linear' kernel and the other with 'rbf' kernel. The r2 score of the test data in both cases is pretty much equal, around 0.82, but the score on training data for the 'linear' kernel is 0.84, while for the 'rbf' kernel is around 0.94.
I understand that overfitting to the training set is possible, but shouldn't that yield lower r2 scores on the test set? In my case, which model would be deemed better?
EDIT:
The models are fitted using GridSearchCV from sklearn, with 5-fold cross-validation.
The MSE for the 'linear' kernel on training set is 6e-3, and 8e-3 for the test set.
The MSE for the 'rbf' kernel on training set is 1e-3, and 6e-3 for the test set.
sklearn
and I disagree about its calculation. How do you calculate out-of-sample $R^2$, and what do you hope to learn from the value? Note that you do not have the usual “proportion of variance explained” interpretation except in a limited number of cases. $\endgroup$