jsat.regression.evaluation
Interface RegressionScore
-
- All Superinterfaces:
- java.io.Serializable
- All Known Implementing Classes:
- CoefficientOfDetermination, MeanAbsoluteError, MeanSquaredError, RelativeAbsoluteError, RelativeSquaredError, TotalHistoryRegressionScore
public interface RegressionScore extends java.io.SerializableThis interface defines the contract for evaluating or "scoring" the results on a regression problem.
All regression scores must override theequals(java.lang.Object)andhashCode()methods. If a score has parameters, different objects with different parameters must not be equal. However, different objects with the same parameters must be equal even if their internal states are different
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description voidaddResult(double prediction, double trueValue, double weight)Adds the given result to the scorevoidaddResults(RegressionScore other)The score contained in this object is augmented with the results already accumulated in theotherobject.RegressionScoreclone()booleanequals(java.lang.Object obj)java.lang.StringgetName()Returns the name to present for this scoredoublegetScore()Computes the score for the results that have been enrolled viaaddResult(double, double, double)inthashCode()booleanlowerIsBetter()Returnstrueif a lower score is better, orfalseif a higher score is bettervoidprepare()
-
-
-
Method Detail
-
prepare
void prepare()
-
addResult
void addResult(double prediction, double trueValue, double weight)Adds the given result to the score- Parameters:
prediction- the prediction for the data pointtrueValue- the true value for the data pointweight- the weigh to assign to the data point
-
addResults
void addResults(RegressionScore other)
The score contained in this object is augmented with the results already accumulated in theotherobject. 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.
This method is only required to work ifotherif of the same class asthisobject.- Parameters:
other- the object to add the results from
-
getScore
double getScore()
Computes the score for the results that have been enrolled viaaddResult(double, double, double)- Returns:
- the score for the current results
-
lowerIsBetter
boolean lowerIsBetter()
Returnstrueif a lower score is better, orfalseif a higher score is better- Returns:
trueif a lower score is better
-
equals
boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
clone
RegressionScore clone()
-
getName
java.lang.String getName()
Returns the name to present for this score- Returns:
- the score name
-
-
DataMelt 3.0 © DataMelt by jWork.ORG