From the course: Complete Your First Project in R

Unlock the full course today

Join today to access over 24,700 courses taught by industry experts.

Solution: Explore the chosen algorithm

Solution: Explore the chosen algorithm

From the course: Complete Your First Project in R

Solution: Explore the chosen algorithm

(upbeat music) - [Instructor] Welcome back. Great work on continuing to explore the SVM algorithm and how to tune it. If you felt overwhelmed with this challenge, don't worry. I will explain step by step what to do and what each line of code is doing. Let's head over to R studio. You'll first begin by running your preliminary code to bring in your data, and then you'll be preparing your data, splitting it between training and testing, and then you'll be creating your original SVM algorithm. After that, you'll be getting the predictions, the confusion matrix and the metrics. Once you get to this part, these are the two blocks of code that you need to edit for this particular challenge. In the first block of code, you'll be tuning the SVM algorithm. First, you'll add in your cost values, so you already have your data in there, so you'll put a comma and you'll have your cost equal to C, and then 1, 5, 10, 20, and 100. Again, this will give the list of values to use for cost. After that…

Contents