|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectLBJ2.learn.Accuracy
public class Accuracy
Returns the accuracy of a discrete classifier with respect to the oracle as the fraction of examples for which its prediction was correct.
| Field Summary | |
|---|---|
private boolean |
print
Whether or not to print a table of results to STDOUT when
test(Classifier,Classifier,Parser) is called. |
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
java.lang.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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private boolean print
STDOUT when
test(Classifier,Classifier,Parser) is called.
| Constructor Detail |
|---|
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.| Method Detail |
|---|
public java.lang.String getName()
getName in interface TestingMetric
public double test(Classifier classifier,
Classifier oracle,
Parser parser)
test in interface TestingMetricclassifier - 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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||