Skip to content
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

Merged
merged 7 commits into from
Feb 18, 2025

Conversation

codeloop
Copy link
Member

@codeloop codeloop commented Feb 13, 2025

ODSC 68406: AutoMLx Global Explainer

  • Automlx global explanation
  • Update to reports to show global section

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Feb 13, 2025
@@ -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:],
Copy link
Member

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?

Copy link
Member Author

@codeloop codeloop Feb 16, 2025

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

@codeloop codeloop changed the title automlx global explainer ODSC 68406: AutoMLx Global Explainer Feb 16, 2025
@codeloop codeloop marked this pull request as ready for review February 16, 2025 08:42
@codeloop codeloop enabled auto-merge February 16, 2025 08:42
@codeloop codeloop requested review from prasankh and ahosler February 16, 2025 08:42
Copy link
Member

@ahosler ahosler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. NIT: May be more readable to use inplace=True
  2. 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 = (
Copy link
Member

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],
Copy link
Member

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

Copy link
Member Author

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!.

@codeloop codeloop requested a review from ahosler February 17, 2025 04:18
ahosler
ahosler previously approved these changes Feb 17, 2025
@codeloop codeloop merged commit 7d13919 into main Feb 18, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants