Package org.jamesii.asf.spdm.generators

Examples of org.jamesii.asf.spdm.generators.ConfigurationEntry


    int predCount = 0;
    Collections.shuffle(testTuples);

    for (int i = 0; i < testTuples.size() - 1; i++) {
      for (int j = i + 1; j < testTuples.size(); j++) {
        ConfigurationEntry entry1 =
            new ConfigurationEntry(testTuples.get(i).getConfiguration());
        ConfigurationEntry entry2 =
            new ConfigurationEntry(testTuples.get(j).getConfiguration());
        predCount++;
        errors +=
            calculateError(predictor, features, entry1, entry2,
                testTuples.get(i), testTuples.get(i + 1));
      }
View Full Code Here


   */
  private List<ConfigurationEntry> createConfigEntries(
      List<PerformanceTuple> tuples) {
    List<ConfigurationEntry> result = new ArrayList<>();
    for (PerformanceTuple tuple : tuples) {
      result.add(new ConfigurationEntry(tuple.getConfiguration()));
    }
    return result;
  }
View Full Code Here

  protected <T extends PerformanceTuple> Pair<Double, Integer> calculateError(
      Features features, List<T> testTuples, IPerformancePredictor predictor) {
    double errors = 0;
    for (PerformanceTuple testTuple : testTuples) {
      errors +=
          comparePrediction(predictor, features, new ConfigurationEntry(
              testTuple.getConfiguration()), testTuple);
    }

    return new Pair<>(errors, testTuples.size());
  }
View Full Code Here

TOP

Related Classes of org.jamesii.asf.spdm.generators.ConfigurationEntry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.