TeamHG-Memex / eli5

A library for debugging/inspecting machine learning classifiers and explaining their predictions
http://eli5.readthedocs.io
MIT License
2.76k stars 334 forks source link

Allow for Nans in input of Permutation Importance #381

Open Matgrb opened 4 years ago

Matgrb commented 4 years ago

Closes #262

So far i used force_all_finite=False, but even better would be force_all_finite='allow-nan'. But for that I would also need to increase sklearn version in the requirements to at least 0.20.

codecov-commenter commented 4 years ago

Codecov Report

Merging #381 into master will decrease coverage by 16.74%. The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           master     #381       +/-   ##
===========================================
- Coverage   97.32%   80.58%   -16.75%     
===========================================
  Files          49       49               
  Lines        3142     3142               
  Branches      585      585               
===========================================
- Hits         3058     2532      -526     
- Misses         44      569      +525     
- Partials       40       41        +1     
Impacted Files Coverage Δ
eli5/sklearn/permutation_importance.py 93.68% <100.00%> (-6.32%) :arrow_down:
eli5/keras/gradcam.py 0.00% <0.00%> (-100.00%) :arrow_down:
eli5/xgboost.py 4.26% <0.00%> (-95.13%) :arrow_down:
eli5/formatters/image.py 5.47% <0.00%> (-94.53%) :arrow_down:
eli5/keras/explain_prediction.py 4.81% <0.00%> (-91.57%) :arrow_down:
eli5/lightgbm.py 4.27% <0.00%> (-90.60%) :arrow_down:
eli5/catboost.py 11.53% <0.00%> (-88.47%) :arrow_down:
eli5/_decision_path.py 35.48% <0.00%> (-64.52%) :arrow_down:
eli5/keras/__init__.py 50.00% <0.00%> (-50.00%) :arrow_down:
eli5/ipython.py 85.71% <0.00%> (-14.29%) :arrow_down:
... and 5 more
Matgrb commented 4 years ago

This PR is ready for review

codecov-io commented 4 years ago

Codecov Report

Merging #381 (fc22f65) into master (017c738) will decrease coverage by 16.74%. The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           master     #381       +/-   ##
===========================================
- Coverage   97.32%   80.58%   -16.75%     
===========================================
  Files          49       49               
  Lines        3142     3142               
  Branches      585      585               
===========================================
- Hits         3058     2532      -526     
- Misses         44      569      +525     
- Partials       40       41        +1     
Impacted Files Coverage Δ
eli5/sklearn/permutation_importance.py 93.68% <100.00%> (-6.32%) :arrow_down:
eli5/keras/gradcam.py 0.00% <0.00%> (-100.00%) :arrow_down:
eli5/xgboost.py 4.26% <0.00%> (-95.13%) :arrow_down:
eli5/formatters/image.py 5.47% <0.00%> (-94.53%) :arrow_down:
eli5/keras/explain_prediction.py 4.81% <0.00%> (-91.57%) :arrow_down:
eli5/lightgbm.py 4.27% <0.00%> (-90.60%) :arrow_down:
eli5/catboost.py 11.53% <0.00%> (-88.47%) :arrow_down:
eli5/_decision_path.py 35.48% <0.00%> (-64.52%) :arrow_down:
eli5/keras/__init__.py 50.00% <0.00%> (-50.00%) :arrow_down:
eli5/ipython.py 85.71% <0.00%> (-14.29%) :arrow_down:
... and 5 more
Matgrb commented 4 years ago

Hi @lopuhin , sorry for the delay. I have implemented the suggestions from your comment.

lopuhin commented 3 years ago

Thanks you! This were merged in eli5-org/eli5#2 and released to PyPI with v0.11