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
As we've built up our multi-table CAG patterns, we'd like to convert our each of our existing single table constraints to use the new CAG framework.
Expected behavior
Add the OneHotEncoding CAG pattern. This CAG should inherit from the base CAG class. This CAG should copy the functionality of the existing constraint, much of _fit, _transform, and _reverse_transform should be able to be directly copied without significant logical rewrites.
Args column_name (str or list[str]): Same as the constraint table_name (str, optional): The name of the table to apply the CAG pattern to.
Expected Functionality
_validate_pattern_with_metadata
If no table_name is provided, the metadata must only contain a single table (this should be considered the target table)
Validate that the columns in column_names exist in the table in the metadata.
_validate_pattern_with_data
Validate that the data matches a one hot encoding scheme.
Problem Description
As we've built up our multi-table CAG patterns, we'd like to convert our each of our existing single table constraints to use the new CAG framework.
Expected behavior
Add the
OneHotEncoding
CAG pattern. This CAG should inherit from the base CAG class. This CAG should copy the functionality of the existing constraint, much of_fit
,_transform
, and_reverse_transform
should be able to be directly copied without significant logical rewrites.Args
column_name (str or list[str])
: Same as the constrainttable_name (str, optional)
: The name of the table to apply the CAG pattern to.Expected Functionality
_validate_pattern_with_metadata
table_name
is provided, the metadata must only contain a single table (this should be considered the target table)column_names
exist in the table in the metadata._validate_pattern_with_data
_get_updated_metadata
_fit
_is_valid
_transform
_reverse_transform
Additional context
The text was updated successfully, but these errors were encountered: