weka.classifiers.meta.ensembleSelection
Class EnsembleMetricHelper

java.lang.Object
  extended by weka.classifiers.meta.ensembleSelection.EnsembleMetricHelper
All Implemented Interfaces:
RevisionHandler

public class EnsembleMetricHelper
extends java.lang.Object
implements RevisionHandler

This class is used by Ensemble Selection. It provides the "enumeration" of the metrics that can be used by ensemble selection, as well as a helper function for computing the metric using an Evaluation class.

Version:
$Revision: 1.2 $
Author:
David Michael

Field Summary
static int METRIC_ACCURACY
          metric: Accuracy
static int METRIC_ALL
          metric: All
static int METRIC_FSCORE
          metric: FScore
static int METRIC_PRECISION
          metric: Precision
static int METRIC_RECALL
          metric: Recall
static int METRIC_RMSE
          metric: RMSE
static int METRIC_ROC
          metric: ROC
 
Constructor Summary
EnsembleMetricHelper()
           
 
Method Summary
static double getMetric(Evaluation eval, int metric_index)
          Given an Evaluation object and metric, call the appropriate function to get the value for that metric and return it.
 java.lang.String getRevision()
          Returns the revision string.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

METRIC_ACCURACY

public static final int METRIC_ACCURACY
metric: Accuracy

See Also:
Constant Field Values

METRIC_RMSE

public static final int METRIC_RMSE
metric: RMSE

See Also:
Constant Field Values

METRIC_ROC

public static final int METRIC_ROC
metric: ROC

See Also:
Constant Field Values

METRIC_PRECISION

public static final int METRIC_PRECISION
metric: Precision

See Also:
Constant Field Values

METRIC_RECALL

public static final int METRIC_RECALL
metric: Recall

See Also:
Constant Field Values

METRIC_FSCORE

public static final int METRIC_FSCORE
metric: FScore

See Also:
Constant Field Values

METRIC_ALL

public static final int METRIC_ALL
metric: All

See Also:
Constant Field Values
Constructor Detail

EnsembleMetricHelper

public EnsembleMetricHelper()
Method Detail

getMetric

public static double getMetric(Evaluation eval,
                               int metric_index)
Given an Evaluation object and metric, call the appropriate function to get the value for that metric and return it. Metrics are returned so that "bigger is better". For instance, we return 1.0 - RMSE instead of RMSE, because bigger RMSE is better.

Parameters:
eval - the evaluation object to use
metric_index - the metric to use
Returns:
the value for the metric

getRevision

public java.lang.String getRevision()
Returns the revision string.

Specified by:
getRevision in interface RevisionHandler
Returns:
the revision