Package weka.experiment

# Interface SplitEvaluator

All Superinterfaces:
  `Serializable`

All Known Implementing Classes:
  `ClassifierSplitEvaluator`, `CostSensitiveClassifierSplitEvaluator`, `DensityBasedClustererSplitEvaluator`, `RegressionSplitEvaluator`

public interface SplitEvaluator extends Serializable
Interface to objects able to generate a fixed set of results for a particular split of a dataset. The set of results should contain fields related to any settings of the SplitEvaluator (not including the dataset name. For example, one field for the classifier used to get the results, another for the classifier options, etc).

Possible implementations of SplitEvaluator:

- StdClassification results
- StdRegression results

Version:
  $Revision: 8034 $
Author:
  Len Trigg (trigg@cs.waikato.ac.nz)

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Object[]`
  `getKey()`
  Gets the key describing the current SplitEvaluator.
  `String[]`
  `getKeyNames()`
  Gets the names of each of the key columns produced for a single run.
  `Object[]`
  `getKeyTypes()`
  Gets the data types of each of the key columns produced for a single run.
  `String`
  `getRawResultOutput()`
  Returns the raw output for the most recent call to getResult.
  `Object[]`
  `getResult(Instances train, Instances test)`
  Gets the results for the supplied train and test datasets.
  `String[]`
  `getResultNames()`
  Gets the names of each of the result columns produced for a single run.
  `Object[]`
  `getResultTypes()`
  Gets the data types of each of the result columns produced for a single run.
  `void`
  `setAdditionalMeasures(String[] additionalMeasures)`
  Sets a list of method names for additional measures to look for in SplitEvaluators.

- ## Method Details

  - ### setAdditionalMeasures

    void setAdditionalMeasures(String[] additionalMeasures)
    Sets a list of method names for additional measures to look for in SplitEvaluators.
    Parameters:
      `additionalMeasures` - a list of method names

  - ### getKeyNames

    String[] getKeyNames()
    Gets the names of each of the key columns produced for a single run. The names should not contain spaces (use '_' instead for easy translation.) The number of key fields must be constant for a given SplitEvaluator.
    Returns:
      an array containing the name of each key column

  - ### getKeyTypes

    Object[] getKeyTypes()
    Gets the data types of each of the key columns produced for a single run. The number of key fields must be constant for a given SplitEvaluator.
    Returns:
      an array containing objects of the type of each key column. The objects should be Strings, or Doubles.

  - ### getResultNames

    String[] getResultNames()
    Gets the names of each of the result columns produced for a single run. The names should not contain spaces (use '_' instead for easy translation.) The number of result fields must be constant for a given SplitEvaluator.
    Returns:
      an array containing the name of each result column

  - ### getResultTypes

    Object[] getResultTypes()
    Gets the data types of each of the result columns produced for a single run. The number of result fields must be constant for a given SplitEvaluator.
    Returns:
      an array containing objects of the type of each result column. The objects should be Strings, or Doubles.

  - ### getKey

    Object[] getKey()
    Gets the key describing the current SplitEvaluator. For example This may contain the name of the classifier used for classifier predictive evaluation. The number of key fields must be constant for a given SplitEvaluator.
    Returns:
      a value of type 'Object'

  - ### getResult

    Object[] getResult(Instances train, Instances test) throws Exception
    Gets the results for the supplied train and test datasets.
    Parameters:
      `train` - the training Instances.
      `test` - the testing Instances.
    Returns:
      the results stored in an array. The objects stored in the array may be Strings, Doubles, or null (for the missing value).
    Throws:
      `Exception` - if a problem occurs while getting the results

  - ### getRawResultOutput

    String getRawResultOutput()
    Returns the raw output for the most recent call to getResult. Useful for debugging splitEvaluators.
    Returns:
      the raw output corresponding to the most recent call to getResut