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 = T,
cores = 4,
modelSettings,
saveDirectory = getwd(),
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 = T),
logSettings = createLogSettings(),
executeSettings = createExecuteSettings(runSplitData = T, runSampleData = F,
runfeatureEngineering = F, runPreprocessData = T, runModelDevelopment = T,
runCovariateSummary = F)
)
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
.
## Not run:
# define model
modelSettings = PatientLevelPrediction::setLassoLogisticRegression()
# create learning curve
learningCurve <- PatientLevelPrediction::createLearningCurve(population,
plpData,
modelSettings)
# plot learning curve
PatientLevelPrediction::plotLearningCurve(learningCurve)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.