Supervised Learning in R: Classification
Brett Lantz
Instructor
m <- glm(y ~ x1 + x2 + x3,
data = my_dataset,
family = "binomial")
prob <- predict(m, test_dataset,
type = "response")
pred <- ifelse(prob > 0.50, 1, 0)
Supervised Learning in R: Classification