Class AlgoRULEGROWTH


  • public class AlgoRULEGROWTH
    extends java.lang.Object
    This is the original implementation of the RULEGROWTH algorithm for mining sequential rules common to several sequences where antecedent and consequent are unordered itemsets. The RuleGrowth algorithm is described in this paper:

    Fournier-Viger, P., Nkambou, R. & Tseng, V. S. (2011). RuleGrowth: Mining Sequential Rules Common to Several Sequences by Pattern-Growth. Proceedings of the 26th Symposium on Applied Computing (ACM SAC 2011). ACM Press, pp. 954-959.

    The main method of this algorithm is "runAlgorithm". It output the result to a file.
    Author:
    Philippe Fournier-Viger
    See Also:
    Occurence, Sequence, SequenceDatabase
    • Constructor Summary

      Constructors 
      Constructor Description
      AlgoRULEGROWTH()
      Default constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<java.util.Set<java.lang.Integer>> AntecedenceTraces()  
      java.util.List<java.util.Set<java.lang.Integer>> FittedTraces()  
      java.lang.String[] inputRules()  
      java.lang.String[] outputRules()  
      void printStats()
      Print statistics about the last algorithm execution to System.out.
      void runAlgorithm​(double minSupport, double minConfidence, SequenceDatabase sequencedatabase)
      The main method to run the algorithm
      void runAlgorithm​(SequenceDatabase ruleSequencesDatabase, int relativeMinsup, double minConfidence)
      The main method to run the algorithm
      void setMaxAntecedentSize​(int maxAntecedentSize)
      Set the number of items that a rule antecedent should contain (optional).
      void setMaxConsequentSize​(int maxConsequentSize)
      Set the number of items that a rule consequent should contain (optional).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AlgoRULEGROWTH

        public AlgoRULEGROWTH()
        Default constructor
    • Method Detail

      • runAlgorithm

        public void runAlgorithm​(double minSupport,
                                 double minConfidence,
                                 SequenceDatabase sequencedatabase)
                          throws java.io.IOException
        The main method to run the algorithm
        Parameters:
        minSupport - : the minimum support (percentage as a double value)
        minConfidence - : the minimum confidence threshold
        input - : an input file path of a sequence database
        output - : a file path for writing the output file containing the seq. rules.
        Throws:
        java.io.IOException - if error reading/writing files
      • runAlgorithm

        public void runAlgorithm​(SequenceDatabase ruleSequencesDatabase,
                                 int relativeMinsup,
                                 double minConfidence)
                          throws java.io.IOException
        The main method to run the algorithm
        Parameters:
        relativeMinsup - : the minimum support as an integer value (a relative minimum support)
        minConfidence - : the minimum confidence threshold
        input - : an input file path of a sequence database
        output - : a file path for writing the output file containing the seq. rules.
        Throws:
        java.io.IOException - if error reading/writing files
      • inputRules

        public java.lang.String[] inputRules()
      • outputRules

        public java.lang.String[] outputRules()
      • FittedTraces

        public java.util.List<java.util.Set<java.lang.Integer>> FittedTraces()
      • AntecedenceTraces

        public java.util.List<java.util.Set<java.lang.Integer>> AntecedenceTraces()
      • setMaxAntecedentSize

        public void setMaxAntecedentSize​(int maxAntecedentSize)
        Set the number of items that a rule antecedent should contain (optional).
        Parameters:
        maxAntecedentSize - the maximum number of items
      • setMaxConsequentSize

        public void setMaxConsequentSize​(int maxConsequentSize)
        Set the number of items that a rule consequent should contain (optional).
        Parameters:
        maxConsequentSize - the maximum number of items
      • printStats

        public void printStats()
        Print statistics about the last algorithm execution to System.out.