createSampleSettings: Create the settings for defining how the trainData from...

View source: R/Sampling.R

createSampleSettingsR Documentation

Create the settings for defining how the trainData from splitData are sampled using default sample functions.

Description

Create the settings for defining how the trainData from splitData are sampled using default sample functions.

Usage

createSampleSettings(
  type = "none",
  numberOutcomestoNonOutcomes = 1,
  sampleSeed = sample(10000, 1)
)

Arguments

type

(character) Choice of:

  • 'none' No sampling is applied - this is the default

  • 'underSample' Undersample the non-outcome class to make the data more ballanced

  • 'overSample' Oversample the outcome class by adding in each outcome multiple times

numberOutcomestoNonOutcomes

(numeric) An numeric specifying the require number of non-outcomes per outcome

sampleSeed

(numeric) A seed to use when splitting the data for reproducibility (if not set a random number will be generated)

Details

Returns an object of class sampleSettings that specifies the sampling function that will be called and the settings

Value

An object of class sampleSettings


OHDSI/PatientLevelPrediction documentation built on Sept. 15, 2024, 6:38 a.m.