1. Learn
  2. /
  3. Courses
  4. /
  5. Support Vector Machines in R

Connected

Exercise

Generating a complex dataset - part 2

In this exercise, you will create a decision boundary for the dataset you created in the previous exercise. The boundary consists of two circles of radius 0.8 units with centers at x1 = -0.8, x2 = 0) and (x1 = 0.8, x2 = 0) that just touch each other at the origin. Define a binary classification variable y such that points that lie within either of the circles have y = -1 and those that lie outside both circle have y = 1.

The dataset created in the previous exercise is available in the dataframe df.

Instructions

100 XP
  • Set radii and centers of circles.
  • Add a column to df containing the binary classification variable y.