From 8a0cf4564bd21f2c3c86957c6687ce65b8252329 Mon Sep 17 00:00:00 2001 From: Jonathan Berrisch Date: Mon, 19 May 2025 23:37:41 +0200 Subject: [PATCH] Update powerfoc results table --- 25_07_phd_defense/index.qmd | 84 +++++++++++++++++++++++-------------- 1 file changed, 53 insertions(+), 31 deletions(-) diff --git a/25_07_phd_defense/index.qmd b/25_07_phd_defense/index.qmd index 80199c6..4440b55 100644 --- a/25_07_phd_defense/index.qmd +++ b/25_07_phd_defense/index.qmd @@ -1838,15 +1838,13 @@ knitr::include_graphics("assets/mcrps_learning/smooth_best.svg") :::: -## Results Orig +## Results -```{r, fig.align="center", echo=FALSE, out.width = "400"} -knitr::include_graphics("assets/mcrps_learning/tab_performance_sa.svg") -``` +:::: {.columns} -## Results HTML +::: {.column width="65%"} -```{r, fig.align="center", echo=FALSE} +```{r} load("assets/mcrps_learning/naive_table_df.rds") table_naive <- naive_table_df %>% @@ -1889,28 +1887,28 @@ for (j in 1:3) { for (i in seq_len(nrow(performance_loss_tibble))) { if (loss_and_dm[i, j, "p.val"] < 0.001) { performance_loss_tibble[i, 2 + j] <- paste0( - "    ", + "  ", performance_loss_tibble[i, 2 + j], "\\(^{***}\\)" ) } else if (loss_and_dm[i, j, "p.val"] < 0.01) { performance_loss_tibble[i, 2 + j] <- paste0( - "    ", + "  ", performance_loss_tibble[i, 2 + j], "\\(^{**}\\)" ) } else if (loss_and_dm[i, j, "p.val"] < 0.05) { performance_loss_tibble[i, 2 + j] <- paste0( - "    ", + "  ", performance_loss_tibble[i, 2 + j], "\\(^{*}\\)" ) } else if (loss_and_dm[i, j, "p.val"] < 0.1) { performance_loss_tibble[i, 2 + j] <- paste0( - "    ", + "  ", performance_loss_tibble[i, 2 + j], "\\({.}\\)" ) } else { performance_loss_tibble[i, 2 + j] <- paste0( - "    ", + "  ", performance_loss_tibble[i, 2 + j], " " ) } @@ -1919,12 +1917,13 @@ for (j in 1:3) { table_performance <- performance_loss_tibble %>% kbl( + padding=-1L, col.names = c( 'Description', 'Parameter Tuning', - '   BOA', - '   ML-Poly', - '   EWA' + '  BOA', + '  ML-Poly', + '  EWA' ), bootstrap_options = "condensed", # Dont replace any string, dataframe has to be valid latex code ... @@ -1953,27 +1952,50 @@ for (i in 3:ncol(performance_loss_tibble)) { bold = loss == min(loss), ) } - -col_note_html <- '< -5 -4 -3 -2 -1 0 1 2 3 4 > 5' - -signif <- ". p < 0.1; * p < 0.05; ** p < 0.01; *** p < 0.001;" - table_performance %>% - footnote( - general = c( - "Coloring w.r.t. test statistic: ", - col_note_html, - signif - ), - general_title = "", - fixed_small_size = TRUE, - escape = FALSE - ) %>% - kable_styling(font_size = 16) |> - row_spec(0, extra_css = "text-align: center") + # footnote( + # general = c( + # "Coloring w.r.t. test statistic: ", + # col_note_html, + # signif + # ), + # general_title = "", + # fixed_small_size = TRUE, + # escape = FALSE + # ) %>% + kable_styling(font_size = 16) ``` +```{=html} +
+ Coloring w.r.t. test statistic: + <-5 + -4 + -3 + -2 + -1 + 0 + 1 + 2 + 3 + 4 + >5 +
+
+ Significance denoted by: . p < 0.1; * p < 0.05; ** p < 0.01; *** p < 0.001; +
+``` + +::: + +::: {.column width = "35%"} + +Foo + +::: + +:::: ## Results