Overview | Package | Class | Tree | Deprecated | Index | Help | Weka's home
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## weka.associations
Class PredictiveApriori

    java.lang.Object
      weka.associations.Associator
          weka.associations.PredictiveApriori

All Implemented Interfaces:
  java.io.Serializable, java.lang.Cloneable, OptionHandler

    public class PredictiveApriori

extends Associator
implements OptionHandler

Class implementing the predictive apriori algorithm to mine association rules. It searches with an increasing support threshold for the best n<\i> rules concerning a support-based corrected confidence value. Reference: T. Scheffer (2001). Finding Association Rules That Trade Support Optimally against Confidence. Proc of the 5th European Conf. on Principles and Practice of Knowledge Discovery in Databases (PKDD'01), pp. 424-435. Freiburg, Germany: Springer-Verlag.

The implementation follows the paper expect for adding a rule to the output of the n<\i> best rules. A rule is added if: the expected predictive accuracy of this rule is among the n<\i> best and it is not subsumed by a rule with at least the same expected predictive accuracy (out of an unpublished manuscript from T. Scheffer). Valid option is:

-N required number of rules
The required number of rules (default: 100).

Version:
  $Revision: 1.3.2.1 $
Author:
  Stefan Mutter (mutter@cs.waikato.ac.nz)
See Also:
  Serialized Form

Constructor Summary
`PredictiveApriori()` Constructor that allows to sets default values for the minimum confidence and the maximum number of rules the minimum confidence.

Method Summary
`void` | `buildAssociations(Instances instances)` Method that generates all large itemsets with a minimum support, and from these all association rules.
`int` | `getNumRules()` Get the value of the number of required rules.
`java.lang.String[]` | `getOptions()` Gets the current settings of the PredictiveApriori object.
`java.lang.String` | `globalInfo()` Returns a string describing this associator
`java.util.Enumeration` | `listOptions()` Returns an enumeration describing the available options.
`static void` | `main(java.lang.String[] options)` Main method for testing this class.
`java.lang.String` | `numRulesTipText()` Returns the tip text for this property
`void` | `resetOptions()` Resets the options to the default values.
`void` | `setNumRules(int v)` Set the value of required rules.
`void` | `setOptions(java.lang.String[] options)` Parses a given list of options.
`java.lang.String` | `toString()` Outputs the association rules.

Methods inherited from class weka.associations.Associator
`forName, makeCopies`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### PredictiveApriori

    public PredictiveApriori()

  Constructor that allows to sets default values for the minimum confidence and the maximum number of rules the minimum confidence.

Method Detail

### globalInfo

    public java.lang.String globalInfo()

  Returns a string describing this associator

  Returns:
    a description of the evaluator suitable for displaying in the explorer/experimenter gui

### resetOptions

    public void resetOptions()

  Resets the options to the default values.

### buildAssociations

    public void buildAssociations(Instances instances)
                           throws java.lang.Exception

  Method that generates all large itemsets with a minimum support, and from these all association rules.

  Specified by:
    `buildAssociations` in class `Associator`
  Parameters:
    `instances` - the instances to be used for generating the associations
  Throws:
    `java.lang.Exception` - if rules can't be built successfully

### listOptions

    public java.util.Enumeration listOptions()

  Returns an enumeration describing the available options.

  Specified by:
    `listOptions` in interface `OptionHandler`
  Returns:
    an enumeration of all the available options.

### setOptions

    public void setOptions(java.lang.String[] options)
                    throws java.lang.Exception

  Parses a given list of options. Valid option is:

  -N required number of rules
  The required number of rules (default: 10).

  Specified by:
    `setOptions` in interface `OptionHandler`
  Parameters:
    `options` - the list of options as an array of strings
  Throws:
    `java.lang.Exception` - if an option is not supported

### getOptions

    public java.lang.String[] getOptions()

  Gets the current settings of the PredictiveApriori object.

  Specified by:
    `getOptions` in interface `OptionHandler`
  Returns:
    an array of strings suitable for passing to setOptions

### toString

    public java.lang.String toString()

  Outputs the association rules.

  Overrides:
    `toString` in class `java.lang.Object`

### numRulesTipText

    public java.lang.String numRulesTipText()

  Returns the tip text for this property

  Returns:
    tip text for this property suitable for displaying in the explorer/experimenter gui

### getNumRules

    public int getNumRules()

  Get the value of the number of required rules.

  Returns:
    Value of the number of required rules.

### setNumRules

    public void setNumRules(int v)

  Set the value of required rules.

  Parameters:
    `v` - Value to assign to number of required rules.

### main

    public static void main(java.lang.String[] options)

  Main method for testing this class.

Overview | Package | Class | Tree | Deprecated | Index | Help | Weka's home
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD