OHDSI / PatientLevelPrediction

An R package for performing patient level prediction in an observational database in the OMOP Common Data Model.
https://ohdsi.github.io/PatientLevelPrediction
181 stars 88 forks source link

[Bug] splitData removes attributes from trainData$covariateData #433

Closed egillax closed 3 months ago

egillax commented 3 months ago

It does so because here it adds the population size:

attr(trainData$covariateData, "metaData") <- list(populationSize = nrow(trainData$labels))

This line is unnecessary since both batchRestrict and limitCovariatesToPopulation already copy the metadata correctly from covariateData to trainData$covariateData / testData$covariateData , including the new population sizes.

egillax commented 3 months ago

Fixed in v6.3.7