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

Null values in GreaterThan constraint raises error #589

Closed
amontanez24 opened this issue Sep 16, 2021 · 0 comments · Fixed by #600
Closed

Null values in GreaterThan constraint raises error #589

amontanez24 opened this issue Sep 16, 2021 · 0 comments · Fixed by #600
Assignees
Labels
bug Something isn't working feature:constraints Related to inputting rules or business logic
Milestone

Comments

@amontanez24
Copy link
Contributor

Environment Details

Please indicate the following details about the environment in which you found the bug:

  • SDV version: Any
  • Python version: Any
  • Operating System: Any

Error Description

If you create a GreaterThan constraint with columns that have null values, a ConstraintsNotMetError is raised.

Steps to reproduce

You can use the student_placements demo dataset to recreate this error.

student_placements = load_tabular_demo('student_placements')
gt_constraint = GreaterThan(
    low='start_date',
    high='end_date',
    handling_strategy='reject_sampling'
)
gc = GaussianCopula(constraints=[gt_constraint])
gc.fit(student_placements)

Running the same code above after dropping all rows in student_placements where start_date is NaN causes the error to go away.

@amontanez24 amontanez24 added bug Something isn't working pending review labels Sep 16, 2021
@kveerama kveerama added the feature:constraints Related to inputting rules or business logic label Sep 19, 2021
@katxiao katxiao added this to the 0.12.1 milestone Oct 7, 2021
@katxiao katxiao self-assigned this Oct 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working feature:constraints Related to inputting rules or business logic
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants