diff --git a/increasing_size_analysis.R b/increasing_size_analysis.R index eb129e0..726847e 100644 --- a/increasing_size_analysis.R +++ b/increasing_size_analysis.R @@ -3,11 +3,28 @@ library(here) library(tidyverse) library(stringr) + flist <- list.files(here("results/increasing_size/"), full.names = TRUE) |> str_sort(numeric = TRUE) res_df <- do.call("rbind", lapply(flist, readRDS)) -ggplot(res_df, aes(x = n2, y = time)) + - geom_point() + + +reslm <- lm(time ~ n2, data = res_df) +summary(reslm) +res2 <- lm(time ~ I(n2^2), data = res_df) +summary(res2) +resexp <- lm(log(time) ~ n2, data = res_df) +summary(resexp) + +library(ggpmisc) +p <- ggplot(res_df, aes(x = n2, y = time)) + + geom_point() + + stat_smooth(method = "lm", formula = y ~ I(x^2)) + + stat_poly_eq(parse = T, aes(label = after_stat(eq.label)), formula = y ~ I(x^2)) + +ggsave(filename = tempfile(fileext = ".png"), plot = p) + +# stat_smooth(method = "lm", formula = y ~ x) ggplot(res_df, aes(x = n2, y = ari_col)) + geom_point()