View source: R/LearningCurve.R
createLearningCurve | R Documentation |
Creates a learning curve object, which can be plotted using the
plotLearningCurve()
function.
createLearningCurve(
plpData,
outcomeId,
parallel = TRUE,
cores = 4,
modelSettings,
saveDirectory = NULL,
analysisId = "learningCurve",
populationSettings = createStudyPopulationSettings(),
splitSettings = createDefaultSplitSetting(),
trainFractions = c(0.25, 0.5, 0.75),
trainEvents = NULL,
sampleSettings = createSampleSettings(),
featureEngineeringSettings = createFeatureEngineeringSettings(),
preprocessSettings = createPreprocessSettings(minFraction = 0.001, normalize = TRUE),
logSettings = createLogSettings(),
executeSettings = createExecuteSettings(runSplitData = TRUE, runSampleData = FALSE,
runFeatureEngineering = FALSE, runPreprocessData = TRUE, runModelDevelopment = TRUE,
runCovariateSummary = FALSE)
)
plpData |
An object of type |
outcomeId |
(integer) The ID of the outcome. |
parallel |
Whether to run the code in parallel |
cores |
The number of computer cores to use if running in parallel |
modelSettings |
An object of class
|
saveDirectory |
The path to the directory where the results will be saved (if NULL uses working directory) |
analysisId |
(integer) Identifier for the analysis. It is used to create, e.g., the result folder. Default is a timestamp. |
populationSettings |
An object of type |
splitSettings |
An object of type |
trainFractions |
A list of training fractions to create models for.
Note, providing |
trainEvents |
Events have shown to be determinant of model performance.
Therefore, it is recommended to provide
|
sampleSettings |
An object of type |
featureEngineeringSettings |
An object of |
preprocessSettings |
An object of |
logSettings |
An object of |
executeSettings |
An object of |
A learning curve object containing the various performance measures
obtained by the model for each training set fraction. It can be plotted
using plotLearningCurve
.
data("simulationProfile")
plpData <- simulatePlpData(simulationProfile, n = 1000)
outcomeId <- 3
modelSettings <- setLassoLogisticRegression(seed=42)
learningCurve <- createLearningCurve(plpData, outcomeId, modelSettings = modelSettings,
saveDirectory = file.path(tempdir(), "learningCurve"), cores = 2)
# clean up
unlink(file.path(tempdir(), "learningCurve"), recursive = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.