From 2798b647e5e6e6f78123d127dd1103eadfee2a0e Mon Sep 17 00:00:00 2001 From: Volpym Date: Thu, 15 Jan 2026 17:01:59 +0200 Subject: [PATCH] added trainFraction to the initialization of the splitSettings --- R/BackwardsComp.R | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/R/BackwardsComp.R b/R/BackwardsComp.R index cc4dcbc..a9bf95b 100644 --- a/R/BackwardsComp.R +++ b/R/BackwardsComp.R @@ -94,9 +94,12 @@ backwards <- function(predictionAnalysisListFile){ } else { splitSeed <- json$runPlpArgs$splitSeed } - + # calculate the trainFraction based on the testFraction, Otherwise the trainFraction is always set on the default value (0.75) + trainFraction <- 1-json$runPlpArgs$testFraction + json$splitSettings <- PatientLevelPrediction::createDefaultSplitSetting( testFraction = json$runPlpArgs$testFraction, + trainFraction = trainFraction, splitSeed = splitSeed, nfold = json$runPlpArgs$nfold, type = splitType