I am using SVM model from e1017 in R. I have used SVM for text mining and classification. So my data is dtm(document term matrix obtained from documents corpus). How can I go about plotting my SVM model?
Below is my svm model I used in my code for class prediction
model <- svm(dtm, classvec, kernel="linear")
When I use plot(model, dtm)
I get the error
missing formula
plot.svm gives missing formula because when you have more than 3 column in your matrix including target variable plot function doesn't know which variables to choose as x and y to plot.To overcome the error you have to explicitly specify x and y in the command.
where x and y are columns you would like to plot from your matrix