# Predicting future outcomes

Once the test program outlined in Section 3.10.3 has yielded consistent AUC estimates and reasonably stable coefficients, the “production”, or “forward-looking”, model is constructed by training the algorithm on the whole dataset. Sample code for an implementation of the prediction algorithm is given in Appendices C (“vanilla” logistic regression), D (Cox proportional hazard model) and E.4. The algorithms apply the respective vectors of regression coefficients (3.19) or (3.29) to generate the appropriate risk score (“probability” of outcome of interest for linear regression or hazard function for the Cox proportional hazard model). Once a risk rating has been assigned to every member of the test sample, they can be ranked by their ratings in descending order. \(N\) riskiest members can then be selected from the population as candidates for intervention.

Table 3.23 presents 10 patients at highest risk of COPD admission from the test population of 2,049 in the ongoing example from Section 3.7.1.

In Table 3.23 “Risk” is the probability of outcome of interest given by the logistic regression model.