code: public static double[] toRegressionOutputVector(Iterable<MLRegressionRecord> data) {
          final Stream<MLRegressionRecord> stream = StreamSupport.stream(data.spliterator(), false);
          return stream.mapToDouble(MLRegressionRecord::getRegressionOutput).toArray();
      }
docs: Generates a vector of regression outputs for every record
  
  @param data
  @return