Description Usage Arguments Value Examples
View source: R/LearningCurve.R
Creates a learning curve object, which can be plotted using the
plotLearningCurve() function.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | createLearningCurve(
  population,
  plpData,
  modelSettings,
  testSplit = "person",
  testFraction = 0.25,
  trainFractions = c(0.25, 0.5, 0.75),
  trainEvents = NULL,
  splitSeed = NULL,
  nfold = 3,
  indexes = NULL,
  verbosity = "TRACE",
  clearffTemp = FALSE,
  minCovariateFraction = 0.001,
  normalizeData = T,
  saveDirectory = getwd(),
  savePlpData = F,
  savePlpResult = F,
  savePlpPlots = F,
  saveEvaluation = F,
  timeStamp = FALSE,
  analysisId = NULL
)
 | 
| population | The population created using  | 
| plpData | An object of type  | 
| modelSettings | An object of class  
 | 
| testSplit | Specifies the type of evaluation used. Can be either 
 | 
| testFraction | The fraction of the data, which will be used as the testing set in the patient split evaluation. | 
| 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  
 | 
| splitSeed | The seed used to split the testing and training set when using a 'person' type split | 
| nfold | The number of folds used in the cross validation (default = 
 | 
| indexes | 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  | 
| verbosity | Sets the level of the verbosity. If the log level is at or higher in priority than the logger threshold, a message will print. The levels are: 
 | 
| clearffTemp | Clears the temporary ff-directory after each iteration. This can be useful, if the fitted models are large. | 
| minCovariateFraction | Minimum covariate prevalence in population to avoid removal during preprocssing. | 
| normalizeData | Whether to normalise the data | 
| saveDirectory | Location to save log and results | 
| savePlpData | Whether to save the plpData | 
| savePlpResult | Whether to save the plpResult | 
| savePlpPlots | Whether to save the plp plots | 
| saveEvaluation | Whether to save the plp performance csv files | 
| timeStamp | Include a timestamp in the log | 
| analysisId | The analysis unique identifier | 
A learning curve object containing the various performance measures
obtained by the model for each training set fraction. It can be plotted
using plotLearningCurve.
| 1 2 3 4 5 6 7 8 9 10 11 12 | ## 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.