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

REFACTOR: remove duplicated shap_calculator method #370

Merged

Conversation

mtsokol
Copy link
Contributor

@mtsokol mtsokol commented Jul 9, 2023

Hi @j-ittner,

Here I share my review for for #369: For me the PR is ready for merging, the only comment I have is that shap_calculator method implementation seems to be repeated in LearnerInspector.

I would rely only on _BaseLearnerInspector implementation of shap_calculator and reuse it in LearnerInspector and NativeLearnerInspector.

The Implementation that I drop here differs only in line 330 and 316, where it can be done the same way as in _BaseLearnerInspector.
What do you think?

@j-ittner
Copy link
Member

Thanks for spotting this, indeed I forgot to remove the method in the child class after pulling it up to the base class.

@j-ittner j-ittner assigned j-ittner and mtsokol and unassigned j-ittner Jul 10, 2023
@j-ittner j-ittner added the refactor Internal changes that don't change functionality label Jul 10, 2023
@j-ittner j-ittner added this to the 2.1.0 milestone Jul 10, 2023
@j-ittner j-ittner merged commit 09805df into api/NativeLearnerInspector Jul 10, 2023
@j-ittner j-ittner deleted the api/NativeLearnerInspector_review branch July 10, 2023 06:46
j-ittner added a commit that referenced this pull request Jul 10, 2023
…ner pipelines (#369)

* API: preserve row order in ShapCalculator output

* TEST: suppress numba debug messages

* API: add class NativeLearnerInspector for native scikit-learn learners

* REFACTOR: pull learner inspector initializer up to base class

* REFACTOR: remove obsolete LearnerInspector.shap_calculator()

* REFACTOR: remove duplicated shap_calculator method (#370)

---------

Co-authored-by: Mateusz Sokół <8431159+mtsokol@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Internal changes that don't change functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants