code: public VM validate(Iterator<Split> dataSplits, TrainingParameters trainingParameters) {
          AbstractModeler modeler = MLBuilder.create(trainingParameters, configuration);
  
          List<VM> validationMetricsList = new LinkedList<>();
          while (dataSplits.hasNext()) {
              Split s = dataSplits.next();
              Dataframe trainData = s.getTrain();
              Dataframe testData = s.getTest();
  
              modeler.fit(trainData);
              trainData.close();
  
              modeler.predict(testData);
              VM entrySample = ValidationMetrics.newInstance(vmClass, testData);
              testData.close();
  
              validationMetricsList.add(entrySample);
          }
          modeler.close();
  
          VM avgValidationMetrics = ValidationMetrics.newInstance(vmClass, validationMetricsList);
  
          return avgValidationMetrics;
      }
docs: Estimates the average validation metrics on the provided data splits.
  
  @param dataSplits
  @param trainingParameters
  @return