You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a GreaterThan constraint is provided transform as the handling_strategy, it will fail if the high column is not a float. This is because the HyperTransformer reverse transforms the columns before the constraint's reverse transformation takes place. If the high column was initially an int or datetime, it gets transformed by the HyperTransformer. The constraint then has a value in the wrong form when attempting to apply its reverse transformation.
Steps to reproduce
from sdv.demo import load_tabular_demo
from sdv.constraints import UniqueCombinations
from sdv.tabular import GaussianCopula
from sdv.constraints import GreaterThan
employees = load_tabular_demo()
age_gt_age_when_joined_constraint = GreaterThan(
low='age_when_joined',
high='age',
handling_strategy='transform'
)
constraints = [
age_gt_age_when_joined_constraint
]
gc = GaussianCopula(constraints=constraints)
gc.fit(employees)
sampled = gc.sample(10, conditions={'age': 40})
The text was updated successfully, but these errors were encountered:
Environment Details
Please indicate the following details about the environment in which you found the bug:
Error Description
Related to #421
When a
GreaterThan
constraint is providedtransform
as thehandling_strategy
, it will fail if thehigh
column is not a float. This is because theHyperTransformer
reverse transforms the columns before the constraint's reverse transformation takes place. If the high column was initially an int or datetime, it gets transformed by theHyperTransformer
. The constraint then has a value in the wrong form when attempting to apply its reverse transformation.Steps to reproduce
The text was updated successfully, but these errors were encountered: