Closed chhetri22 closed 5 years ago
Hi. I think I can shed some light. Couple solutions for you @chhetri22 .
But you can change the code really easy like. It's one line.
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))
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.
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.
Thanks @chhetri22 & @mikewlange - this should no longer be an issue.
When running the Interpretable Classification Methods notebook, if explain_global or explain_local is called on ExplainableBoostingClassifier without fitting the model first, the NotFittedError is not raised. Instead an AttributeError is raised.
Similarly, when running the Interpretable Regression Methods notebook, if explain_global or explain_local is called on ExplainableBoostingRegressor without fitting the model first, the NotFittedError is not raised. Instead an AttributeError is raised.