Documentation of 'ca.pfv.spmf.algorithms.associationrules.Indirect.AlgoINDIRECT' Java class
AlgoINDIRECT
ca.pfv.spmf.algorithms.associationrules.Indirect

Class AlgoINDIRECT



  • public class AlgoINDIRECT
    extends java.lang.Object
    This is an implementation of the INDIRECT algorithm for generating indirect association rules.

    The implementation is based on the description in the book: Tan, Steinbach & Kumar (2006) "Introduction to data mining", chapter 7, p. 469, Algorithm 7.2. and the KDD 2000 paper by Tan et al.

    However, note that the algorithm is not exactly the same as what the authors did, because there is not enough details in the original paper and in the book. To implement the algorithm, I therefore had to make some choices based on what I tought what the best or easiest way to do it.

    Also, note that instead of using the IS measure to compute the dependancy between itemsets, I chose to use the confidence. The confidence is easier to calculate.

    Also, note that there is some faster algorithm that exists for generating indirect association rules that have been proposed after INDIRECT (but not implemented in SPMF).

    Lastly, note that in my implementation I use an AprioriTID like procedure for generating frequent itemsets that are needed to generate indirect rules. However I do not save the frequent itemsets to file because we don't need to keep them (we just want to generate the indirect rules).

    If you find some errors or have some ideas for optimization, please let me know by contacting me on my website.

    One possible optimization that I could do in the future would be to use BitSet instead of HashSet to represent the tids sets.

    • Constructor Summary

      Constructors 
      Constructor and Description
      AlgoINDIRECT()
      Default constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void printStats()
      Print statistics about the last algorithm execution to System.out.
      void runAlgorithm(java.lang.String input, java.lang.String output, double minsup, double ts, double minconf)
      Run the algorithm.
      • Methods inherited from class java.lang.Object

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

      • AlgoINDIRECT

        public AlgoINDIRECT()
        Default constructor
    • Method Detail

      • runAlgorithm

        public void runAlgorithm(java.lang.String input,
                                 java.lang.String output,
                                 double minsup,
                                 double ts,
                                 double minconf)
                          throws java.lang.NumberFormatException,
                                 java.io.IOException
        Run the algorithm.
        Parameters:
        input - the input file path
        output - the output file path
        minsup - the minimum support threshold
        ts - the ts threshold
        minconf - the minconf threshold
        Throws:
        java.io.IOException - exception if there is an error while writing the output file.
        java.lang.NumberFormatException
      • printStats

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

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.