model_evaluation: Create model evaluation explanation

View source: R/model_evaluation.R

model_evaluationR Documentation

Create model evaluation explanation

Description

Creates explanation of classification model.

Returns, among others, true positive rate (tpr), false positive rate (fpr), rate of positive prediction (rpp), and true positives (tp).

Created object of class auditor_model_evaluation can be used to plot Receiver Operating Characteristic (ROC) curve (plot plot_roc) and LIFT curve (plot plot_lift).

Usage

model_evaluation(object)

modelEvaluation(object)

Arguments

object

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

Value

An object of the class auditor_model_evaluation.

Examples

data(titanic_imputed, package = "DALEX")

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

glm_audit <- audit(model_glm,
                   data= titanic_imputed,
                   y = titanic_imputed$survived)

# validate a model with auditor
me <- model_evaluation(glm_audit)
me

plot(me)


auditor documentation built on Nov. 2, 2023, 6:13 p.m.