By default function opens browser with new arena session. Appending data to already existing session is also possible using argument append_data

run_server(
  arena,
  port = 8181,
  host = "127.0.0.1",
  open_browser = TRUE,
  append_data = FALSE,
  arena_url = "https://arena.drwhy.ai/"
)

Arguments

arena

Live arena object

port

server port

host

server ip address (hostnames do not work yet)

open_browser

Whether to open browser with new session

append_data

Whether to append data to already existing session

arena_url

URL of Arena dashboard instance

Value

not modified arena object

Examples

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!
# generate live arena for one model and all data as observations arena <- create_arena(live=TRUE) %>% push_model(explainer) %>% push_observations(apartments) # run the server if (interactive()) run_server(arena, port=1234)