weka.classifiers.evaluation

## Interface InformationRetrievalEvaluationMetric

-     public interface InformationRetrievalEvaluationMetric

  An interface for information retrieval evaluation metrics to implement. Allows the command line interface to display these metrics or not based on user-supplied options. These statistics will be displayed as new columns in the table of information retrieval statistics. As such, a toSummaryString() formatted representation is not required.
  Version:
    $Revision: 9320 $
  Author:
    Mark Hall (mhall{[at]}pentaho{[dot]}com)

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `double` | `getClassWeightedAverageStatistic(java.lang.String statName)` Get the weighted (by class) average for this statistic.
    `double` | `getStatistic(java.lang.String statName, int classIndex)` Get the value of the named statistic for the given class index.
    `void` | `updateStatsForClassifier(double[] predictedDistribution, Instance instance)` Updates the statistics about a classifiers performance for the current test instance.

- - ### Method Detail

    - #### updateStatsForClassifier

          void updateStatsForClassifier(double[] predictedDistribution,
                                        Instance instance)
                                 throws java.lang.Exception

      Updates the statistics about a classifiers performance for the current test instance. Implementers need only implement this method if it is not possible to compute their statistics from what is stored in the base Evaluation object.
      Parameters:
        `predictedDistribution` - the probabilities assigned to each class
        `instance` - the instance to be classified
      Throws:
        `java.lang.Exception` - if the class of the instance is not set

    - #### getStatistic

          double getStatistic(java.lang.String statName,
                              int classIndex)

      Get the value of the named statistic for the given class index. If the implementing class is extending AbstractEvaluationMetric then the implementation of getStatistic(String statName) should just call this method with a classIndex of 0.
      Parameters:
        `statName` - the name of the statistic to compute the value for
        `classIndex` - the class index for which to compute the statistic
      Returns:
        the value of the named statistic for the given class index or Utils.missingValue() if the statistic can't be computed for some reason

    - #### getClassWeightedAverageStatistic

          double getClassWeightedAverageStatistic(java.lang.String statName)

      Get the weighted (by class) average for this statistic.
      Parameters:
        `statName` - the name of the statistic to compute
      Returns:
        the weighted (by class) average value of the statistic or Utils.missingValue() if this can't be computed (or isn't appropriate).