Class ClassificationRule

java.lang.Object
adaa.analytics.rules.logic.representation.rule.Rule
adaa.analytics.rules.logic.representation.rule.ClassificationRule
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
ContrastRule

public class ClassificationRule extends Rule
Class representing a classification rule.
See Also:
  • Constructor Details

    • ClassificationRule

      public ClassificationRule()
      Creates empty classification rule.
    • ClassificationRule

      public ClassificationRule(CompoundCondition premise, ElementaryCondition consequence)
      Creates classification rule with a given premise and a consequence.
      Parameters:
      premise - Rule premise.
      consequence - Rule consequence.
  • Method Details

    • getClassLabel

      public String getClassLabel()
    • updateWeightAndPValue

      public void updateWeightAndPValue(IExampleSet trainSet, ContingencyTable ct, IQualityMeasure votingMeasure)
      Calculates Rule.weight and Rule.pvalue.
      Specified by:
      updateWeightAndPValue in class Rule
      Parameters:
      trainSet - Training set.
      ct - Contingency table.
      votingMeasure - Measure used as weight.
    • covers

      public Covering covers(IExampleSet set, Set<Integer> filterIds)
      Applies the rule on a part of a specified example set.
      Specified by:
      covers in class Rule
      Parameters:
      set - Example set.
      filterIds - Set of identifiers to be examined.
      Returns:
      Information about covering.
    • covers

      public Covering covers(IExampleSet set)
      Applies the rule on a specified example set.
      Specified by:
      covers in class Rule
      Parameters:
      set - Example set.
      Returns:
      Information about covering.
    • covers

      public void covers(IExampleSet set, ContingencyTable ct)
      Applies the rule on a specified example set.
      Overrides:
      covers in class Rule
      Parameters:
      set - Example set.
      ct - Output contingency table.
    • covers

      public void covers(IExampleSet set, ContingencyTable ct, Set<Integer> positives, Set<Integer> negatives)
      Applies the rule on a specified example set.
      Overrides:
      covers in class Rule
      Parameters:
      set - Example set.
      ct - Output contingency table.
      positives - Output collection of covered positive ids.
      negatives - Output collection of covered negative ids.