Suppression anciennes données et description analyse
This commit is contained in:
parent
174d9130c7
commit
3484767517
5 changed files with 29 additions and 12 deletions
|
|
@ -21,7 +21,7 @@ loadNamespace(package = "patchwork")
|
|||
```{r data, echo = FALSE}
|
||||
# Loading data
|
||||
data_folder <- file.path(here(), "code", "results", "simulations", "NA_robustness")
|
||||
files_list <- list.files(data_folder, pattern = "^NA_robustness_19-04-2024")
|
||||
files_list <- list.files(data_folder, pattern = "^NA_robustness_22-04-2024_17")
|
||||
```
|
||||
```{r df_func, echo = FALSE}
|
||||
prepare_dataframes_auc_ari <- function(data) {
|
||||
|
|
@ -40,8 +40,7 @@ prepare_dataframes_auc_ari <- function(data) {
|
|||
# Preparing auc_data
|
||||
auc_data <- averaged_data %>%
|
||||
select(c(prop_NAs, model) | contains("auc_")) %>%
|
||||
rename_with(~ gsub("auc_", "", .x, fixed = TRUE)) %>%
|
||||
filter(prop_NAs != 0)
|
||||
rename_with(~ gsub("auc_", "", .x, fixed = TRUE))
|
||||
|
||||
auc_data_long <-
|
||||
bind_cols(
|
||||
|
|
@ -109,7 +108,7 @@ plot_auc_ari_data <- function(df_list) {
|
|||
geom_line(aes(color = method)) +
|
||||
geom_point(aes(color = method)) +
|
||||
geom_ribbon(aes(ymin = auc_mean - auc_sd, ymax = auc_mean + auc_sd, fill = method), alpha = 0.2) +
|
||||
ylim(c(min(auc_data_long[["auc_mean"]]), max(auc_data_long[["auc_mean"]]))) +
|
||||
ylim(c(0.5, 1)) +
|
||||
scale_x_continuous(breaks = scales::pretty_breaks(n = 10L)) +
|
||||
ylab(TeX("\\bar{AUC}")) +
|
||||
xlab("NA proportion") +
|
||||
|
|
@ -163,6 +162,32 @@ figcaps <- sapply(files_list, function(filename) {
|
|||
})
|
||||
```
|
||||
|
||||
Pour les deux figures, la collection est composée de deux réseaux ($M = 2$) dont
|
||||
les proportions sont les suivantes :
|
||||
$$\pi = \rho = (0.5, 0.3, 0.2) $$
|
||||
|
||||
Le premier réseau qui subit une perte d'informations est de petite taille, 40
|
||||
individus en ligne et en colonne. Le second réseau contient 120 individus en
|
||||
ligne et en colonne.
|
||||
|
||||
La structure ayant abouti aux résulats de la figure \@ref(fig:plot-1) est la suivante :
|
||||
$$\alpha_{modular} = \begin{bmatrix}
|
||||
0.9 & 0.05 & 0.05 \\
|
||||
0.05 & 0.2 & 0.05 \\
|
||||
0.05 & 0.05 & 0.8
|
||||
\end{bmatrix}$$
|
||||
Il s'agit d'une structure modulaire répliquant un comportement communautaire.
|
||||
|
||||
|
||||
La structure ayant abouti aux résulats de la figure \@ref(fig:plot-2) est la suivante :
|
||||
$$\alpha_{nested} = \begin{bmatrix}
|
||||
0.9 & 0.25 & 0.1 \\
|
||||
0.3 & 0.15 & 0.05 \\
|
||||
0.1 & 0.05 & 0.05
|
||||
\end{bmatrix}$$
|
||||
Il s'agit d'une structure emboîtée répliquant une structure communément trouvée
|
||||
dans les réseaux plantes-pollinisateurs.
|
||||
|
||||
```{r plot, echo = FALSE, fig.cap=paste("Graph of metrics for NA robustness with a ", figcaps)}
|
||||
for (filename in files_list) {
|
||||
data <- readRDS(file.path(
|
||||
|
|
@ -172,12 +197,4 @@ for (filename in files_list) {
|
|||
df_list <- prepare_dataframes_auc_ari(data = data)
|
||||
plot(plot_auc_ari_data(df_list = df_list))
|
||||
}
|
||||
# filename <- files_list[1]
|
||||
# data <- readRDS(file.path(
|
||||
# data_folder,
|
||||
# filename
|
||||
# ))
|
||||
# print(here())
|
||||
# df_list <- prepare_dataframes_auc_ari(data = data)
|
||||
# knitr::knit_print(plot_auc_ari_data(df_list = df_list))
|
||||
```
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Add table
Reference in a new issue