类 PredictiveApriori
java.lang.Object
weka.associations.AbstractAssociator
weka.associations.PredictiveApriori
- 所有已实现的接口:
Serializable
,Cloneable
,Associator
,CARuleMiner
,CapabilitiesHandler
,OptionHandler
,RevisionHandler
,TechnicalInformationHandler
public class PredictiveApriori
extends AbstractAssociator
implements OptionHandler, CARuleMiner, TechnicalInformationHandler
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). BibTeX:
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). BibTeX:
@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)
- 版本:
- $Revision: 6365 $
- 作者:
- Stefan Mutter (mutter@cs.waikato.ac.nz)
- 另请参阅:
-
构造器概要
构造器构造器说明Constructor that allows to sets default values for the minimum confidence and the maximum number of rules the minimum confidence. -
方法概要
修饰符和类型方法说明void
buildAssociations
(Instances instances) Method that generates all large itemsets with a minimum support, and from these all association rules.Returns the tip text for this propertyReturns the tip text for this propertyreturns all the rulesReturns default capabilities of the classifier.boolean
getCar()
Gets whether class association ruels are minedint
Gets the index of the class attributeGets the instances without the class attributeGets the class attribute of all instancesint
Get the value of the number of required rules.String[]
Gets the current settings of the PredictiveApriori object.Returns the revision string.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.Returns a string describing this associatorReturns an enumeration describing the available options.static void
Main method.Returns the metric string for the chosen metric type.Method that mines the n best class association rules.Returns the tip text for this propertyvoid
Resets the options to the default values.void
setCar
(boolean flag) Sets class association rule miningvoid
setClassIndex
(int index) Sets the class indexvoid
setNumRules
(int v) Set the value of required rules.void
setOptions
(String[] options) Parses a given list of options.toString()
Outputs the association rules.从类继承的方法 weka.associations.AbstractAssociator
forName, makeCopies, makeCopy
-
构造器详细资料
-
PredictiveApriori
public PredictiveApriori()Constructor that allows to sets default values for the minimum confidence and the maximum number of rules the minimum confidence.
-
-
方法详细资料
-
globalInfo
Returns a string describing this associator- 返回:
- a description of the evaluator suitable for displaying in the explorer/experimenter gui
-
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.- 指定者:
getTechnicalInformation
在接口中TechnicalInformationHandler
- 返回:
- the technical information about this class
-
resetOptions
public void resetOptions()Resets the options to the default values. -
getCapabilities
Returns default capabilities of the classifier.- 指定者:
getCapabilities
在接口中Associator
- 指定者:
getCapabilities
在接口中CapabilitiesHandler
- 覆盖:
getCapabilities
在类中AbstractAssociator
- 返回:
- the capabilities of this classifier
- 另请参阅:
-
buildAssociations
Method that generates all large itemsets with a minimum support, and from these all association rules.- 指定者:
buildAssociations
在接口中Associator
- 参数:
instances
- the instances to be used for generating the associations- 抛出:
Exception
- if rules can't be built successfully
-
mineCARs
Method that mines the n best class association rules.- 指定者:
mineCARs
在接口中CARuleMiner
- 参数:
data
- the instances for which class association rules should be mined- 返回:
- an sorted array of FastVector (depending on the expected predictive accuracy) containing the rules and metric information
- 抛出:
Exception
- if rules can't be built successfully
-
getInstancesNoClass
Gets the instances without the class attribute- 指定者:
getInstancesNoClass
在接口中CARuleMiner
- 返回:
- instances without class attribute
-
getInstancesOnlyClass
Gets the class attribute of all instances- 指定者:
getInstancesOnlyClass
在接口中CARuleMiner
- 返回:
- Instances containing only the class attribute
-
listOptions
Returns an enumeration describing the available options.- 指定者:
listOptions
在接口中OptionHandler
- 返回:
- an enumeration of all the available options.
-
setOptions
Parses a given list of options. 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)
- 指定者:
setOptions
在接口中OptionHandler
- 参数:
options
- the list of options as an array of strings- 抛出:
Exception
- if an option is not supported
-
getOptions
Gets the current settings of the PredictiveApriori object.- 指定者:
getOptions
在接口中OptionHandler
- 返回:
- an array of strings suitable for passing to setOptions
-
toString
Outputs the association rules. -
numRulesTipText
Returns the tip text for this property- 返回:
- 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.- 返回:
- Value of the number of required rules.
-
setNumRules
public void setNumRules(int v) Set the value of required rules.- 参数:
v
- Value to assign to number of required rules.
-
setClassIndex
public void setClassIndex(int index) Sets the class index- 指定者:
setClassIndex
在接口中CARuleMiner
- 参数:
index
- the index of the class attribute
-
getClassIndex
public int getClassIndex()Gets the index of the class attribute- 返回:
- the index of the class attribute
-
classIndexTipText
Returns the tip text for this property- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setCar
public void setCar(boolean flag) Sets class association rule mining- 参数:
flag
- if class association rules are mined, false otherwise
-
getCar
public boolean getCar()Gets whether class association ruels are mined- 返回:
- true if class association rules are mined, false otherwise
-
carTipText
Returns the tip text for this property- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
metricString
Returns the metric string for the chosen metric type. Predictive apriori uses the estimated predictive accuracy. Therefore the metric string is "acc".- 指定者:
metricString
在接口中CARuleMiner
- 返回:
- string "acc"
-
getAllTheRules
returns all the rules- 返回:
- all the rules
- 另请参阅:
-
m_allTheRules
-
getRevision
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 覆盖:
getRevision
在类中AbstractAssociator
- 返回:
- the revision
-
main
Main method.- 参数:
args
- the commandline parameters
-