October 2017
Beginner to intermediate
572 pages
26h 1m
English
Perform the following steps to calculate the margin of each ensemble learner:
> boost.margins = margins(churn.boost, trainset)
> boost.pred.margins = margins(churn.boost.pred, testset)
> plot(sort(boost.margins[[1]]), (1:length(boost.margins[[1]]))/length(boost.margins[[1]]), type="l",xlim=c(-1,1),main="Boosting: Margin cumulative distribution graph", xlab="margin", ylab="% observations", col = "blue")
> lines(sort(boost.pred.margins[[1]]) (1:length(boost.pred.margins[[1]]))/length(boost.pred.margins[[1]]) , type="l", col ...Read now
Unlock full access