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

Init feature to_smartexplainer #146

Merged
merged 1 commit into from Mar 13, 2021

Conversation

johannmartin95
Copy link
Contributor

Description

Add a new method on SmartPredictor object "to_smartexplainer" to switch from a SmartPredictor Object to a SmartExpxlainer one.

  • Start with a check to ensure that the add_input step has been done with the SmartPredictor to get the specific data on which we want to analyse several charts
  • Check if preprocessing isn't a ColumnTransformer, otherwise raise ValueError
  • Initialize SmartExplainer Object with attributes from SmartPredictor
  • Compute the compile step of SmartExplainer with attributes and input used by the SmartPredictor for parameters

Fixes #111

Type of change

  • New feature (non-breaking change which adds functionality or feature that would cause existing functionality to not work as expected)

How Has This Been Tested?

  • Unit test added on test_smart_predictor.py

Test Configuration:

  • OS: Linux
  • Python version: 3.6/3.7/3.8
  • Shapash version: 1.2.0

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@johannmartin95 johannmartin95 added the enhancement New feature or request label Mar 11, 2021
@johannmartin95 johannmartin95 self-assigned this Mar 11, 2021
Copy link
Contributor

@yg79 yg79 left a comment

Choose a reason for hiding this comment

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

Good Job Johann

@yg79 yg79 merged commit d2a5e46 into MAIF:master Mar 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Switch from SmartPredictor to SmartExplainer
2 participants