Support vector machine implementation through R
I’m trying to implement SVM in R with the e1071 library. The code is the following:
svm_train <- svm(factor_new ~ RFS +LI+SDI+LDI+DR+DBT+FCT+FII+DITP+ADCG+ADDG+ROA+ROI+ROS+ROE,data = train01_new, kernel = "linear", cost = 0.1, scale = TRUE, type = "C-classification") predict_svm_train <- predict(svm_train, train01_new) cm_svm_train <- confusionMatrix(predict_svm_train, train01_new$factor_new, mode = "everything", positive = "1")