Skip to content

Instantly share code, notes, and snippets.

@szilard
Created November 1, 2015 16:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save szilard/0e1f1b66fead4fc146f1 to your computer and use it in GitHub Desktop.
Save szilard/0e1f1b66fead4fc146f1 to your computer and use it in GitHub Desktop.
Illustration for overfitting
library(ggplot2)
n <- 30
d <- data.frame(x = 1:n, y = runif(n))
ggplot(d, aes(x = x, y = y)) + geom_point() +
geom_smooth(se = FALSE, span = 0.1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment