- Timestamp:
- 06/07/16 16:29:59 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Views/PerformanceModelingView.cs
r13803 r13878 186 186 var count = 0; 187 187 foreach (var pi in trainingSet) { 188 var observed = Content.GetAlgorithmPerformance (pi);188 var observed = Content.GetAlgorithmPerformanceLog10(pi); 189 189 if (observed.Count == 0) continue; 190 190 progress.Status = pi.Name + "..."; 191 191 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)); 194 194 var ae = AbsoluteError(observed, predictedTopN); 195 195 if (!double.IsNaN(ae)) { … … 240 240 double actual; 241 241 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)); 244 244 count++; 245 245 } … … 253 253 double actual; 254 254 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); 257 257 count++; 258 258 }
Note: See TracChangeset
for help on using the changeset viewer.