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 theR2CrossValidationTestResult
class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getMeanActual()
Gets the mean of the actual column values (as opposed to the predicted values).Object
getValue()
Gets the test result value for this test partitioning.double
getVarianceActual()
Gets the variance of the actual column values (as opposed to the predicted values).double
getWeightedCaseCount()
Gets the number of records in the test partitioning.Double
numericValue()
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 theR2CrossValidationTestResult
class.- 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:
getValue
in interfaceCrossValidationTestResult
-
getWeightedCaseCount
public double getWeightedCaseCount()
Gets the number of records in the test partitioning.- Specified by:
getWeightedCaseCount
in interfaceCrossValidationTestResult
-
numericValue
public Double numericValue()
Returns the test result as a numeric value if supported, otherwise returns null.- Specified by:
numericValue
in 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).
-
-