Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/07/16 16:29:59 (9 years ago)
Author:
abeham
Message:

#2457: added standardization of features for recommendation and using log10 of the expected runtime for clustering

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Views/PerformanceModelingView.cs

    r13803 r13878  
    186186        var count = 0;
    187187        foreach (var pi in trainingSet) {
    188           var observed = Content.GetAlgorithmPerformance(pi);
     188          var observed = Content.GetAlgorithmPerformanceLog10(pi);
    189189          if (observed.Count == 0) continue;
    190190          progress.Status = pi.Name + "...";
    191191          var model = recommender.TrainModel(trainingSet.Where(x => x != pi).ToArray(), Content, features);
    192           var predictedTopN = model.GetRanking(pi).Take(topN).ToDictionary(x => x.Key, x => x.Value);
    193           var predicted = model.GetRanking(pi).ToDictionary(x => x.Key, x => x.Value);
     192          var predictedTopN = model.GetRanking(pi).Take(topN).ToDictionary(x => x.Key, x => Math.Log10(x.Value));
     193          var predicted = model.GetRanking(pi).ToDictionary(x => x.Key, x => Math.Log10(x.Value));
    194194          var ae = AbsoluteError(observed, predictedTopN);
    195195          if (!double.IsNaN(ae)) {
     
    240240        double actual;
    241241        if (!performance.TryGetValue(tuple.Key, out actual)) continue;
    242         if (double.IsInfinity(actual)) actual = int.MaxValue;
    243         error += Math.Abs(actual - tuple.Value);
     242        if (double.IsInfinity(actual)) actual = Math.Log10(int.MaxValue);
     243        error += Math.Abs(Math.Pow(10, actual) - Math.Pow(10, tuple.Value));
    244244        count++;
    245245      }
     
    253253        double actual;
    254254        if (!performance.TryGetValue(tuple.Key, out actual)) continue;
    255         if (double.IsInfinity(actual)) actual = int.MaxValue;
    256         error += Math.Abs(Math.Log10(actual) - Math.Log10(tuple.Value));
     255        if (double.IsInfinity(actual)) actual = Math.Log10(int.MaxValue);
     256        error += Math.Abs(actual - tuple.Value);
    257257        count++;
    258258      }
Note: See TracChangeset for help on using the changeset viewer.