Validates predicted probabilities against a set of observed (binary) outcomes.
lift(prob, y, pos.class = NULL, cumulative = TRUE, nbins = 0)# S3 method for lift
plot(
x,
refline = TRUE,
refline.col = 2,
refline.fill = 2,
refline.lty = "dashed",
refline.lwd = 1,
...
)
A "lift"
object, which is essentially a list with the
following components:
"lift"
A numeric vector containing the computed lift values.
"prop"
The corresponding proportion of cases associated with each lift value.
"cumulative"
Same value as that supplied via the
cumulative
argument. (Used by the plot.lift()
method.)
Vector of predicted probabilities.
Vector of binary (i.e., 0/1) outcomes. If y
is coded as
anything other than 0/1, then you must specify which of the two categories
represents the "positive" class (i.e., the class for which the probabilities
specified in prob
correspond to) via the pos.class
argument.
Numeric/character string specifying which values in y
correspond to the "positive" class. Default is NULL
. (Must be
specified whenever y
is not coded as 0/1, where 1 is assumed to
represent the "positive" class.)
Logical indicating whether or not to compute cumulative
lift (i.e., gain). Default is TRUE
.
Integer specifying the number of bins to use when computing
lift. Default is 0, which corresponds to no binning. For example, setting
nbins = 10
will result in computing lift within each decile of the
sorted probabilities.
An object of class "lift"
.
Logical indicating whether or not to include a reference line.
The color to use for the reference line. Default is
2
.
The color to use for filling in the polygon-shaped
reference line. Default is 2
.
The type of line to use for the reference line. Default is
"dashed"
.
The width of the reference line. Default is 1
.
Additional optional argument to be passed on to other methods.