public class Accuracy extends Object implements TestingMetric
Constructor and Description |
---|
Accuracy()
Creates an
Accuracy testing metric that does not print a table of results. |
Accuracy(boolean p)
Creates an
Accuracy testing metric that prints a table of results if requested. |
Modifier and Type | Method and Description |
---|---|
String |
getName()
Returns the name of the testing metric.
|
double |
test(Classifier classifier,
Classifier oracle,
Parser parser)
Evaluates a classifier against an oracle on the data provided by a parser.
|
public Accuracy()
Accuracy
testing metric that does not print a table of results.public Accuracy(boolean p)
Accuracy
testing metric that prints a table of results if requested.p
- Whether or not to print a table of results when
test(Classifier,Classifier,Parser)
is called.public String getName()
getName
in interface TestingMetric
public double test(Classifier classifier, Classifier oracle, Parser parser)
test
in interface TestingMetric
classifier
- The classifier whose accuracy is being measured.oracle
- A classifier that returns the label of each example.parser
- A parser to supply the example objects.Copyright © 2016. All rights reserved.