Analysis for increasing size

This commit is contained in:
Louis 2026-01-28 15:54:41 +01:00
parent 9abde593fd
commit 05e9bca613

View file

@ -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()