# lift

From caret v5.07-001
by Max Kuhn

##### Lift Plot

For classification models, this function creates a 'lift plot' that describes how well a model ranks samples for one class

- Keywords
- hplot

##### Usage

```
lift(x, data = NULL, class = NULL, cuts = 11,
subset = TRUE, lattice.options = NULL,
ylabel = "% Samples Found", xlabel = "% Samples Tested",
...)
```

##### Details

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
- The data are split into
`cuts - 1`

roughly equal groups - the number of samples with true results equal to
`class`

are determined - the lift is calculated as the ratio of the percentage of samples in each split corresponding to
`class`

over 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 `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`

).

##### Value

- a
lattice object

##### See Also

##### Examples

```
set.seed(1)
simulated <- data.frame(obs = factor(rep(letters[1:2], each = 100)),
perfect = sort(runif(200), decreasing = TRUE),
random = runif(200))
lift(obs ~ random, data = simulated)
lift(obs ~ random, data = simulated, type = c("p", "l"))
lift(obs ~ random + perfect, data = simulated,
type = c("p", "l"),
auto.key = list(columns = 2))
```

*Documentation reproduced from package caret, version 5.07-001, License: GPL-2*

### Community examples

Looks like there are no examples yet.