fitPlp: fitPlp

View source: R/Fit.R

fitPlpR Documentation

fitPlp

Description

Train various models using a default parameter gird search or user specified parameters

Usage

fitPlp(trainData, modelSettings, search = "grid", analysisId)

Arguments

trainData

An object of type TrainData created using splitData data extracted from the CDM.

modelSettings

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

search

The search strategy for the hyper-parameter selection (currently not used)

analysisId

The id of the analysis

Details

The user can define the machine learning model to train (regularised logistic regression, random forest, gradient boosting machine, neural network and )

Value

An object of class plpModel containing:

model

The trained prediction model

modelLoc

The path to where the model is saved (if saved)

trainAuc

The AUC obtained on the training set

trainCalibration

The calibration obtained on the training set

modelSettings

A list specifiying the model, preprocessing, outcomeId and cohortId

metaData

The model meta data

trainingTime

The time taken to train the classifier


quinterpriest/PatientLevelPrediction documentation built on April 20, 2022, 12:50 a.m.