public abstract class SimpleBinaryClassMetric extends Object implements ClassificationScore
Modifier and Type | Field and Description |
---|---|
protected double |
fn
false negatives
|
protected double |
fp
false positives
|
protected double |
tn
true negatives
|
protected double |
tp
true positives
|
Constructor and Description |
---|
SimpleBinaryClassMetric() |
SimpleBinaryClassMetric(SimpleBinaryClassMetric toClone) |
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. |
abstract SimpleBinaryClassMetric |
clone() |
abstract double |
getScore()
Computes the score for the results that have been enrolled via
ClassificationScore.addResult(jsat.classifiers.CategoricalResults, int, double) |
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
|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
equals, getName, hashCode
protected double tp
protected double tn
protected double fp
protected double fn
public SimpleBinaryClassMetric()
public SimpleBinaryClassMetric(SimpleBinaryClassMetric 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 prepare(CategoricalData toPredict)
ClassificationScore
prepare
in interface ClassificationScore
toPredict
- the class label information that will be evaluatedpublic 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 abstract 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 abstract SimpleBinaryClassMetric clone()
clone
in interface ClassificationScore
clone
in class Object
Copyright © 2017. All rights reserved.