code: public double[] normOne(double[] data) {
      double[] res = new double[data.length];
      double max = max(data);
      for (int i = 0; i < data.length; i++) {
        res[i] = data[i] / max;
      }
      return res;
    }
docs: Normalizes data in interval 0-1.
  
  @param data the dataset.
  @return normalized dataset.