public class DiscreteEvaluator extends Evaluator
Modifier and Type | Class and Description |
---|---|
static class |
DiscreteEvaluator.RepresentativeMetric |
Modifier and Type | Field and Description |
---|---|
static String |
CONFIG_PREFIX
Prefix of property keys used by this class.
|
static String |
DEFAULT_REPRESENTATIVE |
static double |
DEFAULT_THRESHOLD |
static String |
REPRESENTATIVE_KEY
The representative metric.
|
static String |
THRESHOLD_KEY
The truth threshold.
|
Constructor and Description |
---|
DiscreteEvaluator() |
DiscreteEvaluator(double threshold) |
DiscreteEvaluator(double threshold,
DiscreteEvaluator.RepresentativeMetric representative) |
DiscreteEvaluator(double threshold,
String representative) |
Modifier and Type | Method and Description |
---|---|
double |
accuracy() |
void |
compute(TrainingMap trainingMap)
One of the main computation method.
|
void |
compute(TrainingMap trainingMap,
StandardPredicate predicate)
One of the main computation method.
|
double |
f1() |
double |
fScore(double beta) |
String |
getAllStats()
Get a string that contains the full range of stats that this Evaluator can provide.
|
double |
getRepresentativeMetric() |
double |
getThreshold() |
boolean |
isHigherRepresentativeBetter() |
double |
negativePrecision() |
double |
negativeRecall() |
double |
positivePrecision() |
double |
positiveRecall() |
public static final String CONFIG_PREFIX
public static final String THRESHOLD_KEY
public static final double DEFAULT_THRESHOLD
public static final String REPRESENTATIVE_KEY
public static final String DEFAULT_REPRESENTATIVE
public DiscreteEvaluator()
public DiscreteEvaluator(double threshold)
public DiscreteEvaluator(double threshold, String representative)
public DiscreteEvaluator(double threshold, DiscreteEvaluator.RepresentativeMetric representative)
public void compute(TrainingMap trainingMap)
Evaluator
public void compute(TrainingMap trainingMap, StandardPredicate predicate)
Evaluator
public double getRepresentativeMetric()
getRepresentativeMetric
in class Evaluator
public boolean isHigherRepresentativeBetter()
isHigherRepresentativeBetter
in class Evaluator
public double getThreshold()
public double positivePrecision()
public double negativePrecision()
public double positiveRecall()
public double negativeRecall()
public double f1()
public double fScore(double beta)
public double accuracy()
public String getAllStats()
Evaluator
getAllStats
in class Evaluator
Copyright © 2018 University of California, Santa Cruz. All rights reserved.