Class EstimationTestHarness.TestReport
java.lang.Object
neqsim.process.calibration.EstimationTestHarness.TestReport
- All Implemented Interfaces:
Serializable
- Enclosing class:
EstimationTestHarness
Test report containing results and metrics.
- Version:
- 1.0
- Author:
- NeqSim Development Team
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final doubleprivate final List<double[]> private final double[]private final double[]private final doubleprivate final doubleprivate final intprivate final doubleprivate final List<double[]> private static final longprivate final intprivate final Stringprivate final double[] -
Constructor Summary
ConstructorsConstructorDescriptionTestReport(String testName, int numSteps, double[] finalEstimates, double[] trueValues, double[] finalUncertainties, List<double[]> estimateHistory, List<double[]> rmseHistory) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprivate intfindConvergenceStep(double threshold) doubleGets coverage rate (fraction of true values in 95% CI).double[]Gets final estimates.doubleGets maximum error.doubleGets mean absolute error.doublegetRMSE()Gets the RMSE of final estimates.intGets steps to convergence.Gets the test name.double[]Gets true values.booleanpasses(double maxRMSE, double minCoverage, int maxConvergenceSteps) Checks if test passes given criteria.voidPrints summary to console.
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
testName
-
numSteps
private final int numSteps -
finalEstimates
private final double[] finalEstimates -
trueValues
private final double[] trueValues -
finalUncertainties
private final double[] finalUncertainties -
rmse
private final double rmse -
meanAbsoluteError
private final double meanAbsoluteError -
maxError
private final double maxError -
stepsToConverge
private final int stepsToConverge -
coverageRate
private final double coverageRate -
estimateHistory
-
rmseHistory
-
-
Constructor Details
-
TestReport
public TestReport(String testName, int numSteps, double[] finalEstimates, double[] trueValues, double[] finalUncertainties, List<double[]> estimateHistory, List<double[]> rmseHistory) Constructor.- Parameters:
testName- the name of the testnumSteps- the number of estimation stepsfinalEstimates- the final parameter estimatestrueValues- the true parameter valuesfinalUncertainties- the final uncertaintiesestimateHistory- history of estimates at each steprmseHistory- history of RMSE values at each step
-
-
Method Details
-
findConvergenceStep
private int findConvergenceStep(double threshold) -
getTestName
-
getRMSE
public double getRMSE()Gets the RMSE of final estimates.- Returns:
- the RMSE value
-
getMeanAbsoluteError
public double getMeanAbsoluteError()Gets mean absolute error.- Returns:
- the mean absolute error
-
getMaxError
public double getMaxError()Gets maximum error.- Returns:
- the maximum error
-
getStepsToConverge
public int getStepsToConverge()Gets steps to convergence.- Returns:
- the number of steps to converge
-
getCoverageRate
public double getCoverageRate()Gets coverage rate (fraction of true values in 95% CI).- Returns:
- the coverage rate
-
getFinalEstimates
public double[] getFinalEstimates()Gets final estimates.- Returns:
- the final estimates array
-
getTrueValues
public double[] getTrueValues()Gets true values.- Returns:
- the true values array
-
passes
public boolean passes(double maxRMSE, double minCoverage, int maxConvergenceSteps) Checks if test passes given criteria.- Parameters:
maxRMSE- maximum allowed RMSEminCoverage- minimum coverage ratemaxConvergenceSteps- maximum steps to converge- Returns:
- true if all criteria pass
-
printSummary
public void printSummary()Prints summary to console.
-