Class AlgoCMDeogun


  • public class AlgoCMDeogun
    extends java.lang.Object
    This is the original implementation of the CMDeo algorithm for mining sequential rules common to several sequences. It is an algorithm adapted from the algorithm of Deogun et al. so that it works for the case of multiple sequences instead of a single sequence

    This modified algorithm is described briefly in this paper

    Fournier-Viger, P., Faghihi, U., Nkambou, R., Mephu Nguifo, E. (2012). CMRules: Mining Sequential Rules Common to Several Sequences. Knowledge-based Systems, Elsevier, 25(1): 63-76.

    and a french description is provided in my Ph.D. thesis:

    Fournier-Viger, P. (2010), Un modèle hybride pour le support à l'apprentissage dans les domaines procéduraux et mal-définis. Ph.D. Thesis, University of Quebec in Montreal, Montreal, Canada, 184 pages. This implementation was modified by Ryan Panos to include the lift measure.
    Author:
    Philippe Fournier-Viger, Ryan Panos
    See Also:
    Itemset, Rule, Rules
    • Constructor Summary

      Constructors 
      Constructor Description
      AlgoCMDeogun()
      Default constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void printStats()
      Print statistics about the latest algorithm execution.
      void runAlgorithm​(java.lang.String input, java.lang.String output, double absoluteMinSupport, double minConfidence)
      Run the algorithm with an absolute minimum support (double).
      void runAlgorithm​(java.lang.String input, java.lang.String output, int relativeSupport, double minConfidence)
      Run the algorithm with a relative minimum support (integer)
      void setMaxLeftSize​(int maxLeftSize)
      Set the maximum antecedent size constraint for rules to be found.
      void setMaxRightSize​(int maxRightSize)
      Set the maximum consequent size constraint for rules to be found.
      void setMinLeftSize​(int minLeftSize)
      Set the minimum antecedent size constraint for rules to be found.
      void setMinRightSize​(int minRightSize)
      Set the minimum consequent size constraint for rules to be found.
      • Methods inherited from class java.lang.Object

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

      • timeEndPreprocessing

        public long timeEndPreprocessing
      • transactionCount

        protected int transactionCount
    • Constructor Detail

      • AlgoCMDeogun

        public AlgoCMDeogun()
        Default constructor.
    • Method Detail

      • runAlgorithm

        public void runAlgorithm​(java.lang.String input,
                                 java.lang.String output,
                                 double absoluteMinSupport,
                                 double minConfidence)
                          throws java.io.IOException
        Run the algorithm with an absolute minimum support (double).
        Parameters:
        input - input file containing a sequence database.
        output - the file path for writing the result
        absoluteMinSupport - the minsup is a percentage value (ex.: 0.05 = 5 % of all sequences in the database)
        minConfidence - the minimum confidence threshold
        Throws:
        java.io.IOException - exception if error while writing the output file.
      • runAlgorithm

        public void runAlgorithm​(java.lang.String input,
                                 java.lang.String output,
                                 int relativeSupport,
                                 double minConfidence)
                          throws java.io.IOException
        Run the algorithm with a relative minimum support (integer)
        Parameters:
        input - input file containing a sequence database.
        output - the file path for writing the result
        relativeSupport - the minsup is a number of sequences (ex.: 5 = 5 sequences of the database)
        minConfidence - the minimum confidence threshold
        Throws:
        java.io.IOException - exception if error while writing the output file.
      • printStats

        public void printStats()
        Print statistics about the latest algorithm execution.
      • setMinLeftSize

        public void setMinLeftSize​(int minLeftSize)
        Set the minimum antecedent size constraint for rules to be found.
        Parameters:
        minLeftSize - an integer
      • setMaxLeftSize

        public void setMaxLeftSize​(int maxLeftSize)
        Set the maximum antecedent size constraint for rules to be found.
        Parameters:
        maxLeftSize - an integer
      • setMinRightSize

        public void setMinRightSize​(int minRightSize)
        Set the minimum consequent size constraint for rules to be found.
        Parameters:
        minRightSize - an integer
      • setMaxRightSize

        public void setMaxRightSize​(int maxRightSize)
        Set the maximum consequent size constraint for rules to be found.
        Parameters:
        maxRightSize - an integer