Skip to content

Commit

Permalink
fitEstimator can be called from PLP
Browse files Browse the repository at this point in the history
  • Loading branch information
egillax committed Dec 22, 2023
1 parent a52d831 commit 6d3e65f
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion R/MLP.R
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ setMultiLayerPerceptron <- function(numLayers = c(1:8),
attr(param, "settings")$modelType <- "MLP"

results <- list(
fitFunction = "fitEstimator",
fitFunction = "DeepPatientLevelPrediction::fitEstimator",
param = param,
estimatorSettings = estimatorSettings,
modelType = "MLP",
Expand Down
2 changes: 1 addition & 1 deletion R/ResNet.R
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ setResNet <- function(numLayers = c(1:8),
}
attr(param, "settings")$modelType <- "ResNet"
results <- list(
fitFunction = "fitEstimator",
fitFunction = "DeepPatientLevelPrediction::fitEstimator",
param = param,
estimatorSettings = estimatorSettings,
modelType = "ResNet",
Expand Down
2 changes: 1 addition & 1 deletion R/Transformer.R
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ setTransformer <- function(numBlocks = 3,
}
attr(param, "settings")$modelType <- "Transformer"
results <- list(
fitFunction = "fitEstimator",
fitFunction = "DeepPatientLevelPrediction::fitEstimator",
param = param,
estimatorSettings = estimatorSettings,
modelType = "Transformer",
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-MLP.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ modelSettings <- setMultiLayerPerceptron(
test_that("setMultiLayerPerceptron works", {
testthat::expect_s3_class(object = modelSettings, class = "modelSettings")

testthat::expect_equal(modelSettings$fitFunction, "fitEstimator")
testthat::expect_equal(modelSettings$fitFunction, "DeepPatientLevelPrediction::fitEstimator")

testthat::expect_true(length(modelSettings$param) > 0)

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-ResNet.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ resSet <- setResNet(
test_that("setResNet works", {
testthat::expect_s3_class(object = resSet, class = "modelSettings")

testthat::expect_equal(resSet$fitFunction, "fitEstimator")
testthat::expect_equal(resSet$fitFunction, "DeepPatientLevelPrediction::fitEstimator")

testthat::expect_true(length(resSet$param) > 0)

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-Transformer.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ settings <- setTransformer(

test_that("Transformer settings work", {
testthat::expect_s3_class(object = settings, class = "modelSettings")
testthat::expect_equal(settings$fitFunction, "fitEstimator")
testthat::expect_equal(settings$fitFunction, "DeepPatientLevelPrediction::fitEstimator")
testthat::expect_true(length(settings$param) > 0)
testthat::expect_error(setTransformer(
numBlocks = 1, dimToken = 50,
Expand Down

0 comments on commit 6d3e65f

Please sign in to comment.