Warning! It seems that you are using Dodona within another webpage, so not everything may work properly. Let your teacher know so that he can solve the problem by adjusting a setting in the learning environment. In the meantime, you can click this link to open Dodona in a new window.
Support Vector Machine 3
Sign in to test your solution.
make.circle.data = function(n) {
x1 <- runif(n, min = -1, max = 1)
x2 <- x1
y1 <- sqrt(1 - x1^2)
y2 <- (-1)*y1
x1 <- c(x1,x2)
x2 <- c(y1,y2)
return(data.frame(x1, x2))
}
set.seed(2077)
df1 <- make.circle.data(30)
df2 <- make.circle.data(30)
df1 <- df1 * .5 + rnorm(30, 0, 0.05)
df2 <- df2 + rnorm(30, 0, 0.05)
df <- rbind(df1, df2)
z <- rep(c(-1, 1), each=60)
dat <- data.frame(x=df, y = as.factor(z))
names(dat) <- c('x.1', 'x.2', 'y')
You can submit as many times as you like. Only your latest submission will be taken into account.
Sign in to test your solution.