GithubHelp home page GithubHelp logo

Comments (1)

paulbkoch avatar paulbkoch commented on July 19, 2024

Hi @gisandnes -- You can do either of these. If you want to train 14 separate ExplainableBoostingRegressor models with 1 outer bag each, you can combine them afterwards using the merge_ebms function. One complication with this route is that each of the separate EBMs will probably select a different set of interactions since there are slight variations in the interaction metrics across bags. You can resolve this by training EBMs without interactions, then using the measure_interactions function to choose a common set of interactions, then train new EBMs by specifying the interactions explicitly. There is an example in our documentation that shows how to handle custom interactions:
https://interpret.ml/docs/python/examples/custom-interactions.html

The other way, which I would recommend instead, is a bit hacker but easier. We store each of the bagged models inside the ExplainableBoostingRegressor object. You can force the EBM to behave as if it were one of the bagged models with:

# make the EBM behave as one of the bagged models
ebm.term_scores_ = ebm.bagged_scores_[3]
ebm.intercept_ = ebm.bagged_intercept_[3]
ebm.standard_deviations_ = None  # remove the error bars, which no longer apply with 1 bag

And it should behave identically to that individual bagged model for both prediction and feature/term importances.

I guess this functionality should be added to our API since it seems like it would be a common scenario.

from interpret.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.