Create predictive probabilities using KNN.
predictKnnUsingPlpData(
plpData,
population,
indexFolder,
k = 1000,
weighted = TRUE,
threads = 10
)
An object of type plpData
as generated using getDbPlpData
.
The population to predict for.
Path to a local folder where the KNN classifier index is be stored.
The number of nearest neighbors to use to predict the outcome.
Should the prediction be weigthed by the (inverse of the ) distance metric?
Number of parallel threads to used for the computation.
The value column in the result data.frame is: logistic: probabilities of the outcome, poisson: Poisson rate (per day) of the outcome, survival: hazard rate (per day) of the outcome.
Generates predictions for the population specified in plpData.