code: public static double calculateScore(FlatDataList errorList) {
          double DWdeltasquare=0;
          double DWetsquare=0;
  
          int n = errorList.size();
          for(int i=0;i<n;++i) {
              Double error = errorList.getDouble(i);
              if(i>=1) {
                  Double errorPrevious = errorList.getDouble(i-1);
                  if(errorPrevious!=null) {
                      DWdeltasquare+=Math.pow(error - errorPrevious,2);        
                  }
              }
              DWetsquare+=error*error;
          }
          double DW=DWdeltasquare/DWetsquare;
  
          return DW;
      }
docs: Calculates DW score
  
  @param errorList
  @return