Train various models using a default parameter gird search or user specified parameters
fitPlp(population, data, modelSettings, cohortId, outcomeId,
minCovariateFraction = 0.001, normalizeData = T)
The population created using createStudyPopulation() who will have their risks predicted
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:
logisticRegressionModel() A lasso logistic regression model
GBMclassifier() A gradient boosting machine
RFclassifier() A random forest model
GLMclassifier () A generalised linear model
KNNclassifier() A KNN model
Id of study cohort
Id of outcome cohort
The minimum fraction of the target popualtion who have a variable for it to be included in the model training
Whether to normalise the data before model fitting
An object of class plpModel
containing:
The trained prediction model
The path to where the model is saved (if saved)
The AUC obtained on the training set
The calibration obtained on the training set
A list specifiying the model, preprocessing, outcomeId and cohortId
The model meta data
The time taken to train the classifier
The user can define the machine learning model to train (regularised logistic regression, random forest, gradient boosting machine, neural network and )