public class LogLoss extends Object implements ClassificationScore
Constructor and Description |
---|
LogLoss()
Creates a new Log Loss evaluation score
|
LogLoss(double nudge)
Creates a new Log Loss evaluation score
|
LogLoss(LogLoss 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. |
LogLoss |
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 LogLoss()
public LogLoss(double nudge)
nudge
- the nudge value to avoid zero probabilities, must be non
negative and less than 0.1public LogLoss(LogLoss 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 equals(Object obj)
equals
in interface ClassificationScore
equals
in class Object
public int hashCode()
hashCode
in interface ClassificationScore
hashCode
in class Object
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 LogLoss clone()
clone
in interface ClassificationScore
clone
in class Object
public String getName()
ClassificationScore
getName
in interface ClassificationScore
Copyright © 2017. All rights reserved.