All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home

Class weka.associations.Associator

java.lang.Object
    |
    +----weka.associations.Associator

public abstract class Associator
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable
Abstract scheme for learning associations. All schemes for learning associations implemement this class

Version:
$Revision: 1.4 $
Author:
Eibe Frank (eibe@cs.waikato.ac.nz)

Constructor Index

 o Associator()
 

Method Index

 o buildAssociations(Instances)
Generates an associator.
 o forName(String, String[])
Creates a new instance of a associator given it's class name and (optional) arguments to pass to it's setOptions method.
 o makeCopies(Associator, int)
Creates copies of the current associator.

Constructor Detail

 o Associator
public Associator()

Method Detail

 o buildAssociations
public abstract void buildAssociations(Instances data) throws java.lang.Exception
          Generates an associator. Must initialize all fields of the associator that are not being set via options (ie. multiple calls of buildAssociator must always lead to the same result). Must not change the dataset in any way.
Parameters:
data - set of instances serving as training data
Throws:
java.lang.Exception - if the associator has not been generated successfully
 o forName
public static Associator forName(java.lang.String associatorName,
                                 java.lang.String options[]) throws java.lang.Exception
          Creates a new instance of a associator given it's class name and (optional) arguments to pass to it's setOptions method. If the associator implements OptionHandler and the options parameter is non-null, the associator will have it's options set.
Parameters:
associatorName - the fully qualified class name of the associator
options - an array of options suitable for passing to setOptions. May be null.
Returns:
the newly created associator, ready for use.
Throws:
java.lang.Exception - if the associator name is invalid, or the options supplied are not acceptable to the associator
 o makeCopies
public static Associator[] makeCopies(Associator model,
                                      int num) throws java.lang.Exception
          Creates copies of the current associator. Note that this method now uses Serialization to perform a deep copy, so the Associator object must be fully Serializable. Any currently built model will now be copied as well.
Parameters:
model - an example associator to copy
num - the number of associators copies to create.
Returns:
an array of associators.
Throws:
java.lang.Exception - if an error occurs

All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home