diff --git a/DESCRIPTION b/DESCRIPTION index 7382550..ee7b9c8 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: DeepPatientLevelPrediction Type: Package Title: Deep Learning For Patient Level Prediction Using Data In The OMOP Common Data Model -Version: 1.1.1 +Version: 1.1.2 Date: 15-12-2022 Authors@R: c( person("Egill", "Fridgeirsson", email = "e.fridgeirsson@erasmusmc.nl", role = c("aut", "cre")), diff --git a/NEWS.md b/NEWS.md index f3423f9..784270f 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,5 @@ -DeepPatientLevelPrediction 1.1.1 +DeepPatientLevelPrediction 1.1.2 +====================== - Fix bug introduced by removing modelType from attributes (#59) DeepPatientLevelPrediction 1.1 diff --git a/R/Estimator.R b/R/Estimator.R index 1d0878a..c777d7d 100644 --- a/R/Estimator.R +++ b/R/Estimator.R @@ -144,7 +144,6 @@ fitEstimator <- function(trainData, isNumeric = cvResult$numericalIndex ) - attr(modelSettings$param, 'settings')$modelType <- modelSettings$modelType comp <- start - Sys.time() result <- list( model = cvResult$estimator, # file.path(outLoc), diff --git a/R/MLP.R b/R/MLP.R index edf323a..2b9c8b1 100644 --- a/R/MLP.R +++ b/R/MLP.R @@ -68,6 +68,8 @@ setMultiLayerPerceptron <- function(numLayers = c(1:8), if (hyperParamSearch == "random") { suppressWarnings(withr::with_seed(randomSampleSeed, {param <- param[sample(length(param), randomSample)]})) } + attr(param, 'settings')$modelType <- "MLP" + results <- list( fitFunction = "fitEstimator", param = param, diff --git a/R/ResNet.R b/R/ResNet.R index ac95170..dc610b5 100644 --- a/R/ResNet.R +++ b/R/ResNet.R @@ -106,7 +106,7 @@ setResNet <- function(numLayers = c(1:8), if (hyperParamSearch == "random") { suppressWarnings(withr::with_seed(randomSampleSeed, {param <- param[sample(length(param), randomSample)]})) } - + attr(param, 'settings')$modelType <- "ResNet" results <- list( fitFunction = "fitEstimator", param = param, diff --git a/R/Transformer.R b/R/Transformer.R index 64b43b7..7e25ff7 100644 --- a/R/Transformer.R +++ b/R/Transformer.R @@ -119,7 +119,7 @@ setTransformer <- function(numBlocks = 3, dimToken = 96, dimOut = 1, if (hyperParamSearch == "random") { suppressWarnings(withr::with_seed(randomSampleSeed, {param <- param[sample(length(param), randomSample)]})) } - + attr(param, 'settings')$modelType <- "Transformer" results <- list( fitFunction = "fitEstimator", param = param,