Package weka.classifiers.evaluation
Class EvaluationMetricHelper
java.lang.Object
weka.classifiers.evaluation.EvaluationMetricHelper
Helper routines for extracting metric values from built-in and plugin
evaluation metrics.
- Version:
- $Revision: 10934 $
- Author:
- Mark Hall (mhall{[at]}pentaho{[dot]}com)
-
Constructor Summary
ConstructorDescriptionConstruct a new EvaluationMetricHelper -
Method Summary
Modifier and TypeMethodDescriptionGet a list of all available evaluation metric namesGet a list of built-in metric namesdouble
getNamedMetric
(String statName, int... classValIndex) Gets the value of a named metric.double[]
getNamedMetricThresholds
(String statName) Gets the thresholds produced by the metric, if the metric implements ThresholdProducingMetric.Get a list of plugin metric namesboolean
metricIsMaximisable
(String statName) Returns true if the named metric is maximisablevoid
setEvaluation
(Evaluation eval) Sets the Evaluation object to use
-
Constructor Details
-
EvaluationMetricHelper
Construct a new EvaluationMetricHelper- Parameters:
eval
- the Evaluation object to use
-
-
Method Details
-
setEvaluation
Sets the Evaluation object to use- Parameters:
eval
- the Evaluation object to use
-
getBuiltInMetricNames
Get a list of built-in metric names- Returns:
- a list of built-in metric names
-
getPluginMetricNames
Get a list of plugin metric names- Returns:
- a list of plugin metric names
-
getAllMetricNames
Get a list of all available evaluation metric names- Returns:
- a list of all available evaluation metric names
-
getNamedMetric
Gets the value of a named metric. For information retrieval metrics if a class value index is not supplied then the class weighted variant is returned.- Parameters:
statName
- the name of the metric/statistic to getclassValIndex
- the optional class value index- Returns:
- the value of the metric
- Throws:
Exception
- if the metric/stat is unknown or a problem occurs
-
getNamedMetricThresholds
Gets the thresholds produced by the metric, if the metric implements ThresholdProducingMetric.- Parameters:
statName
- the name of the metric/statistic to get- Returns:
- the thresholds, null if metric does not produce any
- Throws:
Exception
- if the metric/stat is unknown or a problem occurs
-
metricIsMaximisable
Returns true if the named metric is maximisable- Parameters:
statName
- the name of the metric/statistic to check- Returns:
- true if the metric in question is optimum at a maximal value
- Throws:
Exception
- if a problem occurs
-