Class AssociatorEvaluation

  • All Implemented Interfaces:
    RevisionHandler

    public class AssociatorEvaluation
    extends Object
    implements RevisionHandler
    Class for evaluating Associaters.
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    • Constructor Detail

      • AssociatorEvaluation

        public AssociatorEvaluation()
        default constructor
    • Method Detail

      • evaluate

        public static String evaluate​(String associatorString,
                                      String[] options)
                               throws 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:
        Exception - if model could not be evaluated successfully
      • evaluate

        public static String evaluate​(Associator associator,
                                      String[] options)
                               throws 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:
        Exception - if evaluation fails
      • evaluate

        public String evaluate​(Associator associator,
                               Instances data)
                        throws 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:
        Exception - if evaluation fails
      • equals

        public boolean equals​(Object obj)
        Tests whether the current evaluation object is equal to another evaluation object
        Overrides:
        equals in class Object
        Parameters:
        obj - the object to compare against
        Returns:
        true if the two objects are equal
      • toSummaryString

        public String toSummaryString()
        returns a summary string of the evaluation with a no title
        Returns:
        the summary string
      • toSummaryString

        public String toSummaryString​(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
      • main

        public static void main​(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.