Coder Social home page Coder Social logo

Comments (9)

dfrankow avatar dfrankow commented on May 16, 2024

By the way, how do you pronounce "GA2M"? My colleague has taken to calling them "interaction GAMs" because it's pronounceable.

from interpret.

interpret-ml avatar interpret-ml commented on May 16, 2024

Hi dfrankow,

Good questions! We can train interaction terms (and detect significant interactions with FAST) in this codebase. We're still working on optimizing the training speed for pairs, so in some cases, they may take a fair bit longer than main effects to train.

You can include interactions by using the "interactions" parameter when you initialize the ExplainableBoostingClassifier/Regressor:
ebm = ExplainableBoostingClassifier(interactions=5, random_state=42)
and then you can call
ebm.fit(X_train, y_train) like usual.

If you pass "interactions" an integer n (ex: interactions=5), we will run FAST and automatically detect the "top-n" pairs, and include them in the training process. Alternatively, you can pass in a list of list of integers (ex: interactions=[[2,3],[4,5]]) which will force the algorithm to learn pairs on features 2/3 and features 4/5.

We pronounce GA2M character by character: G-A-2-M (gee-ay-two-emm).

from interpret.

dfrankow avatar dfrankow commented on May 16, 2024

How do you visualize the heatmap of the interaction features?

Here is my code to visualize features:

explanation = ebc.explain_global()
for feature_idx in range(num_features):
    iplot(explanation.visualize(feature_idx))

It doesn't show any interaction features.

from interpret.

dfrankow avatar dfrankow commented on May 16, 2024

in fact, how can i tell what the interactions are, or that they were even computed?

from interpret.

interpret-ml avatar interpret-ml commented on May 16, 2024

For our current design, we add the learned interaction terms to the ebm's "feature_names" property, at the end of the initial set of features. So instead of iterating through range(num_features), try this:

for feature_idx in range(len(ebc.feature_names)):
    iplot(explanation.visualize(feature_idx))

The interaction feature names are combinations of the original feature names (ex: 'Age' and 'Height' might create a new feature, 'Age x Height'). You can easily see what interactions are learned by checking ebc.feature_names (it's just a standard Python list).

The "show" method typically handles this natively, so hopefully our soon-to-release fix for it will work for you. Otherwise, it takes a slight bit more effort to use the iplot() interface with things like pairs.

from interpret.

dfrankow avatar dfrankow commented on May 16, 2024

Great, thank you!

from interpret.

dfrankow avatar dfrankow commented on May 16, 2024

Knowing how to use it is 90%. Having interface around might be nice, but I really appreciate your willingness to answer questions!

from interpret.

dfrankow avatar dfrankow commented on May 16, 2024

I can see and plot an interaction term, so I consider this closed.

from interpret.

xiaohk avatar xiaohk commented on May 16, 2024

Hey @dfrankow, thank you so much for using GAM, GA2M, and EBM! I am Jay Wang, a research intern at the InterpretML team. We are developing a new visualization tool for EBM and recruiting participants for a user study (see #283 for more details).

We think you are a good fit for this paid user study! If you are interested, you can sign up with the link in #283. Let me know if you have any question. Thank you!

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.