Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/16/15 17:04:35 (9 years ago)
Author:
abeham
Message:

#2457, #2431: updated from trunk, worked on okb connection for downloading knowledge base

Location:
branches/PerformanceComparison
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/PerformanceComparison

    • Property svn:ignore
      •  

        old new  
        22*.suo
        33*.user
         4.git
         5.gitignore
  • branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/ExpertSystem.cs

    r12957 r13475  
    7171        algorithmInstances = value;
    7272        OnPropertyChanged("AlgorithmInstances");
     73        // TODO: Attach event handlers
    7374      }
    7475    }
     
    155156      var runCollection = sender as RunCollection;
    156157      if (runCollection != null && runCollection.UpdateOfRunsInProgress) return;
    157       UpdateInstanceMap();
    158158      UpdateSuggestions();
    159159    }
    160160
    161     private void UpdateInstanceMap() {
     161    public void UpdateInstanceMap() {
    162162      var flaValues = ProblemInstances.ResultNames
    163163                      .Where(x => x.StartsWith("Characteristic.")
     
    203203          } else instance.Results.Add("Projection.PCA2", new DoubleValue(y));
    204204
     205          instanceCounter++;
     206
    205207          var bkQuality = ((DoubleValue)instance.Parameters["BestKnownQuality"]).Value;
    206208          var maximization = ((BoolValue)instance.Parameters["Maximization"]).Value;
     209
     210          if (!algInstRunDict.ContainsKey(probInstanceName)) continue;
    207211          foreach (var kvp in algInstRunDict[probInstanceName]) {
    208212            var algInstanceName = kvp.Key;
    209             foreach (var run in kvp.Value) {
    210               // TODO: Things needs to be configurable here (table name, targets)
    211               foreach (var target in new[] { 1, 1.01, 1.05, 1.1, 1.2, 1.5 }) {
    212                 var result = ExpectedRuntimeHelper.CalculateErt(kvp.Value, "QualityPerEvaluations", bkQuality * target, maximization);
    213                 var resultName = algInstanceName + "@" + ((target - 1) * 100) + "%";
    214                 if (run.Results.TryGetValue(resultName, out item))
    215                   ((DoubleValue)item).Value = result.ExpectedRuntime;
    216                 else run.Results.Add(resultName, new DoubleValue(result.ExpectedRuntime));
    217               }
     213            // TODO: Things needs to be configurable here (table name, targets)
     214            foreach (var target in new[] { 1, 1.01, 1.05, 1.1, 1.2, 1.5 }) {
     215              var result = ExpectedRuntimeHelper.CalculateErt(kvp.Value, "QualityPerEvaluations", bkQuality * target, maximization);
     216              var resultName = algInstanceName + "@" + ((target - 1) * 100) + "%";
     217              if (instance.Results.TryGetValue(resultName, out item)) {
     218                ((DoubleValue)item).Value = Math.Log10(result.ExpectedRuntime);
     219              } else instance.Results.Add(resultName, new DoubleValue(Math.Log10(result.ExpectedRuntime)));
    218220            }
    219221          }
Note: See TracChangeset for help on using the changeset viewer.