public class CategoricalEvaluator extends Evaluator
Modifier and Type | Class and Description |
---|---|
static class |
CategoricalEvaluator.RepresentativeMetric |
Constructor and Description |
---|
CategoricalEvaluator() |
CategoricalEvaluator(CategoricalEvaluator.RepresentativeMetric representative,
int... rawCategoryIndexes) |
CategoricalEvaluator(int... rawCategoryIndexes) |
CategoricalEvaluator(String representative,
int... rawCategoryIndexes) |
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.
|
String |
getAllStats()
Get a string that contains the full range of stats that this Evaluator can provide.
|
protected Set<GroundAtom> |
getPredictedCategories(TrainingMap trainingMap,
StandardPredicate predicate)
Build up a set that has all the atoms that represet the best categorical assignments.
|
double |
getRepMetric()
The representative (rep) metric is the metric that was chosen to be the representative for this evaluator.
|
boolean |
isHigherRepBetter()
Is a higher value for the current representative metric better?
|
void |
setCategoryIndexes(int... rawCategoryIndexes) |
compute, compute, getNormalizedRepMetric
public static final String DELIM
public CategoricalEvaluator()
public CategoricalEvaluator(int... rawCategoryIndexes)
public CategoricalEvaluator(String representative, int... rawCategoryIndexes)
public CategoricalEvaluator(CategoricalEvaluator.RepresentativeMetric representative, int... rawCategoryIndexes)
public void setCategoryIndexes(int... rawCategoryIndexes)
public void compute(TrainingMap trainingMap)
Evaluator
public void compute(TrainingMap trainingMap, StandardPredicate predicate)
Evaluator
public double getRepMetric()
Evaluator
getRepMetric
in class Evaluator
public boolean isHigherRepBetter()
Evaluator
isHigherRepBetter
in class Evaluator
public double accuracy()
public String getAllStats()
Evaluator
getAllStats
in class Evaluator
protected Set<GroundAtom> getPredictedCategories(TrainingMap trainingMap, StandardPredicate predicate)
Copyright © 2020 University of California, Santa Cruz. All rights reserved.