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

public class SurvivalRule extends Rule
Class representing a survival rule.
See Also:
  • Field Details

    • SURVIVAL_TIME_ROLE

      public static final String SURVIVAL_TIME_ROLE
      Name of the attribute role representing survival time.
      See Also:
    • estimator

      protected KaplanMeierEstimator estimator
      Kaplan-Meier estimator in a rule consequence.
  • Constructor Details

    • SurvivalRule

      public SurvivalRule(CompoundCondition premise, ElementaryCondition consequence)
      Creates a survival rule with a given premise (consequence is ignored).
      Parameters:
      premise - Rule premise.
      consequence - Ignored.
    • SurvivalRule

      public SurvivalRule(Rule r, KaplanMeierEstimator estimator)
      Creates a survival rule from rule with empty consequence and survival function estimate.
      Parameters:
      r - Reference rule.
      estimator - Survival function estimate.
  • Method Details

    • getEstimator

      public KaplanMeierEstimator getEstimator()
      Gets estimator.
    • setEstimator

      public void setEstimator(KaplanMeierEstimator v)
      Sets estimator.
    • 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> ids)
      Applies the rule on a part of a specified example set.
      Specified by:
      covers in class Rule
      Parameters:
      set - Example set.
      ids - Set of identifiers to be examined.
      Returns:
      Information about covering.
    • covers

      public void covers(IExampleSet set, @NotNull ContingencyTable ct)
      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.
    • covers

      public void covers(IExampleSet set, @NotNull ContingencyTable ct, @NotNull Set<Integer> positives, @NotNull 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.
    • 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.
    • toString

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