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

Add Between values constraint #367

Closed
pvk-developer opened this issue Mar 26, 2021 · 2 comments · Fixed by #493
Closed

Add Between values constraint #367

pvk-developer opened this issue Mar 26, 2021 · 2 comments · Fixed by #493
Assignees
Labels
feature request Request for a new feature
Milestone

Comments

@pvk-developer
Copy link
Member

pvk-developer commented Mar 26, 2021

Problem Description

Currently there is only a GreaterThan constraint, but we can't specify Between specific values, such as scalar values (i.e: a range of 0 to 10). The current GreaterThan works only with columns

Expected behavior

If we use the employees demo dataset as example, let's say that our company has been up for 5 years only, so our employees can only be from 0 to 5 years max:

from sdv.demo import load_tabular_demo

employees = load_tabular_demo()
from sdv.constraints import Between

years_between_constraint = Between(
    low=0,
    high=5,
    column='years_in_the_company'
)

constraints = years_between_constraint

from sdv.tabular import GaussianCopula
gc = GaussianCopula(constraints=constraints)

gc.fit(employees)
...
@pvk-developer pvk-developer added feature request Request for a new feature pending review labels Mar 26, 2021
@sync-by-unito sync-by-unito bot changed the title Between values constraint SDV - #367 Between values constraint Apr 13, 2021
@sync-by-unito sync-by-unito bot changed the title SDV - #367 Between values constraint Between values constraint Apr 13, 2021
@npatki
Copy link
Contributor

npatki commented Apr 21, 2021

I referenced another issue where we're discussing base cases we'll need to build this functionality (and others).

We'll probably want to consider both the open interval (> and <) and closed interval (>= and =<) as separate cases. Not to mention combinations of that. Ideally, we can prioritize the functionality based on usage.

@csala
Copy link
Contributor

csala commented Jul 7, 2021

Closed in #493

@csala csala closed this as completed Jul 7, 2021
@csala csala added this to the 0.11.0 milestone Jul 7, 2021
@npatki npatki changed the title Between values constraint Add Between values constraint Jul 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Request for a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants