Last active
November 27, 2017 17:41
-
-
Save conormm/2ae066e86344334d52ab234c5835e426 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
p1 <- df %>% | |
ggplot(aes(x=x, y=y)) + | |
geom_abline(aes(intercept = b0, | |
slope = b1, | |
colour = -sse, | |
frame = model_iter), | |
data = model_i, | |
alpha = .50 | |
) + | |
geom_point(alpha = 0.4) + | |
geom_abline(aes(intercept = b0, | |
slope = b1), | |
data = model_i[100, ], | |
alpha = 0.5, | |
size = 2, | |
colour = "dodger blue") + | |
geom_abline(aes(intercept = b0, | |
slope = b1), | |
data = model_i[1, ], | |
colour = "red", | |
alpha = 0.5, | |
size = 2) + | |
scale_color_continuous(low = "red", high = "grey") + | |
guides(colour = FALSE) + | |
theme_minimal() | |
p2 <- model_i[1:30,] %>% | |
ggplot(aes(model_iter, sse, colour = -sse)) + | |
geom_point(alpha = 0.4) + | |
theme_minimal() + | |
labs(x = "Model iteration", | |
y = "Sum of Sqaured errors") + | |
scale_color_continuous(low = "red", high = "dodger blue") + | |
guides(colour = FALSE) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment