The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

BESMI Batch Imputation

library(DataFusionGDM)

# Generate a full matrix in memory (no package file I/O)
full <- simulate_genetic_distances(n_pops = 40, verbose = FALSE, seed = 233)$distance_matrix

summary_table <- data.frame()
for (k in 1:3) {
  for (bs_i in 1:3) {
    res <- besmi_create_masked_matrices(full, k, seed = 100 + 10 * k + bs_i)
    base_dir <- tempdir()
    dir.create(file.path(base_dir, "training_set"), recursive = TRUE, showWarnings = FALSE)
    training_path <- sprintf("%s", file.path(base_dir, sprintf("training_set/masked_k%d_bs%d.rds", k, bs_i)))
    saveRDS(res$masked_matrix, training_path)
    summary_table <- rbind(summary_table, data.frame(k = k, bs = bs_i, training_path = training_path))
  }
}

paths <- summary_table$training_path
output_dir <- file.path(tempdir(), "imputation_set")
metrics <- besmi_batch_impute(paths, the_method = "midastouch", max_iter = 3,
  imputation_convergence_threshold = 1e-3, propagation_convergence_threshold = 1e-3,
  distance_metric = "mae", output_dir = output_dir)
head(metrics)

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.