Analysis for increasing size
This commit is contained in:
parent
9abde593fd
commit
05e9bca613
1 changed files with 19 additions and 2 deletions
|
|
@ -3,11 +3,28 @@ library(here)
|
||||||
library(tidyverse)
|
library(tidyverse)
|
||||||
library(stringr)
|
library(stringr)
|
||||||
|
|
||||||
|
|
||||||
flist <- list.files(here("results/increasing_size/"), full.names = TRUE) |> str_sort(numeric = TRUE)
|
flist <- list.files(here("results/increasing_size/"), full.names = TRUE) |> str_sort(numeric = TRUE)
|
||||||
|
|
||||||
res_df <- do.call("rbind", lapply(flist, readRDS))
|
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)) +
|
ggplot(res_df, aes(x = n2, y = ari_col)) +
|
||||||
geom_point()
|
geom_point()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue