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

Fix inconsistent test outcomes in LogTransformDataCheck tests #2597

Closed
ParthivNaresh opened this issue Aug 5, 2021 · 2 comments
Closed

Fix inconsistent test outcomes in LogTransformDataCheck tests #2597

ParthivNaresh opened this issue Aug 5, 2021 · 2 comments
Assignees

Comments

@ParthivNaresh
Copy link
Contributor

Some of the tests for LogTransformDataCheck don't create the sample data consistently as expected.

test_target_distribution_data_check_unsupported_target_type ends up creating a lognormal target set (due to a low random sample count) instead of a normal one for parameters integer and double. Here is an example error, as well as here:

(test_target_distribution_data_check_unsupported_target_type[double])
{'actions': [{'code': 'TRANSFORM_TARGET',
              'metadata': {'column': None,
                           'is_target': True,
                           'transformation_strategy': 'lognormal'}}],
 'errors': [],
 'warnings': [{'code': 'TARGET_LOGNORMAL_DISTRIBUTION',
               'data_check_name': 'TargetDistributionDataCheck',
               'details': {'shapiro-statistic/pvalue': '0.972/0.035'},
               'level': 'warning',
               'message': 'Target may have a lognormal distribution.'}]} != {'actions': [], 'errors': [], 'warnings': []}

test_target_distribution_data_check_warning_action runs into an issue with rounding of the Shapiro statistic:

(test_target_distribution_data_check_warning_action[very_lognormal-positive])
{'actions': [{'code': 'TRANSFORM_TARGET',
              'metadata': {'column': None,
                           'is_target': True,
                           'transformation_strategy': 'lognormal'}}],
 'errors': [],
 'warnings': [{'code': 'TARGET_LOGNORMAL_DISTRIBUTION',
               'data_check_name': 'TargetDistributionDataCheck',
               'details': {'shapiro-statistic/pvalue': '0.793/0.0'},
               'level': 'warning',
               'message': 'Target may have a lognormal distribution.'}]} != {'actions': [{'code': 'TRANSFORM_TARGET',
              'metadata': {'column': None,
                           'is_target': True,
                           'transformation_strategy': 'lognormal'}}],
 'errors': [],
 'warnings': [{'code': 'TARGET_LOGNORMAL_DISTRIBUTION',
               'data_check_name': 'TargetDistributionDataCheck',
               'details': {'shapiro-statistic/pvalue': '0.794/0.0'},
               'level': 'warning',
               'message': 'Target may have a lognormal distribution.'}]}
@ParthivNaresh ParthivNaresh self-assigned this Aug 5, 2021
@freddyaboulton
Copy link
Contributor

@ParthivNaresh Is this a dup of #2581 ?

@ParthivNaresh
Copy link
Contributor Author

Yep closing this

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

No branches or pull requests

2 participants