public class FilteredAssociator extends SingleAssociatorEnhancer
-F <filter specification> Full class name of filter to use, followed by filter options. eg: "weka.filters.unsupervised.attribute.Remove -V -R 1,2" (default: weka.filters.MultiFilter with weka.filters.unsupervised.attribute.ReplaceMissingValues)
-c <the class index> The class index. (default: -1, i.e. unset)
-W Full name of base associator. (default: weka.associations.Apriori)
Options specific to associator weka.associations.Apriori:
-N <required number of rules output> The required number of rules. (default = 10)
-T <0=confidence | 1=lift | 2=leverage | 3=Conviction> The metric type by which to rank rules. (default = confidence)
-C <minimum metric score of a rule> The minimum confidence of a rule. (default = 0.9)
-D <delta for minimum support> The delta by which the minimum support is decreased in each iteration. (default = 0.05)
-U <upper bound for minimum support> Upper bound for minimum support. (default = 1.0)
-M <lower bound for minimum support> The lower bound for the minimum support. (default = 0.1)
-S <significance level> If used, rules are tested for significance at the given level. Slower. (default = no significance testing)
-I If set the itemsets found are also output. (default = no)
-R Remove columns that contain all missing values (default = no)
-V Report progress iteratively. (default = no)
-A If set class association rules are mined. (default = no)
-c <the class index> The class index. (default = last)
Modifier and Type | Field and Description |
---|---|
protected int |
m_ClassIndex
The class index.
|
protected Filter |
m_Filter
The filter
|
protected Instances |
m_FilteredInstances
The instance structure of the filtered instances
|
m_Associator
Constructor and Description |
---|
FilteredAssociator()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
buildAssociations(Instances data)
Build the associator on the filtered data.
|
String |
classIndexTipText()
Returns the tip text for this property
|
protected String |
defaultAssociatorString()
String describing default associator.
|
String |
filterTipText()
Returns the tip text for this property
|
Capabilities |
getCapabilities()
Returns default capabilities of the associator.
|
int |
getClassIndex()
Gets the class index
|
Filter |
getFilter()
Gets the filter used.
|
protected String |
getFilterSpec()
Gets the filter specification string, which contains the class name of
the filter and any options to the filter
|
String[] |
getOptions()
Gets the current settings of the Associator.
|
String |
getRevision()
Returns the revision string.
|
String |
globalInfo()
Returns a string describing this Associator
|
Enumeration |
listOptions()
Returns an enumeration describing the available options.
|
static void |
main(String[] args)
Main method for running this class.
|
void |
setClassIndex(int value)
Sets the class index
|
void |
setFilter(Filter value)
Sets the filter
|
void |
setOptions(String[] options)
Parses a given list of options.
|
String |
toString()
Output a representation of this associator
|
associatorTipText, getAssociator, getAssociatorSpec, setAssociator
forName, makeCopies, makeCopy, runAssociator
protected Filter m_Filter
protected Instances m_FilteredInstances
protected int m_ClassIndex
public String globalInfo()
protected String defaultAssociatorString()
defaultAssociatorString
in class SingleAssociatorEnhancer
public Enumeration listOptions()
listOptions
in interface OptionHandler
listOptions
in class SingleAssociatorEnhancer
public void setOptions(String[] options) throws Exception
-F <filter specification> Full class name of filter to use, followed by filter options. eg: "weka.filters.unsupervised.attribute.Remove -V -R 1,2" (default: weka.filters.MultiFilter with weka.filters.unsupervised.attribute.ReplaceMissingValues)
-c <the class index> The class index. (default: -1, i.e. unset)
-W Full name of base associator. (default: weka.associations.Apriori)
Options specific to associator weka.associations.Apriori:
-N <required number of rules output> The required number of rules. (default = 10)
-T <0=confidence | 1=lift | 2=leverage | 3=Conviction> The metric type by which to rank rules. (default = confidence)
-C <minimum metric score of a rule> The minimum confidence of a rule. (default = 0.9)
-D <delta for minimum support> The delta by which the minimum support is decreased in each iteration. (default = 0.05)
-U <upper bound for minimum support> Upper bound for minimum support. (default = 1.0)
-M <lower bound for minimum support> The lower bound for the minimum support. (default = 0.1)
-S <significance level> If used, rules are tested for significance at the given level. Slower. (default = no significance testing)
-I If set the itemsets found are also output. (default = no)
-R Remove columns that contain all missing values (default = no)
-V Report progress iteratively. (default = no)
-A If set class association rules are mined. (default = no)
-c <the class index> The class index. (default = last)
setOptions
in interface OptionHandler
setOptions
in class SingleAssociatorEnhancer
options
- the list of options as an array of stringsException
- if an option is not supportedpublic String[] getOptions()
getOptions
in interface OptionHandler
getOptions
in class SingleAssociatorEnhancer
public String filterTipText()
public void setFilter(Filter value)
value
- the filter with all options set.public Filter getFilter()
public String classIndexTipText()
public void setClassIndex(int value)
value
- the class indexpublic int getClassIndex()
protected String getFilterSpec()
public Capabilities getCapabilities()
getCapabilities
in interface Associator
getCapabilities
in interface CapabilitiesHandler
getCapabilities
in class SingleAssociatorEnhancer
Capabilities
public void buildAssociations(Instances data) throws Exception
data
- the training dataException
- if the Associator could not be built successfullypublic String toString()
public String getRevision()
getRevision
in interface RevisionHandler
getRevision
in class AbstractAssociator
public static void main(String[] args)
args
- commandline arguments, use "-h" for full listCopyright © 2015 University of Waikato, Hamilton, NZ. All rights reserved.