Skip to content

Commit

Permalink
fix numerical features
Browse files Browse the repository at this point in the history
  • Loading branch information
egillax committed Dec 7, 2023
1 parent 4356057 commit f3340d9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions R/Estimator.R
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ gridCvDeep <- function(mappedData,
currentEstimatorSettings$modelType <- modelSettings$modelType
currentModelParams$catFeatures <- dataset$get_cat_features()$max()
currentModelParams$numFeatures <-
dataset$get_numerical_features()$max()
dataset$get_numerical_features()$len()
if (findLR) {
lrFinder <- createLRFinder(modelType = modelSettings$modelType,
modelParameters = currentModelParams,
Expand Down Expand Up @@ -402,7 +402,7 @@ gridCvDeep <- function(mappedData,
}

modelParams$catFeatures <- dataset$get_cat_features()$max()
modelParams$numFeatures <- dataset$get_numerical_features()$max()
modelParams$numFeatures <- dataset$get_numerical_features()$len()


estimatorSettings <- fillEstimatorSettings(modelSettings$estimatorSettings,
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-Estimator.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
catFeatures <- smallDataset$dataset$get_cat_features()$max()
numFeatures <- smallDataset$dataset$get_numerical_features()$max()
numFeatures <- smallDataset$dataset$get_numerical_features()$len()

modelParameters <- list(
cat_features = catFeatures,
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-LRFinder.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ test_that("LR finder works", {
list(cat_features =
dataset$get_cat_features()$max(),
num_features =
dataset$get_numerical_features()$max(),
dataset$get_numerical_features()$len(),
size_embedding = 32L,
size_hidden = 64L,
num_layers = 1L,
Expand Down Expand Up @@ -64,7 +64,7 @@ test_that("LR finder works with device specified by a function", {
model = "ResNet",
modelParameters =
list(cat_features = dataset$get_cat_features()$max(),
num_features = dataset$get_numerical_features()$max(),
num_features = dataset$get_numerical_features()$len(),
size_embedding = 8L,
size_hidden = 16L,
num_layers = 1L,
Expand Down

0 comments on commit f3340d9

Please sign in to comment.