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

Update TargetLeakageDataCheck to use Woodwork's dependence_dict #3728

Merged
merged 25 commits into from
Oct 3, 2022

Conversation

bchen1116
Copy link
Contributor

Update data checks

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

codecov bot commented Sep 21, 2022

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.


Args:
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
Contributor Author

@bchen1116 bchen1116 Sep 28, 2022

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
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
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
Copy link
Contributor

@ParthivNaresh ParthivNaresh left a comment

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


Args:
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
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?

evalml/data_checks/target_leakage_data_check.py Outdated Show resolved Hide resolved
Copy link
Contributor

@ParthivNaresh ParthivNaresh left a comment

Choose a reason for hiding this comment

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

Great work!

Copy link
Collaborator

@jeremyliweishih jeremyliweishih left a comment

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

evalml/data_checks/target_leakage_data_check.py Outdated Show resolved Hide resolved
evalml/data_checks/target_leakage_data_check.py Outdated Show resolved Hide resolved
@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