Autosave tests
This commit is contained in:
parent
d5f1620361
commit
1fe1656700
1 changed files with 6 additions and 2 deletions
|
|
@ -6,6 +6,7 @@ library(R.utils)
|
||||||
library(stringr)
|
library(stringr)
|
||||||
library(sbm)
|
library(sbm)
|
||||||
library(blockmodels)
|
library(blockmodels)
|
||||||
|
library(tictoc)
|
||||||
|
|
||||||
the_data <- import_biom("data/mach/kinetic.biom")
|
the_data <- import_biom("data/mach/kinetic.biom")
|
||||||
|
|
||||||
|
|
@ -28,14 +29,17 @@ the_data <- import_biom("data/mach/kinetic.biom")
|
||||||
# And to compute with the dispatcher the previous values to init the models with ICL and memberships
|
# And to compute with the dispatcher the previous values to init the models with ICL and memberships
|
||||||
|
|
||||||
per_taxa_networks <- collapse_otu_at_taxo(the_data)
|
per_taxa_networks <- collapse_otu_at_taxo(the_data)
|
||||||
|
tic()
|
||||||
r2_model <- BM_poisson(
|
r2_model <- BM_poisson(
|
||||||
membership_type = "LBM",
|
membership_type = "LBM",
|
||||||
adj = per_taxa_networks[[2]], # Account for the root
|
adj = per_taxa_networks[[2]], # Account for the root
|
||||||
verbosity = 6,
|
verbosity = 6,
|
||||||
plotting = "",
|
plotting = "",
|
||||||
ncores = parallelly::availableCores()
|
ncores = 1, # parallelly::availableCores(),
|
||||||
|
autosave = "r2test.Rds"
|
||||||
)
|
)
|
||||||
r2_model$estimate()
|
r2_model$estimate()
|
||||||
r3_model <- bm_propagate_taus_all_models(phyloseq_data = the_data, rank_id_start = 2, target_rank_id = 3, per_taxa_networks = per_taxa_networks)
|
toc()
|
||||||
|
r3_model <- bm_propagate_taus_all_models(phyloseq_data = the_data, rank_id_start = 2, target_rank_id = 3, per_taxa_networks = per_taxa_networks, first_model = r2_model, autosave = "r3test.Rds")
|
||||||
r4_model <- bm_propagate_taus_all_models(phyloseq_data = the_data, rank_id_start = 3, per_taxa_networks = per_taxa_networks, first_model = r3_model)
|
r4_model <- bm_propagate_taus_all_models(phyloseq_data = the_data, rank_id_start = 3, per_taxa_networks = per_taxa_networks, first_model = r3_model)
|
||||||
r5_model <- bm_propagate_taus_all_models(phyloseq_data = the_data, rank_id_start = 4, per_taxa_networks = per_taxa_networks, first_model = r4_model)
|
r5_model <- bm_propagate_taus_all_models(phyloseq_data = the_data, rank_id_start = 4, per_taxa_networks = per_taxa_networks, first_model = r4_model)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue