I have created two models, one using logistic regression the other using support vector machine. I'll show you what I did for logistic regression, no problems, and then with support vector machine, problems.
Logistic regression - No problem
glm.fit=glm(claim~Auto+Elect_Photo+Groceries+Industrial_Durable+ Others+Restaurant+Retail_Clothing+Retail_Discount+Retail_Materials+Retail_Specialty+amt2+flag_cat30+flag_state30+ merchants,data=fraud.train.visa,family=binomial)
fraud.train.visa$pred_fraud_log<-predict(glm.fit,newdata=fraud.train.visa,type="response")
Support Vector Machine: - No Problem with svm running, but when I try to create predicted value get errors.
Svm.fit=svm(claim~Auto+Elect_Photo+Groceries+Industrial_Durable+Others+Restaurant+Retail_Clothing+Retail_Discount+Retail_Materials+Retail_Specialty+amt2+flag_cat30+flag_state30+merchants,
data=fraud.train.visa,kernel="radial",gamma=1,cost=1)
fraud.validate.visa$pred_fraud_SVM<-predict(Svm.fit,newdata=fraud.validate.visa,type="response")
Error in $<-.data.frame(*tmp*, "pred_fraud_SVM", value = numeric(0)) :
replacement has 0 rows, data has 32815
Thanks