Create predictive probabilities using KNN.

predictKnnUsingPlpData(
  plpData,
  population,
  indexFolder,
  k = 1000,
  weighted = TRUE,
  threads = 10
)

Arguments

plpData

An object of type plpData as generated using getDbPlpData.

population

The population to predict for.

indexFolder

Path to a local folder where the KNN classifier index is be stored.

k

The number of nearest neighbors to use to predict the outcome.

weighted

Should the prediction be weigthed by the (inverse of the ) distance metric?

threads

Number of parallel threads to used for the computation.

Value

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.

Details

Generates predictions for the population specified in plpData.