interpretml / DiCE

Generate Diverse Counterfactual Explanations for any machine learning model.
https://interpretml.github.io/DiCE/
MIT License
1.37k stars 188 forks source link

Ensure same type for CF output as the input features #412

Closed amit-sharma closed 1 year ago

amit-sharma commented 1 year ago

Explainer methods perform different operations that may result in a different type for the output features in a CF (some of these are required).

To ensure consistency, this PR adds a type consistency operation before returning the CFs.

github-actions[bot] commented 1 year ago

Unit Test Results

302 tests  +6   292 :heavy_check_mark: +6   7m 57s :stopwatch: + 2m 31s     1 suites ±0     10 :zzz: ±0      1 files   ±0       0 :x: ±0 

Results for commit 1a1b89c9. ± Comparison against base commit 8cd02e89.

:recycle: This comment has been updated with latest results.

codecov-commenter commented 1 year ago

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Files Coverage Δ
dice_ml/data_interfaces/private_data_interface.py 51.89% <100.00%> (+0.55%) :arrow_up:
dice_ml/data_interfaces/public_data_interface.py 89.45% <100.00%> (+1.66%) :arrow_up:
dice_ml/explainer_interfaces/explainer_base.py 84.85% <100.00%> (+0.67%) :arrow_up:
dice_ml/data_interfaces/base_data_interface.py 85.71% <64.70%> (-7.77%) :arrow_down:

:loudspeaker: Thoughts on this report? Let us know!.