I have converted a dataframe (10430 X 1415) into a Sparse Matrix using Matrix package. I sampled the data into Training data and Testing data. I want to build an SVM model ('e1071') using the Sparse Matrix. Could any one please help me in getting the result. Below is the code that I am trying.
library('e1071')
svm.model<-svm(trainData[,"Target"] ~.,data= trainData,kernel='linear', scale=FALSE)
Error: "cannot coerce class "structure("dgCMatrix", package = "Matrix")" to a data.frame"
Also Please suggest how to use predict function on the testData.