diff --git a/src/tdd_analysis_bt_cell_type.R b/src/tdd_analysis_bt_cell_type.R index f0f658db40c04c91e39a8f6051afde407600f040..65aaf91143db14cc9cc09367e194e76662b94805 100644 --- a/src/tdd_analysis_bt_cell_type.R +++ b/src/tdd_analysis_bt_cell_type.R @@ -192,7 +192,7 @@ model_construction <- function(tdd_index, factor_rm, transcript_selection, outdi } tdd_analysis <- function(tdd_index, factor_rm, transcript_selection, outdir, cpus = 10) { - cl <- makePSOCKcluster(12) + cl <- makePSOCKcluster(cpus) registerDoParallel(cl) # compute Feature importance # Permutation feature importance measures the increase in the prediction error @@ -221,8 +221,6 @@ tdd_analysis <- function(tdd_index, factor_rm, transcript_selection, outdir, cpu # compute Feature effects # The partial dependence function at a particular feature value represents the # average prediction if we force all data points to assume that feature value. - load(file = str_c(outdir, "bt_model.Rdata")) - if (!file.exists(str_c(outdir, "bt_ale.Rdata"))) { bt_ale <- list() for (feature in tdd_index %>% @@ -304,8 +302,6 @@ tdd_analysis <- function(tdd_index, factor_rm, transcript_selection, outdir, cpu # Individual Conditional Expectation (ICE) plots display one line per instance # that shows how the instance’s prediction changes when a feature changes. - load(file = str_c(outdir, "bt_model.Rdata")) - if (!file.exists(str_c(outdir, "bt_ice.Rdata"))) { bt_ice <- list() for (feature in bt_imp_mse$results %>% @@ -336,8 +332,6 @@ tdd_analysis <- function(tdd_index, factor_rm, transcript_selection, outdir, cpu } # compute interaction of any feature with others - load(file = str_c(outdir, "bt_model.Rdata")) - if (!file.exists(str_c(outdir, "bt_interact.Rdata"))) { cl <- makePSOCKcluster(24) registerDoParallel(cl)