Create predictive probabilities
predictCyclops(plpModel, data, cohort)
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.
An object of type predictiveModel
as generated using
fitPlp
.
The new plpData containing the covariateData for the new population
The cohort to calculate the prediction for
Generates predictions for the population specified in plpData given the model.
# takes too long
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)
Run the code above in your browser using DataLab