public class RegressionMetrics extends Object implements Logging
param: predictionAndObservations an RDD of either (prediction, observation, weight) or (prediction, observation) pairs param: throughOrigin True if the regression is through the origin. For example, in linear regression, it will be true without fitting intercept.
| Constructor and Description | 
|---|
| RegressionMetrics(RDD<? extends scala.Product> predictionAndObservations) | 
| RegressionMetrics(RDD<? extends scala.Product> predictionAndObservations,
                 boolean throughOrigin) | 
| Modifier and Type | Method and Description | 
|---|---|
| double | explainedVariance()Returns the variance explained by regression. | 
| double | meanAbsoluteError()Returns the mean absolute error, which is a risk function corresponding to the
 expected value of the absolute error loss or l1-norm loss. | 
| double | meanSquaredError()Returns the mean squared error, which is a risk function corresponding to the
 expected value of the squared error loss or quadratic loss. | 
| double | r2()Returns R^2^, the unadjusted coefficient of determination. | 
| double | rootMeanSquaredError()Returns the root mean squared error, which is defined as the square root of
 the mean squared error. | 
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinitializeForcefully, initializeLogging, initializeLogIfNecessary, initializeLogIfNecessary, isTraceEnabled, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarningpublic RegressionMetrics(RDD<? extends scala.Product> predictionAndObservations, boolean throughOrigin)
public RegressionMetrics(RDD<? extends scala.Product> predictionAndObservations)
public double explainedVariance()
public double meanAbsoluteError()
public double meanSquaredError()
public double r2()
public double rootMeanSquaredError()