View source: R/CyclopsModels.R
predictCyclops | R Documentation |
Create predictive probabilities
predictCyclops(plpModel, data, cohort)
plpModel |
An object of type |
data |
The new plpData containing the covariateData for the new population |
cohort |
The cohort to calculate the prediction for |
Generates predictions for the population specified in plpData given the model.
The value column in the result data.frame is: logistic: probabilities of the outcome, poisson: Poisson rate (per day) of the outome, survival: hazard rate (per day) of the outcome.
data("simulationProfile")
plpData <- simulatePlpData(simulationProfile, n = 1000)
population <- createStudyPopulation(plpData, outcomeId = 3)
data <- splitData(plpData, population)
plpModel <- fitPlp(data$Train, modelSettings = setLassoLogisticRegression(),
analysisId = "test", analysisPath = NULL)
prediction <- predictCyclops(plpModel, data$Test, data$Test$labels)
# view prediction dataframe
head(prediction)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.