ml_banner

Support Vector Machines

Again, using the creditcard.csv dataset

Start by importing the necessary libraries

svm_import_libraries

Import the data, specify the dependent (target) and independent variables

svm_import_data

Split the dataset into a training and testing dataset. This way we can test the accuracy of the model later on. Also center and scale the variables. Needed for SVM

svm_train_test_split

Create the Support Vector Machine Model

svm_model_create

Finally, create a confusion matrix

svm_create_matrix

We correctly classified 66 instances of fraud out of 113 correctly (58%)

svm_conf_matrix

 

COMP7370 File