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 attrs forms a decision reduct for the given input data x and the decisions y. An additional verification of data-decisions consistency can be enforced before the actual decision reduct check. If the consistent_table_check flag equals to True then the input data-decisions consistency is a necessary condition for attrs being 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.