Creates a learning curve in parallel, which can be plotted using the plotLearningCurve() function. Currently this functionality is only supported by Lasso Logistic Regression.

createLearningCurvePar(population, plpData, modelSettings,
testSplit = "person", testFraction = 0.25, trainFractions = c(0.25, 0.5,
0.75), splitSeed = NULL, nfold = 3, indexes = NULL,
minCovariateFraction = 0.001)

Arguments

population The population created using createStudyPopulation() that will be used to develop the model. An object of type plpData - the patient level prediction data extracted from the CDM. An object of class modelSettings created using one of the function. Currently only one model is supported: setLassoLogisticRegression - a lasso logistic regression model Specifies the type of evaluation used. Can be either 'person' or 'time'. The value 'time' finds the date that splots the population into the testing and training fractions provided. Patients with an index after this date are assigned to the test set and patients with an index prior to this date are assigned to the training set. The value 'person' splits the data randomly into testing and training sets according to fractions provided. The split is stratified by the class label. The fraction of the data, which will be used as the testing set in the patient split evaluation. A list of training fractions to create models for. The seed used to split the testing and training set when using a 'person' type split The number of folds used in the cross validation (default = 3). A dataframe containing a rowId and index column where the index value of -1 means in the test set, and positive integer represents the cross validation fold (default is NULL). Minimum covariate prevalence in population to avoid removal during preprocssing.

Value

A learning curve object containing the various performance measures obtained by the model for each training set fraction. It can be plotted using plotLearningCurve.

Examples

# NOT RUN {
# define model
modelSettings = setLassoLogisticRegression()

# register parallel backend
registerParallelBackend()

# create learning curve
learningCurve <- createLearningCurvePar(population,
plpData,
modelSettings)
# plot learning curve
plotLearningCurve(learningCurve)
# }