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")
The code works without errors or warnings, but the results of the prediction on the training set are really strange. It seems that the model isn’t able to detect the default values (1).
Alfredo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.