Skip to content

Update TargetLeakageDataCheck to use Woodwork's dependence_dict#3728

Merged
bchen1116 merged 25 commits into
mainfrom
bc_targetleakage
Oct 3, 2022
Merged

Update TargetLeakageDataCheck to use Woodwork's dependence_dict#3728
bchen1116 merged 25 commits into
mainfrom
bc_targetleakage

Conversation

@bchen1116

Copy link
Copy Markdown
Contributor

Update data checks

@bchen1116 bchen1116 self-assigned this Sep 21, 2022
@codecov

codecov Bot commented Sep 21, 2022

Copy link
Copy Markdown

Codecov Report

Merging #3728 (91e4a31) into main (c0a81c3) will increase coverage by 0.1%.
The diff coverage is 100.0%.

@@           Coverage Diff           @@
##            main   #3728     +/-   ##
=======================================
+ Coverage   99.7%   99.7%   +0.1%     
=======================================
  Files        339     339             
  Lines      34786   34810     +24     
=======================================
+ Hits       34655   34679     +24     
  Misses       131     131             
Impacted Files Coverage Δ
evalml/data_checks/target_leakage_data_check.py 100.0% <100.0%> (ø)
...ata_checks_tests/test_target_leakage_data_check.py 100.0% <100.0%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

pct_corr_threshold (float): The correlation threshold to be considered leakage. Defaults to 0.95.
method (string): The method to determine correlation. Use 'mutual' for mutual information, otherwise 'pearson' for Pearson correlation. Defaults to 'mutual'.
method (string): The method to determine correlation. Use 'max' for the maximum correlation, or for specific correlation metrics, use their name (ie 'mutual_info' for mutual information, 'pearson' for Pearson correlation, etc).
Defaults to 'mutual_info'.

@bchen1116 bchen1116 Sep 28, 2022

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Default to mutual_info for now as we fix a bug in WW. Will change to max once the bug is fixed and new release is out

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we consider this a breaking change, since mutual is no longer accepted as an input to this Data Check?

@bchen1116 bchen1116 changed the title [DRAFT] Update TargetLeakageDataCheck to use Woodwork's dependence_dict Update TargetLeakageDataCheck to use Woodwork's dependence_dict Sep 28, 2022
Pearson correlation returns a value in [-1, 1], while mutual information returns a value in [0, 1].
If `method='mutual_info'`, this data check uses mutual information and supports all target and feature types.
Other correlation metrics only support binary with numeric and boolean dtypes, and return a value in [-1, 1], while mutual information returns a value in [0, 1].
Correlation metrics available can be found in Woodwork's `dependence_dict method <https://woodwork.alteryx.com/en/stable/generated/woodwork.table_accessor.WoodworkTableAccessor.dependence_dict.html#woodwork.table_accessor.WoodworkTableAccessor.dependence_dict>`_.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Docs look good
image

@bchen1116 bchen1116 marked this pull request as ready for review September 28, 2022 21:23

@ParthivNaresh ParthivNaresh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Awesome work! Just left a few comments

pct_corr_threshold (float): The correlation threshold to be considered leakage. Defaults to 0.95.
method (string): The method to determine correlation. Use 'mutual' for mutual information, otherwise 'pearson' for Pearson correlation. Defaults to 'mutual'.
method (string): The method to determine correlation. Use 'max' for the maximum correlation, or for specific correlation metrics, use their name (ie 'mutual_info' for mutual information, 'pearson' for Pearson correlation, etc).
Defaults to 'mutual_info'.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we consider this a breaking change, since mutual is no longer accepted as an input to this Data Check?

Comment thread evalml/data_checks/target_leakage_data_check.py Outdated
Comment thread evalml/data_checks/target_leakage_data_check.py
Comment thread evalml/tests/data_checks_tests/test_target_leakage_data_check.py Outdated

@ParthivNaresh ParthivNaresh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great work!

@jeremyliweishih jeremyliweishih left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM - just some docstring and error raising nits

Comment thread evalml/data_checks/target_leakage_data_check.py Outdated
Comment thread evalml/data_checks/target_leakage_data_check.py
Comment thread evalml/data_checks/target_leakage_data_check.py Outdated
Comment thread evalml/data_checks/target_leakage_data_check.py
@bchen1116 bchen1116 merged commit 03a6782 into main Oct 3, 2022
@bchen1116 bchen1116 deleted the bc_targetleakage branch October 3, 2022 17:05
@ivanayx ivanayx mentioned this pull request Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants