October 2017
Beginner to intermediate
572 pages
26h 1m
English
Perform the following steps to calculate the error evolution of each ensemble learner:
> boosting.evol.train = errorevol(churn.boost, trainset)
> boosting.evol.test = errorevol(churn.boost, testset)
> plot(boosting.evol.test$error, type = "l", ylim = c(0, 1),
+ main = "Boosting error versus number of trees", xlab = "Iterations",
+ ylab = "Error", col = "red", lwd = 2)
> lines(boosting.evol.train$error, cex = .5, col = "blue", lty = 2, lwd = 2)
> legend("topright", c("test", "train"), col = c("red", "blue"), lty = 1:2, lwd = 2)
Read now
Unlock full access