java.lang.Object
simpa.core.api.utils.RmsErrorCalculator
Utilities for calculating different types of errors for evaluation.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
getNormalizedRmsError
(double[] exact, double[] estimate) Calculates the normalized RMS error between the exact and estimated values.void
printRMSErrorForSHFieldFile
(String filename, PotentialProvider pp, int ntest) Prints the RMS (root mean square) error for a SHField in a given file.
-
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 filepp
- potentialproviderntest
- 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
- valuesestimate
- values- Returns:
- normalized RMS error
- Throws:
IllegalArgumentException
- If the length of the arrays are different or zero;
-