Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/26/16 00:02:05 (8 years ago)
Author:
abeham
Message:

#2457: worked on recommendation algorithms (x-validation)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem.Common/3.3/Recommenders/KNearestNeighborModel.cs

    r13791 r13794  
    2222using HeuristicLab.Collections;
    2323using HeuristicLab.Optimization;
    24 using System;
    2524using System.Collections.Generic;
    2625using System.Linq;
     
    4645    }
    4746
    48     public IEnumerable<Tuple<IAlgorithm, double>> GetRanking(IRun problemInstance) {
     47    public IEnumerable<KeyValuePair<IAlgorithm, double>> GetRanking(IRun problemInstance) {
    4948      var features = KnowledgeCenter.GetFeatures(performance.Keys.OrderBy(problemInstanceMap.GetBySecond).ToArray(), characteristics, medianValues);
    5049      var feature = KnowledgeCenter.GetFeatures(new [] { problemInstance }, characteristics, medianValues)[0];
     
    7069      return performances.Select(x => new { Alg = x.Key, Perf = x.Value.Average() })
    7170                         .OrderBy(x => x.Perf)
    72                          .Select(x => Tuple.Create(x.Alg, x.Perf));
     71                         .Select(x => new KeyValuePair<IAlgorithm, double>(x.Alg, x.Perf));
    7372    }
    7473  }
Note: See TracChangeset for help on using the changeset viewer.