Prints static arena summary
# S3 method for arena_static print(x, ...)
x |
|
---|---|
... | other parameters |
None
library("DALEX") library("arenar") library("dplyr", quietly=TRUE, warn.conflicts = FALSE) # create a model model <- glm(m2.price ~ ., data=apartments) # create a DALEX explainer explainer <- DALEX::explain(model, data=apartments, y=apartments$m2.price)#> Preparation of a new explainer is initiated #> -> model label : lm ( default ) #> -> data : 1000 rows 6 cols #> -> target variable : 1000 values #> -> predict function : yhat.glm will be used ( default ) #> -> predicted values : numerical, min = 1781.848 , mean = 3487.019 , max = 6176.032 #> -> model_info : package stats , ver. 4.0.2 , task regression ( default ) #> -> residual function : difference between y and yhat ( default ) #> -> residuals : numerical, min = -247.4728 , mean = 2.093656e-14 , max = 469.0023 #> A new explainer has been created!# prepare observations to be explained observations <- apartments[1:3, ] # rownames are used as labels for each observation rownames(observations) <- paste0(observations$construction.year, "-", observations$surface, "m2") # generate static arena for one model and 3 observations arena <- create_arena(live=FALSE) %>% push_model(explainer) %>% push_observations(observations) # print summary print(arena)#> ===== Static Arena Summary ===== #> Observations: 1953-25m2, 1992-143m2, 1937-56m2 #> Variables: construction.year, surface, floor, no.rooms, district #> Models: lm #> Datasets: #> Plots count: 36