Class ApproximateClassificationFinder

All Implemented Interfaces:
AutoCloseable

public class ApproximateClassificationFinder extends ClassificationFinder
  • Field Details

    • MASK_IDENTIFIER

      protected static final long MASK_IDENTIFIER
      See Also:
    • MASK_BIN

      protected static final long MASK_BIN
      See Also:
    • OFFSET_BIN

      protected static final long OFFSET_BIN
      See Also:
    • FLAG_POSITIVE

      protected static final long FLAG_POSITIVE
      See Also:
    • FLAG_NEW

      protected static final long FLAG_NEW
      See Also:
    • FLAG_COVERED

      protected static final long FLAG_COVERED
      See Also:
    • descriptions

      protected long[][] descriptions
    • mappings

      protected int[][] mappings
    • bins_positives

      protected int[][] bins_positives
    • bins_negatives

      protected int[][] bins_negatives
    • bins_newPositives

      protected int[][] bins_newPositives
    • bins_begins

      protected int[][] bins_begins
    • ruleRanges

      protected int[][] ruleRanges
    • trainSet

      protected IExampleSet trainSet
  • Constructor Details

    • ApproximateClassificationFinder

      public ApproximateClassificationFinder(InductionParameters params)
      Initializes induction parameters.
      Parameters:
      params - Induction parameters.
  • Method Details

    • preprocess

      public void preprocess(IExampleSet dataset)
      Description copied from class: ClassificationFinder
      If example set is unweighted, method precalculates conditions coverings and stores them as bit vectors in @see precalculatedCoverings field.
      Overrides:
      preprocess in class ClassificationFinder
      Parameters:
      dataset - Training set.
    • prune

      public void prune(Rule rule, IExampleSet dataset, Set<Integer> uncovered)
      Removes irrelevant conditions from the rule using hill-climbing strategy.
      Overrides:
      prune in class ClassificationFinder
      Parameters:
      rule - Rule to be pruned.
      dataset - Training set.
      uncovered - Collection of examples yet uncovered by the model (positive examples in the classification problems).
    • postprocess

      public void postprocess(Rule rule, IExampleSet dataset)
      Postprocesses a rule.
      Overrides:
      postprocess in class ClassificationFinder
      Parameters:
      rule - Rule to be postprocessed.
      dataset - Training set.
    • induceCondition

      protected ElementaryCondition induceCondition(Rule rule, IExampleSet dataset, Set<Integer> uncoveredPositives, Set<Integer> coveredByRule, Set<IAttribute> allowedAttributes, Pair<String,Object>... extraParams)
      Induces an elementary condition.
      Overrides:
      induceCondition in class ClassificationFinder
      Parameters:
      rule - Current rule.
      dataset - Training set.
      uncoveredPositives - Set of positive examples uncovered by the model.
      coveredByRule - Set of examples covered by the rule being grown.
      allowedAttributes - Set of attributes that may be used during induction.
      extraParams - Additional parameters.
      Returns:
      Induced elementary condition.
    • notifyConditionAdded

      protected void notifyConditionAdded(ConditionBase cnd)
      Overrides:
      notifyConditionAdded in class AbstractFinder
    • determineBins

      protected void determineBins(IExampleSet dataset, IAttribute attr, long[] descriptions, int[] mappings, int[] binsBegins, int[] ruleRanges)
    • excludeExamplesFromArrays

      protected void excludeExamplesFromArrays(IExampleSet dataset, IAttribute attr, int binLo, int binHi)
    • resetArrays

      protected void resetArrays(IExampleSet dataset, int targetLabel)
    • printArrays

      protected void printArrays()
    • updateMidpoint

      protected void updateMidpoint(IExampleSet dataset, adaa.analytics.rules.logic.induction.ApproximateClassificationFinder.ConditionCandidate candidate)