Danger You are looking at the documentation for an older version of the SDV! We are no longer supporting or maintaining this version of the software Click here to go to the new docs pages.
Danger
You are looking at the documentation for an older version of the SDV! We are no longer supporting or maintaining this version of the software
Click here to go to the new docs pages.
sdv.constraints.
ScalarRange
Ensure that the column_name is between the range of low and high.
column_name
low
high
The transformation strategy works by replacing the column_name with a scaled version and then applying a logit function. The reverse transform applies a sigmoid to the data and then scales it back to the original space.
column_name (str) – Name of the column that has to be between the lower bound and upper bound.
low_value (int or float) – Lower bound on the values of the column_name.
high_value (int or float) – Higher bound on the values of the column_name.
strict_boundaries (bool) – Whether the comparison of the values should be strict >= or not > when comparing them.
>=
>
__init__
Initialize self. See help(type(self)) for accurate signature.
Methods
__init__(column_name, low_value, high_value)
Initialize self.
filter_valid(table_data)
filter_valid
Get only the rows that are valid.
fit(table_data)
fit
Fit Constraint class to data.
Constraint
fit_transform(table_data)
fit_transform
Fit this Constraint to the data and then transform it.
from_dict(constraint_dict)
from_dict
Build a Constraint object from a dict.
is_valid(table_data)
is_valid
Say whether the column_name is between the low and high values.
reverse_transform(table_data)
reverse_transform
Handle logic around reverse transforming constraints.
to_dict()
to_dict
Return a dict representation of this Constraint.
transform(table_data)
transform
Perform necessary transformations needed by constraint.
Attributes
constraint_columns