Class LinearRegressionSummary

Object
org.apache.spark.ml.regression.LinearRegressionSummary
All Implemented Interfaces:
Serializable, scala.Serializable
Direct Known Subclasses:
LinearRegressionTrainingSummary

public class LinearRegressionSummary extends Object implements scala.Serializable
Linear regression results evaluated on a dataset.

param: predictions predictions output by the model's transform method. param: predictionCol Field in "predictions" which gives the predicted value of the label at each instance. param: labelCol Field in "predictions" which gives the true label of each instance. param: featuresCol Field in "predictions" which gives the features of each instance as a vector.

See Also:
  • Method Details

    • coefficientStandardErrors

      public double[] coefficientStandardErrors()
    • degreesOfFreedom

      public long degreesOfFreedom()
      Degrees of freedom
    • devianceResiduals

      public double[] devianceResiduals()
    • explainedVariance

      public double explainedVariance()
      Returns the explained variance regression score. explainedVariance = 1 - variance(y - \hat{y}) / variance(y) Reference: Wikipedia explain variation
      Returns:
      (undocumented)
    • featuresCol

      public String featuresCol()
    • labelCol

      public String labelCol()
    • meanAbsoluteError

      public 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.
      Returns:
      (undocumented)
    • meanSquaredError

      public 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.
      Returns:
      (undocumented)
    • numInstances

      public long numInstances()
    • pValues

      public double[] pValues()
    • predictionCol

      public String predictionCol()
    • predictions

      public Dataset<Row> predictions()
    • r2

      public double r2()
      Returns R^2^, the coefficient of determination. Reference: Wikipedia coefficient of determination
      Returns:
      (undocumented)
    • r2adj

      public double r2adj()
      Returns Adjusted R^2^, the adjusted coefficient of determination. Reference: Wikipedia coefficient of determination
      Returns:
      (undocumented)
    • residuals

      public Dataset<Row> residuals()
    • rootMeanSquaredError

      public double rootMeanSquaredError()
      Returns the root mean squared error, which is defined as the square root of the mean squared error.
      Returns:
      (undocumented)
    • tValues

      public double[] tValues()