Coder Social home page Coder Social logo

Comments (2)

mikewlange avatar mikewlange commented on May 22, 2024

Hi. I think I can shed some light. Couple solutions for you @chhetri22 .

  1. It's not really bug. If you don't fit your model, you will not have an attribute_set as the attribute set is the core of the entire explain process. It's more of a 'if you're enumerating an attribute_set that does not exist, it's an error', alert. My guess is due to the fact this error function is used in many scenarios and does get triggered in explain_global as you found out, why added where it's not needed? less is more.if I were Microsoft I would not change the code. But very good find. You can QA for me any time.

But you can change the code really easy like. It's one line.

  1. In the case you describe, you would add
    check_is_fitted(self, "has_fitted_")
    before this line
    for attribute_set_index, attribute_set in enumerate(self.attribute_sets_):
    and after this line
    def explain_global(self, name=None):
    inside of this funtion
def explain_global(self, name=None):
        if name is None:
            name = gen_name_from_class(self)

        # Obtain min/max for model scores
        lower_bound = np.inf
        upper_bound = -np.inf
        for attribute_set_index, attribute_set in enumerate(self.attribute_sets_):
            errors = self.model_errors_[attribute_set_index]
            scores = self.attribute_set_models_[attribute_set_index]

            lower_bound = min(lower_bound, np.min(scores - errors))
            upper_bound = max(upper_bound, np.max(scores + errors))
  1. I'm guessing you installed it like the instructions say pip install -U interpret or though Anaconda itself. However, and this will help you in the future, this is a platform not a little library. The distinct projects and languages. When you see that, you build these from the source. Especially with pypy. Grnted, it's not as bad as node, bu ti's not conda.

  2. If this type of thing concerns you enough to bring to light. You should be helping them fix their 20 year old HEP code at cern. Honestly, you would lose your mind. And people wonder (people = me) why we have made only a single significant discovery compared to it's ability to. But that's another story...

Cheers.

from interpret.

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

Thanks @chhetri22 & @mikewlange - this should no longer be an issue.

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.