From 8760536a9cb8e2fca1ddff9d7142843c5c360382 Mon Sep 17 00:00:00 2001 From: Maria Voigt <maria.voigt@idiv.de> Date: Fri, 7 Apr 2017 11:36:56 +0200 Subject: [PATCH] deleting summary in bootstrap, to start tinkering with it --- src/prediction/abundance_prediction_bootstrap_per_boot.R | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/prediction/abundance_prediction_bootstrap_per_boot.R b/src/prediction/abundance_prediction_bootstrap_per_boot.R index e396045..f66f966 100644 --- a/src/prediction/abundance_prediction_bootstrap_per_boot.R +++ b/src/prediction/abundance_prediction_bootstrap_per_boot.R @@ -172,18 +172,17 @@ names(predictor_estimates) <- c("intercept", predictor_names, # but takes a bit longer (52s, to 35s for 100 rows) ## PLUS PAY ATTENTION, IF PREDICTIONS NOT SAME NROW--> VALUES GET RECYCLED + if(is_verbose){print(paste("1. start pred_per_cell", Sys.time()))} - pred_per_cell <- foreach(cell = 1:nrow(predictor_estimates), .combine = c) %dopar% { + #pred_per_cell <- foreach(cell = 1:nrow(predictor_estimates), .combine = c) %dopar% { + pred_per_cell <- foreach(cell = 1:10, .combine = c) %dopar% { t_predictor_estimates <- t( predictor_estimates[cell, ]) pred_estimates_wcoeffs <- data.frame(mapply(`*`, all_boots[nr_boot, ], t_predictor_estimates, SIMPLIFY = F)) pred_estimate_cell <- apply(pred_estimates_wcoeffs, 1, sum) pred_estimate_cell <- exp(pred_estimate_cell) return(pred_estimate_cell) } - pred_per_boot <- c(sum(pred_per_cell), - min(pred_per_cell), - max(pred_per_cell)) return(pred_per_boot) } -- GitLab