diff --git a/lab1/assignment3.R b/lab1/assignment3.R index e31f39e97a28374a0cb85f22da4b0f02997e5215..9d8b9fd7bfea6f5dd966f479855ae3bd04be4cb0 100644 --- a/lab1/assignment3.R +++ b/lab1/assignment3.R @@ -102,27 +102,3 @@ missclass_rate2 = missclass(data$V9, predict_reg2) print(summary(model2)) print(missclass_rate2) - - -boundary2 <- function(x1, theta, r) { - # Calculate the log-odds corresponding to the threshold r - logit_r <- log(r / (1 - r)) - - # Basis function transformations - z1 <- x1 ^ 4 - z2 <- x1 ^ 3 * x2 - z3 <- x1 ^ 2 * x2 ^ 2 - z4 <- x1 * x2 ^ 3 - z5 <- x2 ^ 4 - - - return() -} - - -glucose_boundary2 <- sapply(age_seq, boundary, theta = theta2, r = r) - -lines(age_seq, - glucose_boundary2, - col = "black", - lwd = 2)