# 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.