Description Usage Arguments Value Examples
View source: R/plot_lift_curve_relative.R
Buckets data into groups using the difference in predicted values (proposed_pred - incumbent_pred) (see prep_num_bin) and finds average predictions and actual in each bucket.
Note: Predictions should be annualised (independent of exposure)
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 
| actual | Array[Numeric] - Values we are aiming to predict. | 
| incumbent_pred | Array[Numeric] - Values that we have predicted by the incumbent model. Incumbent is the current model looking to be replaced. | 
| proposed_pred | Optional: String - Text to use to label the proposed predictions. | 
| weight | Optional: Array[Numeric] - Weighting of predictions. If NULL even weighting is used. | 
| title | Optional: String - Title for the plot. | 
| n_bins | numeric - Number of bins to split exposure into | 
| method | string - One of  | 
| use_labels | logical - should the bins be numbered or human readable labelled | 
| mean | numeric - Only used when  | 
| sd | numeric - Only used when  | 
| incumbent_label | Optional: String - Text to use to label the incumbent predictions. | 
| use_plotly | Optional: boolean - If TRUE plotly object is returned else ggplot2 object. | 
plotly/ggplot object of showing relative lift curve for given pair of predictions
| 1 2 | plot_lift_curve_relative(actual=1:100, incumbent_pred = seq(25,74.5,0.5) + rnorm(100, mean=0, sd = 10), proposed_pred=seq(1,100,1) + rnorm(100, mean=0, sd = 10), title="Example Lift Curve")
plot_lift_curve_relative(actual=1:100, incumbent_pred = seq(25,74.5,0.5) + rnorm(100, mean=0, sd = 10), proposed_pred=seq(1,100,1) + rnorm(100, mean=0, sd = 10), title="Example Lift Curve", method="gaussian_weight")
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.