Dore
This commit is contained in:
parent
c749b5bcfe
commit
1e952eaae3
2 changed files with 49 additions and 1 deletions
|
|
@ -102,4 +102,4 @@ save_file <- file.path(
|
|||
)
|
||||
|
||||
message("Clustering saved.")
|
||||
save(list_collection, file = save_file)
|
||||
saveRDS(list_collection, file = save_file)
|
||||
|
|
|
|||
48
code/applications/dore/02_dore_analysis.qmd
Normal file
48
code/applications/dore/02_dore_analysis.qmd
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
---
|
||||
---
|
||||
|
||||
```{r}
|
||||
library(colSBM)
|
||||
library(here)
|
||||
```
|
||||
|
||||
```{r}
|
||||
data_folder <- file.path(here(), "code", "results", "applications", "dore")
|
||||
load(file.path(data_folder, "dore_collection_iid_13-05-24_11-52-53.Rds"))
|
||||
|
||||
best_partition <- extract_best_bipartite_partition(list_collection)
|
||||
length(unlist(best_partition))
|
||||
unlisted_bp <- unlist(best_partition)
|
||||
```
|
||||
|
||||
```{r}
|
||||
library(stringr)
|
||||
|
||||
# string_split <- function(string,size) {
|
||||
# unlist(str_extract_all(string, paste0('.{1,',size,'}')))
|
||||
# }
|
||||
|
||||
# custom_str_wrap <- function(str, width = 30) {
|
||||
# if (nchar(str) > width) {
|
||||
# return(paste(string_split(str, size = width), collapse = "\n"))
|
||||
# }
|
||||
# return(str)
|
||||
# }
|
||||
|
||||
iid_BICL <- sum(sapply(unlisted_bp, function(model) model$BICL))
|
||||
|
||||
# Shortening net names
|
||||
for (idx in seq_len(length(unlisted_bp))) {
|
||||
unlisted_bp[[idx]]$net_id <- sapply(unlisted_bp[[idx]]$net_id, function(id) str_trunc(id,20))
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
```{r}
|
||||
for (idx in seq_len(length(unlisted_bp))) {
|
||||
print(plot(unlisted_bp[[idx]], type = "meso", mixture = TRUE, values = TRUE))
|
||||
}
|
||||
```
|
||||
|
||||
Analyser par LBM :
|
||||
3,
|
||||
Loading…
Add table
Reference in a new issue