Skip to content

Commit

Permalink
Fix: Remove dominating rules from the final ruleset.
Browse files Browse the repository at this point in the history
  • Loading branch information
Adversarian committed Jul 16, 2023
1 parent e2ef171 commit 72f60e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions RACER/RACER.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,9 +367,9 @@ def _finalize_rules(self) -> None:
temp_rules_if = self._final_rules_if
temp_rules_then = self._final_rules_then
temp_rules_fitnesses = self._fitnesses
for i in range(len(temp_rules_if) - 1):
for i in range(len(temp_rules_if) - 2):
mask = np.ones(len(temp_rules_if), dtype=bool)
covered = self._covered(temp_rules_if[i], temp_rules_if[i + 1 :])
covered = self._covered(temp_rules_if[i + 1 :], temp_rules_if[i])
mask[i+1:][covered] = False
temp_rules_if, temp_rules_then, temp_rules_fitnesses = (
temp_rules_if[mask], temp_rules_then[mask], temp_rules_fitnesses[mask]
Expand Down

0 comments on commit 72f60e2

Please sign in to comment.