Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# Validate on test set with ensemble
allPreds <- sapply(modelList, predict, newdata = testSet)
ensemblePred <- rowSums(allPreds) / length(modelList)
# Plot predicted vs. observed; create PNG
plot(ensemblePred, testSet$Y,
xlim = c(0,100), ylim = c(0,100),
xlab = "Predicted", ylab = "Observed",
pch = 16, col = rgb(0, 0, 0, .25))
abline(a=0, b=1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment