merge.EBM | R Documentation |
Merge multiple EBMs together.
## S3 method for class 'EBM'
merge(x, y, ...)
x , y |
Fitted ebm objects that have been trained on similar data sets that have the same set of features. |
... |
Additional ebm objects to be merged. |
A merged ebm object.
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.
## Not run:
# 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")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.