public class MeanSquaredError extends Object implements RegressionScore
Constructor and Description |
---|
MeanSquaredError() |
MeanSquaredError(boolean rmse) |
MeanSquaredError(MeanSquaredError toCopy)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addResult(double prediction,
double trueValue,
double weight)
Adds the given result to the score
|
void |
addResults(RegressionScore other)
The score contained in this object is augmented with the results
already accumulated in the
other object. |
MeanSquaredError |
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
RegressionScore.addResult(double, double, double) |
int |
hashCode() |
boolean |
isRMSE() |
boolean |
lowerIsBetter()
Returns
true if a lower score is better, or false if a
higher score is better |
void |
prepare() |
void |
setRMSE(boolean rmse) |
public MeanSquaredError()
public MeanSquaredError(boolean rmse)
public MeanSquaredError(MeanSquaredError toCopy)
toCopy
- the object to copypublic void setRMSE(boolean rmse)
public boolean isRMSE()
public void prepare()
prepare
in interface RegressionScore
public void addResult(double prediction, double trueValue, double weight)
RegressionScore
addResult
in interface RegressionScore
prediction
- the prediction for the data pointtrueValue
- the true value for the data pointweight
- the weigh to assign to the data pointpublic void addResults(RegressionScore other)
RegressionScore
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 RegressionScore
other
- the object to add the results frompublic double getScore()
RegressionScore
RegressionScore.addResult(double, double, double)
getScore
in interface RegressionScore
public boolean lowerIsBetter()
RegressionScore
true
if a lower score is better, or false
if a
higher score is betterlowerIsBetter
in interface RegressionScore
true
if a lower score is betterpublic int hashCode()
hashCode
in interface RegressionScore
hashCode
in class Object
public boolean equals(Object obj)
equals
in interface RegressionScore
equals
in class Object
public MeanSquaredError clone()
clone
in interface RegressionScore
clone
in class Object
public String getName()
RegressionScore
getName
in interface RegressionScore
Copyright © 2017. All rights reserved.