lift.formula is used to process the data and xyplot.lift is used to create the plot.To construct the lift plot, the following steps are used for each model:
- The data are ordered by the numeric model prediction used on the right-hand side of the model formula
- Each unque value of the score is treated as a cut point
- The number of samples with true results equal to
classare determined - The lift is calculated as the ratio of the percentage of samples in each split corresponding to
classover the same percentage in the entire data set
lift produces a plot of the cumulative lift values by the percentage of samples evaluated. This implementation uses the lattice function xyplot, so plot elements can be changed via panel functions, trellis.par.set or other means. lift uses the panel function panel.lift2 by default, but it can be changes using update.trellis (see the examples in panel.lift2).
The following elements are set by default in the plot but can be changed by passing new values into xyplot.lift: xlab = "% Samples Tested", ylab = "% Samples Found", type = "S", ylim = extendrange(c(0, 100)) and xlim = extendrange(c(0, 100)).