Skip to content
Snippets Groups Projects
Unverified Commit 5799fa32 authored by Laurent Modolo's avatar Laurent Modolo
Browse files

tdd_analysis_bt_cell_type.R: fix data loading for bt_analysis

parent 7edb77fa
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment