One Minus Precision

score_one_minus_precision(object, cutoff = 0.5, data = NULL, y = NULL, ...)

Arguments

object

An object of class explainer created with function explain from the DALEX package.

cutoff

Threshold value, which divides model predicted values (y_hat) to calculate confusion matrix. By default it's 0.5.

data

New data that will be used to calculate the score. Pass NULL if you want to use data from object.

y

New y parameter will be used to calculate score.

...

Other arguments dependent on the type of score.

Value

An object of class auditor_score.

Examples

library(DALEX) # fit a model model_glm <- glm(survived ~ ., family = binomial, data = titanic_imputed) # create an explainer exp_glm <- explain(model_glm, data = titanic_imputed, y = titanic_imputed$survived)
#> Preparation of a new explainer is initiated #> -> model label : lm ( default ) #> -> data : 2207 rows 8 cols #> -> target variable : 2207 values #> -> predict function : yhat.glm will be used ( default ) #> -> predicted values : No value for predict function target column. ( default ) #> -> model_info : package stats , ver. 4.1.1 , task classification ( default ) #> -> predicted values : numerical, min = 0.008128381 , mean = 0.3221568 , max = 0.9731431 #> -> residual function : difference between y and yhat ( default ) #> -> residuals : numerical, min = -0.9628583 , mean = -2.569729e-10 , max = 0.9663346 #> A new explainer has been created!
# calculate score score_one_minus_precision(exp_glm)
#> one_minus_precision: 0.2527473