Class Efficiencies


  • public class Efficiencies
    extends Object
    Author:
    od
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static double absDiff​(double[] obs, double[] sim)  
      static double absDiffLog​(double[] obs, double[] sim)  
      static double absVolumeError​(double[] obs, double[] sim)  
      static double dsGrad​(double[] obs, double[] sim)  
      static double ioa​(double[] obs, double[] sim, double pow)
      Calculates the index of agreement (ioa) between a test data set and a verification data set after Willmot & Wicks (1980).
      static double[] linearReg​(double[] xData, double[] yData)
      Calcs coefficients of linear regression between x, y data
      static double nashSutcliffe​(double[] obs, double[] sim, double pow)
      Calculates the efficiency between a test data set and a verification data set after Nash & Sutcliffe (1970).
      static double nashSutcliffeLog​(double[] obs, double[] sim, double pow)
      Calculates the efficiency between the log values of a test data set and a verification data set after Nash & Sutcliffe (1970).
      static double pbias​(double[] obs, double[] sim)  
      static double pearsonsCorrelatrion​(double[] obs, double[] sim)  
      static double rmse​(double[] obs, double[] sim)  
      static double runoffCoefficientError​(double[] obs, double[] sim, double[] precip)
      Runoff coefficient error ROCE
      static double transformedRmse​(double[] obs, double[] sim)
      transformedRootMeanSquareError TRMSE
    • Method Detail

      • nashSutcliffe

        public static double nashSutcliffe​(double[] obs,
                                           double[] sim,
                                           double pow)
        Calculates the efficiency between a test data set and a verification data set after Nash & Sutcliffe (1970). The efficiency is described as the proportion of the cumulated cubic deviation between both data sets and the cumulated cubic deviation between the verification data set and its mean value.
        Parameters:
        sim - the simulation data set
        obs - the validation (observed) data set
        pow - the power for the deviation terms
        Returns:
        the calculated efficiency or -9999 if an error occurs
      • nashSutcliffeLog

        public static double nashSutcliffeLog​(double[] obs,
                                              double[] sim,
                                              double pow)
        Calculates the efficiency between the log values of a test data set and a verification data set after Nash & Sutcliffe (1970). The efficiency is described as the proportion of the cumulated cubic deviation between both data sets and the cumulated cubic deviation between the verification data set and its mean value. If either prediction or validation has a value of <= 0 then the pair is ommited from the calculation and a message is put to system out.
        Parameters:
        sim - the simulation data set
        obs - the validation (observed) data set
        pow - the power for the deviation terms
        Returns:
        the calculated log_efficiency or -9999 if an error occurs
      • ioa

        public static double ioa​(double[] obs,
                                 double[] sim,
                                 double pow)
        Calculates the index of agreement (ioa) between a test data set and a verification data set after Willmot & Wicks (1980). The ioa is described as the proportion of the cumulated cubic deviation between both data sets and the squared sum of the absolute deviations between the verification data set and the test mean value and the test data set and its mean value.
        Parameters:
        sim - the test Data set
        obs - the verification data set
        pow - the power
        Returns:
        the calculated ioa or -9999 if an error occurs
      • linearReg

        public static double[] linearReg​(double[] xData,
                                         double[] yData)
        Calcs coefficients of linear regression between x, y data
        Parameters:
        xData - the independent data array (x)
        yData - the dependent data array (y)
        Returns:
        (intercept, gradient, r?)
      • dsGrad

        public static double dsGrad​(double[] obs,
                                    double[] sim)
        Parameters:
        prediction -
        validation -
        Returns:
      • absVolumeError

        public static double absVolumeError​(double[] obs,
                                            double[] sim)
        Parameters:
        prediction -
        validation -
        Returns:
      • pbias

        public static double pbias​(double[] obs,
                                   double[] sim)
        Parameters:
        prediction -
        validation -
        Returns:
      • rmse

        public static double rmse​(double[] obs,
                                  double[] sim)
        Parameters:
        prediction -
        validation -
        Returns:
      • absDiffLog

        public static double absDiffLog​(double[] obs,
                                        double[] sim)
        Parameters:
        validation -
        prediction -
        missVal -
        Returns:
      • absDiff

        public static double absDiff​(double[] obs,
                                     double[] sim)
        Parameters:
        validation -
        prediction -
        missVal -
        Returns:
      • pearsonsCorrelatrion

        public static double pearsonsCorrelatrion​(double[] obs,
                                                  double[] sim)
        Parameters:
        validation -
        prediction -
        missVal -
        Returns:
      • transformedRmse

        public static double transformedRmse​(double[] obs,
                                             double[] sim)
        transformedRootMeanSquareError TRMSE
        Parameters:
        obs -
        sim -
        Returns:
      • runoffCoefficientError

        public static double runoffCoefficientError​(double[] obs,
                                                    double[] sim,
                                                    double[] precip)
        Runoff coefficient error ROCE
        Parameters:
        obs -
        sim -
        precip -
        Returns: