Module simpa.core

Class RmsErrorCalculator

java.lang.Object
simpa.core.api.utils.RmsErrorCalculator

public class RmsErrorCalculator extends Object
Utilities for calculating different types of errors for evaluation.
  • Constructor Details

    • RmsErrorCalculator

      public RmsErrorCalculator()
  • Method Details

    • printRMSErrorForSHFieldFile

      public void printRMSErrorForSHFieldFile(String filename, PotentialProvider pp, int ntest) throws OutOfApertureException, KnownFatalException, IOException
      Prints the RMS (root mean square) error for a SHField in a given file.
      Parameters:
      filename - input file
      pp - potentialprovider
      ntest - amount of test points
      Throws:
      OutOfApertureException - thrown when a point is outside the volume.
      KnownFatalException - when an internal error happens.
      IOException
    • getNormalizedRmsError

      public double getNormalizedRmsError(double[] exact, double[] estimate) throws IllegalArgumentException
      Calculates the normalized RMS error between the exact and estimated values. See: // https://en.wikipedia.org/wiki/Root-mean-square_deviation
      Parameters:
      exact - values
      estimate - values
      Returns:
      normalized RMS error
      Throws:
      IllegalArgumentException - If the length of the arrays are different or zero;