Package com.bayesserver.data
Class R2CrossValidationTestResult
- java.lang.Object
-
- com.bayesserver.data.R2CrossValidationTestResult
-
- All Implemented Interfaces:
CrossValidationTestResult
public final class R2CrossValidationTestResult extends Object implements CrossValidationTestResult
Represents the R Squared statistic (Coefficient of determination) on a partition of data.
-
-
Constructor Summary
Constructors Constructor Description R2CrossValidationTestResult(double weightedCaseCount, double rSquared, double meanActual, double varianceActual)Initializes a new instance of theR2CrossValidationTestResultclass.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetMeanActual()Gets the mean of the actual column values (as opposed to the predicted values).ObjectgetValue()Gets the test result value for this test partitioning.doublegetVarianceActual()Gets the variance of the actual column values (as opposed to the predicted values).doublegetWeightedCaseCount()Gets the number of records in the test partitioning.DoublenumericValue()Returns the test result as a numeric value if supported, otherwise returns null.
-
-
-
Constructor Detail
-
R2CrossValidationTestResult
public R2CrossValidationTestResult(double weightedCaseCount, double rSquared, double meanActual, double varianceActual)Initializes a new instance of theR2CrossValidationTestResultclass.- Parameters:
weightedCaseCount- The number of cases (rows) in the partition.rSquared- the R Squared statistic (Coefficient of determination) on a partition of data.meanActual- The mean of the actual column values (as opposed to the predicted values).varianceActual- The variance of the actual column values (as opposed to the predicted values).
-
-
Method Detail
-
getValue
public Object getValue()
Gets the test result value for this test partitioning. This might be the log-likelihood, or the lift, etc...- Specified by:
getValuein interfaceCrossValidationTestResult
-
getWeightedCaseCount
public double getWeightedCaseCount()
Gets the number of records in the test partitioning.- Specified by:
getWeightedCaseCountin interfaceCrossValidationTestResult
-
numericValue
public Double numericValue()
Returns the test result as a numeric value if supported, otherwise returns null.- Specified by:
numericValuein interfaceCrossValidationTestResult- Returns:
- The numeric test result if supported.
-
getMeanActual
public double getMeanActual()
Gets the mean of the actual column values (as opposed to the predicted values).
-
getVarianceActual
public double getVarianceActual()
Gets the variance of the actual column values (as opposed to the predicted values).
-
-