explain_PP {PPtreeregViz}R Documentation

Make explain of PPTreeregObj for DALEX package

Description

Create Model Explainer for PPTreereg

Usage

explain_PP(PPTreeregOBJ, data, y, final.rule,...)

Arguments

PPTreeregOBJ

PPTreereg class object - a model to be explained

data

data.frame or matrix - data that was used for fitting. If not provided then will be extracted from the model. Data should be passed without target column (this shall be provided as the y argument).

y

numeric vector with outputs / scores. If provided then it shall have the same size as data

final.rule

rule to calculate the final node value

...

arguments to be passed to methods

Details

This function creates a unified representation explain of PPTreereg model for cooperate with DALEX package.

Value

An object of the class explainer.

References

Explanatory Model Analysis. Explore, Explain and Examine Predictive Models. https://ema.drwhy.ai/

Examples

library("DALEX")
library("dplyr")
data(dataXY)
Model <- PPTreereg(Y~., data = dataXY, DEPTH = 2)
new_explainer <- explain_PP(Model, data = dataXY[,-1],y = dataXY[,1],final.rule= 5)
DALEX::model_performance(new_explainer) %>% plot(geom = "ecdf")


[Package PPtreeregViz version 2.0.5 Index]