Class EstimationTestHarness.TestReport

java.lang.Object
neqsim.process.calibration.EstimationTestHarness.TestReport
All Implemented Interfaces:
Serializable
Enclosing class:
EstimationTestHarness

public static class EstimationTestHarness.TestReport extends Object implements Serializable
Test report containing results and metrics.
Version:
1.0
Author:
NeqSim Development Team
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • testName

      private final String 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

      private final List<double[]> estimateHistory
    • rmseHistory

      private final List<double[]> 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 test
      numSteps - the number of estimation steps
      finalEstimates - the final parameter estimates
      trueValues - the true parameter values
      finalUncertainties - the final uncertainties
      estimateHistory - history of estimates at each step
      rmseHistory - history of RMSE values at each step
  • Method Details

    • findConvergenceStep

      private int findConvergenceStep(double threshold)
    • getTestName

      public String getTestName()
      Gets the test name.
      Returns:
      the test name
    • 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 RMSE
      minCoverage - minimum coverage rate
      maxConvergenceSteps - maximum steps to converge
      Returns:
      true if all criteria pass
    • printSummary

      public void printSummary()
      Prints summary to console.