Learn R Programming

ceterisParibus (version 0.4.2)

print.what_if_explainer: Print What If Explainer Summary

Description

Print What If Explainer Summary

Usage

# S3 method for what_if_explainer
print(x, ...)

Arguments

x

a what_if explainer produced with the 'what_if' function

...

other arguments that will be passed to head()

Examples

Run this code
library("DALEX")
 if (FALSE) {
library("randomForest")
apartments_rf_model <- randomForest(m2.price ~ construction.year + surface + floor +
                     no.rooms + district, data = apartments)
explainer_rf <- explain(apartments_rf_model,
                     data = apartmentsTest[,2:6], y = apartmentsTest$m2.price)
new_apartment <- apartmentsTest[1, ]
new_apartment
}

Run the code above in your browser using DataLab