LIFT is a plot of the rate of positive prediction against true positive rate for the different thresholds. It is useful for measuring and comparing the accuracy of the classificators.

plot_lift(object, ...)

plotLIFT(object, ...)

## Arguments

object An object of class 'auditor_model_evaluation' created with model_evaluation function. Other 'auditor_model_evaluation' objects to be plotted together.

A ggplot object.

## See also

model_evaluation

## Examples

titanic <- na.omit(DALEX::titanic)
titanic$survived <- titanic$survived == "yes"

# fit a model
model_glm <- glm(survived ~ ., family = binomial, data = titanic)

# use DALEX package to wrap up a model into explainer
exp_glm <- DALEX::explain(model_glm, data = titanic, y = titanic$survived)#> Preparation of a new explainer is initiated #> -> model label : lm (default) #> -> data : 2099 rows 9 cols #> -> target variable : 2099 values #> -> predict function : yhat.glm will be used (default) #> -> predicted values : numerical, min = 9.814966e-09 , mean = 0.3244402 , max = 1 #> -> residual function : difference between y and yhat (default) #> -> residuals : numerical, min = -0.9614217 , mean = -1.68201e-09 , max = 0.9666502 #> A new explainer has been created! # validate a model with auditor library(auditor) eva_glm <- model_evaluation(exp_glm) # plot results plot_lift(eva_glm) plot(eva_glm, type ="lift") model_glm_2 <- glm(survived ~ .-age, family = binomial, data = titanic) exp_glm_2 <- DALEX::explain(model_glm_2, data = titanic, y = titanic$survived, label = "glm2")#> Preparation of a new explainer is initiated
#>   -> model label       :  glm2
#>   -> data              :  2099  rows  9  cols
#>   -> target variable   :  2099  values
#>   -> predict function  :  yhat.glm  will be used (default)
#>   -> predicted values  :  numerical, min =  1.431371e-08 , mean =  0.3244402 , max =  0.9999999
#>   -> residual function :  difference between y and yhat (default)
#>   -> residuals         :  numerical, min =  -0.9457109 , mean =  -1.684502e-09 , max =  0.9665453
#> A new explainer has been created!eva_glm_2 <- model_evaluation(exp_glm_2)

plot_lift(eva_glm, eva_glm_2) plot(eva_glm, eva_glm_2, type = "lift")
{"ft_lang_label":"__label__en","ft_lang_prob":0.52726066,"math_prob":0.9051238,"size":2075,"snap":"2019-35-2019-39","text_gpt3_token_len":636,"char_repetition_ratio":0.12168035,"word_repetition_ratio":0.36875,"special_character_ratio":0.35421687,"punctuation_ratio":0.2247191,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99435055,"pos_list":[0,1,2,3,4,5,6,7,8],"im_url_duplicate_count":[null,1,null,1,null,1,null,1,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-08-20T00:50:17Z\",\"WARC-Record-ID\":\"<urn:uuid:3f9d5ff8-1ecc-4960-b7fd-6c94158cbcc2>\",\"Content-Length\":\"14495\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:c25cdd6c-cf7f-4658-85d7-1354dde2f1c8>\",\"WARC-Concurrent-To\":\"<urn:uuid:cd7363b9-8abe-4016-84bd-748b5e63f805>\",\"WARC-IP-Address\":\"185.199.110.153\",\"WARC-Target-URI\":\"https://mi2datalab.github.io/auditor/reference/plot_lift.html\",\"WARC-Payload-Digest\":\"sha1:OPQIHKFOISB5KXP52EZ2VT3ZHCYH2RPV\",\"WARC-Block-Digest\":\"sha1:EZ2RL7CVVV7TPYJ5CJJ2U3QXZF4ILSDD\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-35/CC-MAIN-2019-35_segments_1566027315174.57_warc_CC-MAIN-20190820003509-20190820025509-00212.warc.gz\"}"}