Last chance! 50% off unlimited learning
Sale ends in
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
)
data.frame when plot=FALSE
or plot when plot=TRUE
.
Vector. Real known label
Vector. Predicted value or model's result
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.
Integer. Number of percentiles to split the data
Boolean. Plot results? Uses mplot_gain()
Boolean. Quiet all messages, warnings, recommendations?
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)
Run the code above in your browser using DataLab