jsat.regression.evaluation
Class TotalHistoryRegressionScore
- java.lang.Object
-
- jsat.regression.evaluation.TotalHistoryRegressionScore
-
- All Implemented Interfaces:
- java.io.Serializable, RegressionScore
- Direct Known Subclasses:
- CoefficientOfDetermination, RelativeAbsoluteError, RelativeSquaredError
public abstract class TotalHistoryRegressionScore extends java.lang.Object implements RegressionScore
This abstract class provides the work for maintaining the history of predictions and their true values.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description TotalHistoryRegressionScore()TotalHistoryRegressionScore(TotalHistoryRegressionScore toCopy)Copy constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete 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.abstract TotalHistoryRegressionScoreclone()voidprepare()-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jsat.regression.evaluation.RegressionScore
equals, getName, getScore, hashCode, lowerIsBetter
-
-
-
-
Constructor Detail
-
TotalHistoryRegressionScore
public TotalHistoryRegressionScore()
-
TotalHistoryRegressionScore
public TotalHistoryRegressionScore(TotalHistoryRegressionScore toCopy)
Copy constructor- Parameters:
toCopy- the object to copy
-
-
Method Detail
-
prepare
public void prepare()
- Specified by:
preparein interfaceRegressionScore
-
addResult
public void addResult(double prediction, double trueValue, double weight)Description copied from interface:RegressionScoreAdds the given result to the score- Specified by:
addResultin interfaceRegressionScore- Parameters:
prediction- the prediction for the data pointtrueValue- the true value for the data pointweight- the weigh to assign to the data point
-
addResults
public void addResults(RegressionScore other)
Description copied from interface:RegressionScoreThe 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.- Specified by:
addResultsin interfaceRegressionScore- Parameters:
other- the object to add the results from
-
clone
public abstract TotalHistoryRegressionScore clone()
- Specified by:
clonein interfaceRegressionScore- Overrides:
clonein classjava.lang.Object
-
-
DataMelt 3.0 © DataMelt by jWork.ORG