interpretml / interpret

Fit interpretable models. Explain blackbox machine learning.
https://interpret.ml/docs
MIT License
6.28k stars 729 forks source link

Combining features from multiple EBM models (with error bars) #372

Closed ndwarshuis closed 1 year ago

ndwarshuis commented 2 years ago

Thank you for the great package; we are getting tremendous value from it.

We would like to train multiple EBMs via k-fold cross validation and combine the features from these into one global model (including the error bars). Is this currently possible to do?

This is somewhat of a duplicate of https://github.com/interpretml/interpret/issues/182 except this previous issue was asking just about averaging each feature (and has a workaround for that), and here I'm wondering specifically about the error bars. My understanding is that the error bars would not be possible to accurately calculate unless the mini-EBMs created internally via bagging are saved (which they aren't yet but it seems there are plans to add this).

paulbkoch commented 2 years ago

Hi @ndwarshuis -- Glad to hear you're finding the package useful.

Things have improved since that older issue. We now have a merge_ebms function, and it works with error bars too. This functionality isn't available from the pypi package, so you'll need to clone our repo.

Here's the function: https://github.com/interpretml/interpret/blob/9a6b376d24b54668ef729702ed634e846c332206/python/interpret-core/interpret/glassbox/ebm/utils.py#L540

paulbkoch commented 1 year ago

Hi @ndwarshuis -- Our latest python release (0.3.0) now includes merge_ebms so there is no longer a need to build from source.

ndwarshuis commented 1 year ago

@paulbkoch excellent, thank you :)