Package com.bayesserver.analysis
Class RegressionStatistics
- java.lang.Object
-
- com.bayesserver.analysis.RegressionStatistics
-
public final class RegressionStatistics extends Object
Calculates statistics for a network which is used to predict continuous values (regression).
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RegressionStatisticscreate(DataReaderCommand readerCommand, String actual, String predicted)Initializes a new instance of theRegressionStatisticsclass.static RegressionStatisticscreate(DataReaderCommand readerCommand, String actual, String predicted, String caseWeight)Initializes a new instance of theRegressionStatisticsclass.DoublegetMeanAbsoluteError()Gets the mean absolute error (MAE), which is a common measure used to determine how close predictions are to the actual values.DoublegetMeanActual()Gets the mean of the actual column.DoublegetMeanSquaredError()Gets the mean squared error (MSE), which is a common measure used to determine how close predictions are to the actual values.DoublegetRMSE()Gets the root mean squared error (RMSE).DoublegetRSquared()Gets the R squared value (Coefficient of determination).DoublegetSumAbsoluteError()Gets the sum absolute error (SAE).DoublegetSumSquaredError()Gets the sum of squared errors (SSE), which is a common measure used to determine how close predictions are to the actual values.doublegetSupport()Gets the support/weight for the values used to calculate the statistics.DoublegetVarianceActual()Gets the variance of the actual column.
-
-
-
Method Detail
-
create
public static RegressionStatistics create(DataReaderCommand readerCommand, String actual, String predicted)
Initializes a new instance of theRegressionStatisticsclass.- Parameters:
readerCommand- Returns the data containing the actual values and predicted values.actual- The name of the data column containing the actual value.predicted- The name of the data column containing the predicted value.
-
create
public static RegressionStatistics create(DataReaderCommand readerCommand, String actual, String predicted, String caseWeight)
Initializes a new instance of theRegressionStatisticsclass.- Parameters:
readerCommand- Returns the data containing the actual values and predicted values.actual- The name of the data column containing the actual value.predicted- The name of the data column containing the predicted value.caseWeight- The case weight, if any. Can be null.
-
getMeanAbsoluteError
public Double getMeanAbsoluteError()
Gets the mean absolute error (MAE), which is a common measure used to determine how close predictions are to the actual values. The mean absolute error is the average of the absolute errors.
-
getSumAbsoluteError
public Double getSumAbsoluteError()
Gets the sum absolute error (SAE). The sum of the absolute errors.
-
getMeanSquaredError
public Double getMeanSquaredError()
Gets the mean squared error (MSE), which is a common measure used to determine how close predictions are to the actual values. The mean squared error is the average of the squared errors.
-
getSumSquaredError
public Double getSumSquaredError()
Gets the sum of squared errors (SSE), which is a common measure used to determine how close predictions are to the actual values.
-
getRMSE
public Double getRMSE()
Gets the root mean squared error (RMSE).
-
getMeanActual
public Double getMeanActual()
Gets the mean of the actual column.
-
getVarianceActual
public Double getVarianceActual()
Gets the variance of the actual column.
-
getRSquared
public Double getRSquared()
Gets the R squared value (Coefficient of determination).
-
getSupport
public double getSupport()
Gets the support/weight for the values used to calculate the statistics. (May not be a whole number, if original weights are not).
-
-