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

PartialDependenceVariance cannot be saved #938

Open
ascillitoe opened this issue Jun 29, 2023 · 0 comments
Open

PartialDependenceVariance cannot be saved #938

ascillitoe opened this issue Jun 29, 2023 · 0 comments
Labels
Type: Bug Something isn't working

Comments

@ascillitoe
Copy link
Contributor

Issue

The save method of the PartialDependenceVariance explainer returns the following error:

AttributeError: 'PartialDependenceVariance' object has no attribute 'predictor'

This is because the predictor attribute belongs to the wrapped PartialDependence/TreePartialDependence explainer:

print(explainer.pd_explainer.predictor)
>>> <bound method MLPRegressor.predict of MLPRegressor(max_iter=10000, random_state=0)>

Possible fixes

We could fix this by adding a predictor property to the PartialDependenceVariance class (if we wanted predictor to be publicly accessible), otherwise we could change the behaviour when deleting predictor at save time (this needs updating anyway #930).

@ascillitoe ascillitoe added the Type: Bug Something isn't working label Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant