check_if_reduct#
- skrough.checks.check_if_reduct(x: ndarray, x_counts: ndarray, y: ndarray, y_count: int, attrs: Union[Sequence[int], ndarray[Any, dtype[int64]]], consistent_table_check: bool = True) bool[source]#
Check if specified attributes form a reduct.
Functions checks if the given subset of attributes
attrsforms a decision reduct for the given input dataxand the decisionsy. An additional verification of data-decisions consistency can be enforced before the actual decision reduct check. If theconsistent_table_checkflag equals toTruethen the input data-decisions consistency is a necessary condition forattrsbeing checked to be a reduct.- Parameters:
x – Input data table.
y – Input decisions.
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.consistent_table_check – Whether decision table consistency check should be performed prior to other checks. Defaults to True.
- Returns:
Indication whether the specified attributes form a reduct.