Skip to content

Commit

Permalink
Merge pull request #517 from OHDSI/issue_516
Browse files Browse the repository at this point in the history
fixing FeatureEngineering bug
  • Loading branch information
egillax authored Dec 17, 2024
2 parents fbea755 + ab80872 commit 19d59ba
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion R/CyclopsModels.R
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ fitCyclopsModel <- function(
model = modelTrained,

preprocessing = list(
featureEngineering = attr(trainData, "metaData")$featureEngineering,#learned mapping
featureEngineering = attr(trainData$covariateData, "metaData")$featureEngineering,#learned mapping
tidyCovariates = attr(trainData$covariateData, "metaData")$tidyCovariateDataSettings, #learned mapping
requireDenseMatrix = F
),
Expand Down
2 changes: 1 addition & 1 deletion R/KNN.R
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ fitKNN <- function(trainData, modelSettings, search = 'none', analysisId, ...){
model = indexFolder,

preprocessing = list(
featureEngineering = attr(trainData, "metaData")$featureEngineering,#learned mapping
featureEngineering = attr(trainData$covariateData, "metaData")$featureEngineering,#learned mapping
tidyCovariates = attr(trainData$covariateData, "metaData")$tidyCovariateDataSettings, #learned mapping
requireDenseMatrix = F
),
Expand Down
2 changes: 1 addition & 1 deletion R/RClassifier.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ fitRclassifier <- function(
model = cvResult$model,

preprocessing = list(
featureEngineering = attr(trainData, "metaData")$featureEngineering,
featureEngineering = attr(trainData$covariateData, "metaData")$featureEngineering,
tidyCovariates = attr(trainData$covariateData, "metaData")$tidyCovariateDataSettings,
requireDenseMatrix = F
),
Expand Down
2 changes: 1 addition & 1 deletion R/SklearnClassifier.R
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ fitSklearn <- function(trainData,
result <- list(
model = file.path(outLoc),
preprocessing = list(
featureEngineering = attr(trainData, "metaData")$featureEngineering,
featureEngineering = attr(trainData$covariateData, "metaData")$featureEngineering,
tidyCovariates = attr(trainData$covariateData, "metaData")$tidyCovariateDataSettings,
requireDenseMatrix = attr(param, "settings")$requiresDenseMatrix
),
Expand Down

0 comments on commit 19d59ba

Please sign in to comment.