Merge multiple EBMs together.
Usage
# S3 method for EBM
merge(x, y, ...)
Value
A merged ebm object.
Note
As of right now, the merge()
function produces the following error
message:
Error in py_repr(x) :
AttributeError: 'ExplainableBoostingRegressor' object has no attribute 'cat_smooth'
Run `reticulate::py_last_error()` for details.
This seems to be a bug in the underlying interpret library and does not prevent this function from working. The error message is seemingly just a side effect.
Examples
if (FALSE) {
# Generate list of EBMs with different random seeds
ebms <- lapply(1:3, FUN = function(i) {
ebm(mpg ~ ., data = mtcars, outer_bags = 1, random_state = i, obj = "rmse")
})
# Merge EBMs into one and plot term contribution for `cyl`
merged <- do.call(merge, args = ebms)
plot(merged, term = "cyl")
}