|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectweka.associations.AbstractAssociator
weka.associations.PredictiveApriori
public class PredictiveApriori
Class implementing the predictive apriori algorithm to mine association rules.
It searches with an increasing support threshold for the best 'n' rules concerning a support-based corrected confidence value.
For more information see:
Tobias Scheffer: Finding Association Rules That Trade Support Optimally against Confidence. In: 5th European Conference on Principles of Data Mining and Knowledge Discovery, 424-435, 2001.
The implementation follows the paper expect for adding a rule to the output of the 'n' best rules. A rule is added if:
the expected predictive accuracy of this rule is among the 'n' 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).
@inproceedings{Scheffer2001,
author = {Tobias Scheffer},
booktitle = {5th European Conference on Principles of Data Mining and Knowledge Discovery},
pages = {424-435},
publisher = {Springer},
title = {Finding Association Rules That Trade Support Optimally against Confidence},
year = {2001}
}
Valid options are:
-N <required number of rules output> The required number of rules. (default = 100)
-A If set class association rules are mined. (default = no)
-c <the class index> The class index. (default = last)
| 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. |
java.lang.String |
carTipText()
Returns the tip text for this property |
java.lang.String |
classIndexTipText()
Returns the tip text for this property |
FastVector[] |
getAllTheRules()
returns all the rules |
Capabilities |
getCapabilities()
Returns default capabilities of the classifier. |
boolean |
getCar()
Gets whether class association ruels are mined |
int |
getClassIndex()
Gets the index of the class attribute |
Instances |
getInstancesNoClass()
Gets the instances without the class attribute |
Instances |
getInstancesOnlyClass()
Gets the class attribute of all instances |
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 |
getRevision()
Returns the revision string. |
TechnicalInformation |
getTechnicalInformation()
Returns an instance of a TechnicalInformation object, containing detailed information about the technical background of this class, e.g., paper reference or book this class is based on. |
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[] args)
Main method. |
java.lang.String |
metricString()
Returns the metric string for the chosen metric type. |
FastVector[] |
mineCARs(Instances data)
Method that mines the n best class association rules. |
java.lang.String |
numRulesTipText()
Returns the tip text for this property |
void |
resetOptions()
Resets the options to the default values. |
void |
setCar(boolean flag)
Sets class association rule mining |
void |
setClassIndex(int index)
Sets the class index |
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.AbstractAssociator |
|---|
forName, makeCopies, makeCopy |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PredictiveApriori()
| Method Detail |
|---|
public java.lang.String globalInfo()
public TechnicalInformation getTechnicalInformation()
getTechnicalInformation in interface TechnicalInformationHandlerpublic void resetOptions()
public Capabilities getCapabilities()
getCapabilities in interface AssociatorgetCapabilities in interface CapabilitiesHandlergetCapabilities in class AbstractAssociatorCapabilities
public void buildAssociations(Instances instances)
throws java.lang.Exception
buildAssociations in interface Associatorinstances - the instances to be used for generating the associations
java.lang.Exception - if rules can't be built successfully
public FastVector[] mineCARs(Instances data)
throws java.lang.Exception
mineCARs in interface CARuleMinerdata - the instances for which class association rules should be mined
java.lang.Exception - if rules can't be built successfullypublic Instances getInstancesNoClass()
getInstancesNoClass in interface CARuleMinerpublic Instances getInstancesOnlyClass()
getInstancesOnlyClass in interface CARuleMinerpublic java.util.Enumeration listOptions()
listOptions in interface OptionHandler
public void setOptions(java.lang.String[] options)
throws java.lang.Exception
-N <required number of rules output> The required number of rules. (default = 100)
-A If set class association rules are mined. (default = no)
-c <the class index> The class index. (default = last)
setOptions in interface OptionHandleroptions - the list of options as an array of strings
java.lang.Exception - if an option is not supportedpublic java.lang.String[] getOptions()
getOptions in interface OptionHandlerpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String numRulesTipText()
public int getNumRules()
public void setNumRules(int v)
v - Value to assign to number of required rules.public void setClassIndex(int index)
setClassIndex in interface CARuleMinerindex - the index of the class attributepublic int getClassIndex()
public java.lang.String classIndexTipText()
public void setCar(boolean flag)
flag - if class association rules are mined, false otherwisepublic boolean getCar()
public java.lang.String carTipText()
public java.lang.String metricString()
metricString in interface CARuleMinerpublic FastVector[] getAllTheRules()
m_allTheRulespublic java.lang.String getRevision()
getRevision in interface RevisionHandlergetRevision in class AbstractAssociatorpublic static void main(java.lang.String[] args)
args - the commandline parameters
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||