check_if_functional_dependency#
- skrough.checks.check_if_functional_dependency(x: ndarray, y: ndarray, objs: Optional[Union[Sequence[int], ndarray[Any, dtype[int64]]]] = None, attrs: Optional[Union[Sequence[int], ndarray[Any, dtype[int64]]]] = None) bool[source]#
Check functional dependency between conditional attributes and the decision.
Check functional dependency between conditional attributes and the decision. The check is based on the number of duplicated rows induced by the given subset of attributes either with or without the decision attribute. If the number of duplicated rows is the same, the functional dependency holds. The check can be further narrowed to the given subset of attributes and objects.
- Parameters:
x – Input data table.
y – Input decisions.
objs – A subset of objects that the check should be performed on. It should be given in a form of a sequence of integer-location based indexing of the selected objects/rows/instances from
x.Nonevalue means to use all available objects. Defaults toNone.attrs – A subset of conditional attributes the check should be performed on. It should be given in a form of a sequence of integer-location based indexing of the selected conditional attributes from
x.Nonevalue means to use all available conditional attributes. Defaults toNone.
- Returns:
Indication whether functional dependency holds for the given input.