public class Accuracy extends Object implements ClassificationScore
Modifier and Type | Method and Description |
---|---|
void |
addResult(CategoricalResults prediction,
int trueLabel,
double weight)
Adds the given result to the score
|
void |
addResults(ClassificationScore other)
The score contained in this object is augmented with the results
already accumulated in the
other object. |
Accuracy |
clone() |
boolean |
equals(Object obj) |
String |
getName()
Returns the name to present for this score
|
double |
getScore()
Computes the score for the results that have been enrolled via
ClassificationScore.addResult(jsat.classifiers.CategoricalResults, int, double) |
int |
hashCode() |
boolean |
lowerIsBetter()
Returns
true if a lower score is better, or false if a
higher score is better |
void |
prepare(CategoricalData toPredict)
Prepares this score to predict on the given input
|
public Accuracy()
public Accuracy(Accuracy toClone)
public void addResult(CategoricalResults prediction, int trueLabel, double weight)
ClassificationScore
addResult
in interface ClassificationScore
prediction
- the prediction for the data pointtrueLabel
- the true label for the data pointweight
- the weigh to assign to the data pointpublic void addResults(ClassificationScore other)
ClassificationScore
other
object. This does not result in
an averaging, but alters the current object to have the same score it
would have had if all the results were originally inserted into this
object. other
if of the same
class as this
object.addResults
in interface ClassificationScore
other
- the object to add the results frompublic void prepare(CategoricalData toPredict)
ClassificationScore
prepare
in interface ClassificationScore
toPredict
- the class label information that will be evaluatedpublic double getScore()
ClassificationScore
ClassificationScore.addResult(jsat.classifiers.CategoricalResults, int, double)
getScore
in interface ClassificationScore
public boolean lowerIsBetter()
ClassificationScore
true
if a lower score is better, or false
if a
higher score is betterlowerIsBetter
in interface ClassificationScore
true
if a lower score is betterpublic boolean equals(Object obj)
equals
in interface ClassificationScore
equals
in class Object
public int hashCode()
hashCode
in interface ClassificationScore
hashCode
in class Object
public Accuracy clone()
clone
in interface ClassificationScore
clone
in class Object
public String getName()
ClassificationScore
getName
in interface ClassificationScore
Copyright © 2017. All rights reserved.