adjust plots

This commit is contained in:
Niclas
2026-05-20 17:02:33 +02:00
parent dcb1468381
commit 25fe0903be
3 changed files with 93 additions and 15 deletions

View File

@@ -13,7 +13,7 @@ library(dplyr)
a_grid <- seq(-20, 20, length.out = 200)
# function which takes only a to compute Q_c
make_matrix <- function(a) { compute_matrix(seed=4L,
make_matrix <- function(a) { compute_matrix(seed=11513215L,
a= a,
n = 2,
K = 2,
@@ -46,17 +46,18 @@ ggplot(df_entries, aes(x = a, y = value, colour = entry, linetype = entry)) +
theme_minimal()
# Heat map for a single larger matrix ------------------------------------------
# TODO Daten für 2x2 und 3x3 an Michael schicken
# Choose a value of a
a0 <- -10
M0 <- compute_matrix(seed=1L,
a0 <- 2
M0 <- compute_matrix(seed=9L,
a= a0,
n = 50,
K = 50,
n = 2,
K = 2,
sample_X_fn = function(n) {matrix(rnorm(n), ncol = 1L)},
fv = function(x) {dnorm(x, mean=0, sd=1)},
Fv = function(x) {pnorm(x, mean=0, sd=1)},
guard = 1e-12)
M0
# Convert to a tidy data frame for ggplot
df_heat <- as.data.frame(M0) %>%