Add FixedCombinations
CAG pattern + add CAG base class to public
#2383
Labels
feature request
Request for a new feature
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
CAG Base Class
This CAG should inherit from the CAG base class which can be brought over from enterprise (excluding the
fix_dayz_data
method). We should also add theis_valid
method to the CAG base class:is_valid(self, data)
self._is_valid(data)
method, which should be defined in the base class to raise aNotImplemented
errorAdd the
FixedCombinations
CAG pattern.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_names (list[str])
: Same as FixedCombinations.table_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 metadata.column_names
have either the boolean or categorical sdtypecolumn_names
are part of a column relationship._validate_pattern_with_data
_get_updated_metadata
#
, as in the constraint)column_names
from the metadata._fit
_is_valid
_transform
_reverse_transform
Additional context
The text was updated successfully, but these errors were encountered: