Class RegressionRule

java.lang.Object
adaa.analytics.rules.logic.representation.rule.Rule
adaa.analytics.rules.logic.representation.rule.RegressionRule
All Implemented Interfaces:
Serializable, Cloneable

public class RegressionRule extends Rule
Class representing regression rule.
See Also:
  • Constructor Details

    • RegressionRule

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

    • setUseMean

      public static void setUseMean(boolean v)
    • getUseMean

      public static boolean getUseMean()
    • getConsequenceValue

      public double getConsequenceValue()
      Gets value in the consequence.
    • setConsequenceValue

      public void setConsequenceValue(double v)
      Gets value in the consequence.
    • 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.
    • setCoveringInformation

      public void setCoveringInformation(Covering cov)
      Sets p,n,P,N as well as consequence value and standard deviation on the basis of covering information.
      Overrides:
      setCoveringInformation in class Rule
      Parameters:
      cov - Covering information.
    • covers

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

      public Covering covers(IExampleSet set)
      Applies the regression 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, Set<Integer> positives, Set<Integer> negatives)
      Description copied from class: Rule
      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.
    • toString

      public String toString()
      Generates a text representation of the rule.
      Overrides:
      toString in class Rule
      Returns:
      Text representation.