Aan de slagGa gratis aan de slag

A multiclass classification problem

In this exercise, you will use the svm() function from the e1071 library to build a linear multiclass SVM classifier for a dataset that is known to be perfectly linearly separable. Calculate the training and test accuracies, and plot the model using the training data. The training and test datasets are available in the dataframes trainset and testset. Use the default setting for the cost parameter.

Deze oefening maakt deel uit van de cursus

Support Vector Machines in R

Cursus bekijken

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

#load library and build svm model
library(___)
svm_model<- 
    svm(y ~ ., data = ___, type = "C-classification", 
        kernel = ___, scale = FALSE)
Code bewerken en uitvoeren