Description Usage Arguments Details Value Examples
View source: R/calculate_profiles.R
This function calculate candidate splits for each selected variable. For numerical variables splits are calculated as percentiles (in general uniform quantiles of the length grid_points). For all other variables splits are calculated as unique values.
1 2 | calculate_variable_split(data, variables = colnames(data),
grid_points = 101)
|
data |
validation dataset. Is used to determine distribution of observations. |
variables |
names of variables for which splits shall be calculated |
grid_points |
number of points used for response path |
Note that calculate_variable_split
function is S3 generic.
If you want to work on non standard data sources (like H2O ddf, external databases)
you should overload it.
A named list with splits for selected variables
1 2 3 4 5 6 7 8 9 10 | library("DALEX2")
## Not run:
library("randomForest")
set.seed(59)
apartments_rf_model <- randomForest(m2.price ~ construction.year + surface + floor +
no.rooms + district, data = apartments)
vars <- c("construction.year", "surface", "floor", "no.rooms", "district")
calculate_variable_split(apartments, vars)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.