-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ODSC 68406: AutoMLx Global Explainer #1071
Conversation
@@ -453,6 +453,12 @@ def explain_model(self): | |||
|
|||
# Store the explanations in the local_explanation dictionary | |||
self.local_explanation[s_id] = explanations_df | |||
|
|||
self.global_explanation[s_id] = dict(zip( | |||
data_i.columns[1:], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it always guaranteed that "data_i.columns[1:]" will exclude the correct column?
Are there tests to detect a break in this logic incase we change the order of the columns later?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, resolved this, does not need any subsetting now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- NIT: May be more readable to use inplace=True
- Let's double check that we can drop the
["model"]
indexing
self.formatted_global_explanation = ( | ||
global_explanation_df / global_explanation_df.sum(axis=0) * 100 | ||
) | ||
self.formatted_global_explanation = ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would this be better to do with inplace=True
?
@@ -424,8 +430,10 @@ def explain_model(self): | |||
if self.spec.explanations_accuracy_mode == SpeedAccuracyMode.AUTOMLX: | |||
# Use the MLExplainer class from AutoMLx to generate explanations | |||
explainer = automlx.MLExplainer( | |||
self.models[s_id]["model"], | |||
self.datasets.additional_data.get_data_for_series(series_id=s_id) | |||
self.models[s_id], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we be dropping ["model"]
? I believe Prashant added this for inverse_transforming non-numerical columns
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missed in the merge conflicts, Thanks!.
ODSC 68406: AutoMLx Global Explainer