View source: R/model_metrics.R
| gain_lift | R Documentation | 
This function calculates cumulative gain, lift, and response
values for a predictive score of a specific target. You can use the
mplot_gain() function to create a plot.
gain_lift(
  tag,
  score,
  target = "auto",
  splits = 10,
  plot = FALSE,
  quiet = FALSE
)
tag | 
 Vector. Real known label  | 
score | 
 Vector. Predicted value or model's result  | 
target | 
 Value. Which is your target positive value? If set to 'auto', the target with largest mean(score) will be selected. Change the value to overwrite. Only used when binary categorical model.  | 
splits | 
 Integer. Number of percentiles to split the data  | 
plot | 
 Boolean. Plot results? Uses   | 
quiet | 
 Boolean. Keep quiet? If not, informative messages will be shown.  | 
data.frame when plot=FALSE or plot when plot=TRUE.
Other Machine Learning: 
ROC(),
conf_mat(),
export_results(),
h2o_automl(),
h2o_predict_MOJO(),
h2o_selectmodel(),
impute(),
iter_seeds(),
lasso_vars(),
model_metrics(),
model_preprocess(),
msplit()
Other Model metrics: 
ROC(),
conf_mat(),
errors(),
loglossBinary(),
model_metrics()
data(dfr) # Results for AutoML Predictions
head(dfr$class2)
# Results for Binomial Model
gain_lift(dfr$class2$tag, dfr$class2$scores, target = "FALSE")
gain_lift(dfr$class2$tag, dfr$class2$scores, target = "TRUE", splits = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.