weka.associations

## Class AssociatorEvaluation

- java.lang.Object
- - weka.associations.AssociatorEvaluation

- All Implemented Interfaces:
    RevisionHandler

      public class AssociatorEvaluation
      extends java.lang.Object
      implements RevisionHandler

  Class for evaluating Associaters.
  Version:
    $Revision: 10172 $
  Author:
    fracpete (fracpete at waikato dot ac dot nz)

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AssociatorEvaluation()` default constructor

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object obj)` Tests whether the current evaluation object is equal to another evaluation object
    `java.lang.String` | `evaluate(Associator associator, Instances data)` Evaluates the associator with the given commandline options and returns the evaluation string.
    `static java.lang.String` | `evaluate(Associator associator, java.lang.String[] options)` Evaluates the associator with the given commandline options and returns the evaluation string.
    `static java.lang.String` | `evaluate(java.lang.String associatorString, java.lang.String[] options)` Evaluates an associator with the options given in an array of strings.
    `java.lang.String` | `getRevision()` Returns the revision string.
    `static void` | `main(java.lang.String[] args)` A test method for this class.
    `java.lang.String` | `toString()` returns the current result
    `java.lang.String` | `toSummaryString()` returns a summary string of the evaluation with a no title
    `java.lang.String` | `toSummaryString(java.lang.String title)` returns a summary string of the evaluation with a default title

    - ### Methods inherited from class java.lang.Object

      `getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### AssociatorEvaluation

          public AssociatorEvaluation()

      default constructor

  - ### Method Detail

    - #### evaluate

          public static java.lang.String evaluate(java.lang.String associatorString,
                                                  java.lang.String[] options)
                                           throws java.lang.Exception

      Evaluates an associator with the options given in an array of strings.
      Parameters:
        `associatorString` - class of associator as a string
        `options` - the array of string containing the options
      Returns:
        a string describing the results
      Throws:
        `java.lang.Exception` - if model could not be evaluated successfully

    - #### evaluate

          public static java.lang.String evaluate(Associator associator,
                                                  java.lang.String[] options)
                                           throws java.lang.Exception

      Evaluates the associator with the given commandline options and returns the evaluation string.
      Parameters:
        `associator` - the Associator to evaluate
        `options` - the commandline options
      Returns:
        the generated output string
      Throws:
        `java.lang.Exception` - if evaluation fails

    - #### evaluate

          public java.lang.String evaluate(Associator associator,
                                           Instances data)
                                    throws java.lang.Exception

      Evaluates the associator with the given commandline options and returns the evaluation string.
      Parameters:
        `associator` - the Associator to evaluate
        `data` - the data to run the associator with
      Returns:
        the generated output string
      Throws:
        `java.lang.Exception` - if evaluation fails

    - #### equals

          public boolean equals(java.lang.Object obj)

      Tests whether the current evaluation object is equal to another evaluation object
      Overrides:
        `equals` in class `java.lang.Object`
      Parameters:
        `obj` - the object to compare against
      Returns:
        true if the two objects are equal

    - #### toSummaryString

          public java.lang.String toSummaryString()

      returns a summary string of the evaluation with a no title
      Returns:
        the summary string

    - #### toSummaryString

          public java.lang.String toSummaryString(java.lang.String title)

      returns a summary string of the evaluation with a default title
      Parameters:
        `title` - the title to print before the result
      Returns:
        the summary string

    - #### toString

          public java.lang.String toString()

      returns the current result
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        the currently stored result
      See Also:
        `toSummaryString()`

    - #### getRevision

          public java.lang.String getRevision()

      Returns the revision string.
      Specified by:
        `getRevision` in interface `RevisionHandler`
      Returns:
        the revision

    - #### main

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

      A test method for this class. Just extracts the first command line argument as an associator class name and calls evaluate.
      Parameters:
        `args` - an array of command line arguments, the first of which must be the class name of an associator.