adjusted plot

This commit is contained in:
Niclas
2026-03-17 15:15:12 +01:00
parent fcdad672c7
commit 5648083823

View File

@@ -256,7 +256,7 @@ title(main="Vectors for a rescaled to norm one.")
#| cache: true
#| echo: false
#| collapse: true
ns <- seq(100, 1000, 100)
ns <- seq(250, 10000, 250)
as <- c(1.0, 2, 5, 10, 20)
alphas <- seq(0.1, 0.5, 0.1)
@@ -271,7 +271,7 @@ for (a in as) {
for (j in 1:length(alphas)) {
n <- ns[i]
K <- floor(n^alphas[j])
if (!K > 0) next # skip if K is equal to zero
if (!K > 1) next # skip if K is equal to zero lr one
# use the default seed 1L
Q <- compute_matrix(seed=1L,
a= a,
@@ -293,14 +293,16 @@ for (a in as) {
```{r hyperparameter n / k^alpha = const plotting}
results |>
filter(param_alpha > 0.21 & param_alpha <= 0.32) |>
mutate(param_alpha = as.factor(param_alpha),
param_a = as.factor(param_a)) |>
group_by(param_a, param_alpha) |>
filter(dim_k == max(dim_k)) |>
# filter(dim_k == max(dim_k)) |>
ggplot(aes(dim_n, ssv, col=param_a, shape=param_alpha)) +
geom_point(size=1.5) +
geom_line() +
#scale_y_log10() +
geom_point(size=3.5) +
geom_line(size=1.5) +
geom_function(fun = function(x) {( sqrt(x)) / (floor(x^0.3))}, col="black" )+
# scale_y_log10() +
theme_bw() +
labs(x=latex2exp::TeX("$n$"),
y=latex2exp::TeX("Smallest singular value of $Q$"),