splitData: Split the plpData into test/train sets using a splitting...

View source: R/DataSplitting.R

splitDataR Documentation

Split the plpData into test/train sets using a splitting settings of class splitSettings

Description

Split the plpData into test/train sets using a splitting settings of class splitSettings

Usage

splitData(
  plpData = plpData,
  population = population,
  splitSettings = splitSettings
)

Arguments

plpData

An object of type plpData - the patient level prediction data extracted from the CDM.

population

The population created using createStudyPopulation that define who will be used to develop the model

splitSettings

An object of type splitSettings specifying the split - the default can be created using createDefaultSplitSetting

Details

Returns a list containing the training data (Train) and optionally the test data (Test). Train is an Andromeda object containing

  • covariates: a table (rowId, covariateId, covariateValue) containing the covariates for each data point in the train data

  • covariateRef: a table with the covariate information

  • labels: a table (rowId, outcomeCount, ...) for each data point in the train data (outcomeCount is the class label)

  • folds: a table (rowId, index) specifying which training fold each data point is in.

Test is an Andromeda object containing

  • covariates: a table (rowId, covariateId, covariateValue) containing the covariates for each data point in the test data

  • covariateRef: a table with the covariate information

  • labels: a table (rowId, outcomeCount, ...) for each data point in the test data (outcomeCount is the class label)

Value

An object of class splitSettings


OHDSI/PatientLevelPrediction documentation built on April 27, 2024, 8:11 p.m.