Exemplo n.º 1
0
 /**
  * It filters the instances covered by a set of rule from this dataset; i.e., it deactivates the
  * instances not covered by that ruleset.
  *
  * @param mask Mask the mask with the active entries of the dataset
  * @param rules Ruleset the ruleset
  */
 public void filter(Mask mask, Ruleset rules) {
   Mask previous = new Mask(this.itemsets.size(), false);
   for (int i = 0; i < rules.size(); i++) {
     Mask current = mask.copy();
     filter(current, rules.getRule(i));
     previous = previous.or(current);
   }
   previous.copyTo(mask);
 }
Exemplo n.º 2
0
 /**
  * It substracts the instances covered by a set of rules from this dataset; i.e., it deactivates
  * the instances covered by that ruleset. This method allows to ignore a rule of the set.
  *
  * @param mask Mask the mask with the active entries of the dataset
  * @param rules Ruleset the set of rules
  * @param ignore int number of the rule to ignore
  */
 public void substract(Mask mask, Ruleset rules, int ignore) {
   for (int i = 0; i < rules.size(); i++) {
     if (i != ignore) substract(mask, rules.getRule(i));
   }
 }
Exemplo n.º 3
0
 /**
  * It substracts the instances covered by a set of rule from this dataset; i.e., it deactivates
  * the instances covered by that ruleset.
  *
  * @param mask Mask the mask with the active entries of the dataset
  * @param rules Ruleset the set of rules
  */
 public void substract(Mask mask, Ruleset rules) {
   for (int i = 0; i < rules.size(); i++) {
     substract(mask, rules.getRule(i));
   }
 }