Changeset 14691 for branches/PerformanceComparison/HeuristicLab.Analysis.FitnessLandscape/3.3/ProblemInstanceAnalysis/ProblemInstanceAnalyzer.cs
- Timestamp:
- 02/23/17 10:42:58 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PerformanceComparison/HeuristicLab.Analysis.FitnessLandscape/3.3/ProblemInstanceAnalysis/ProblemInstanceAnalyzer.cs
r14678 r14691 78 78 if (currentCharacteristics == null) return base.Apply(); 79 79 80 var order = Enumerable.Range(0, kbCharacteristics.Rows) 80 var means = kbCharacteristics.GetRow(kbCharacteristics.Rows - 2).ToArray(); 81 var stdevs = kbCharacteristics.GetRow(kbCharacteristics.Rows - 1).ToArray(); 82 83 for (var i = 0; i < means.Length; i++) { 84 currentCharacteristics[i] = (currentCharacteristics[i] - means[i]) / stdevs[i]; 85 } 86 87 var order = Enumerable.Range(0, kbCharacteristics.Rows - 2) 81 88 .Select(row => new { Row = row, MSE = kbCharacteristics.GetRow(row).Zip(currentCharacteristics, (a, b) => (a - b) * (a - b)).Average() }) 82 89 .OrderBy(x => x.MSE); 83 90 84 91 var instances = kbCharacteristics.RowNames.ToList(); 85 while (instances.Count < kbCharacteristics.Rows )92 while (instances.Count < kbCharacteristics.Rows - 2) 86 93 instances.Add(instances.Count.ToString(CultureInfo.CurrentCulture.NumberFormat)); 87 94
Note: See TracChangeset
for help on using the changeset viewer.