Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/08/14 20:02:59 (10 years ago)
Author:
mkommend
Message:

#2171: Merged r10601:r10607, r10653, r11075, r11076, r11077, r11080, r11081 into stable.

Location:
stable
Files:
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • stable

    • Property svn:ignore
      •  

        old new  
        88FxCopResults.txt
        99Google.ProtocolBuffers-0.9.1.dll
         10Google.ProtocolBuffers-2.4.1.473.dll
        1011HeuristicLab 3.3.5.1.ReSharper.user
        1112HeuristicLab 3.3.6.0.ReSharper.user
        1213HeuristicLab.4.5.resharper.user
        1314HeuristicLab.ExtLibs.6.0.ReSharper.user
         15HeuristicLab.Scripting.Development
        1416HeuristicLab.resharper.user
        1517ProtoGen.exe
         
        1719_ReSharper.HeuristicLab
        1820_ReSharper.HeuristicLab 3.3
         21_ReSharper.HeuristicLab 3.3 Tests
        1922_ReSharper.HeuristicLab.ExtLibs
        2023bin
        2124protoc.exe
        22 _ReSharper.HeuristicLab 3.3 Tests
        23 Google.ProtocolBuffers-2.4.1.473.dll
    • Property svn:mergeinfo changed
      /trunk/sourcesmerged: 10601-10607,​10653,​11075-11077,​11080-11081
  • stable/HeuristicLab.Problems.ParameterOptimization/3.3/BestSolutionAnalyzer.cs

    r10594 r11151  
    9595      DoubleValue bestKnownQuality = BestKnownQualityParameter.ActualValue;
    9696
    97       int ind = -1;
    98       if (!max) ind = qualities.Select((x, index) => new { index, x.Value }).OrderBy(x => x.Value).First().index;
    99       else ind = qualities.Select((x, index) => new { index, x.Value }).OrderByDescending(x => x.Value).First().index;
     97      int indexOfBest = -1;
     98      if (!max) indexOfBest = qualities.Select((x, index) => new { index, x.Value }).OrderBy(x => x.Value).First().index;
     99      else indexOfBest = qualities.Select((x, index) => new { index, x.Value }).OrderByDescending(x => x.Value).First().index;
    100100
    101       var bestQuality = qualities[ind].Value;
    102       var bestParameterVector = (RealVector)parameterVectors[ind].Clone();
     101      var bestQuality = qualities[indexOfBest].Value;
     102      var bestParameterVector = (RealVector)parameterVectors[indexOfBest].Clone();
    103103
    104104      if (BestQualityParameter.ActualValue == null) {
     
    124124
    125125      //update best known quality
    126       if (bestKnownQuality == null || max && bestQuality > bestKnownQuality.Value
     126      if (bestKnownQuality == null
     127        || max && bestQuality > bestKnownQuality.Value
    127128        || !max && bestQuality < bestKnownQuality.Value) {
    128129        BestKnownQualityParameter.ActualValue = new DoubleValue(bestQuality);
  • stable/HeuristicLab.Problems.ParameterOptimization/3.3/BestSolutionsAnalyzer.cs

    r10594 r11151  
    121121      var bestSolutions = (ItemSet<DoubleArray>)results[BestSolutionsResultName].Value;
    122122      //clear best solutions if new found quality is better than the existing one
    123       if (max && bestQuality > previousBestQuality
    124           || !max && bestQuality < previousBestQuality)
     123      if (max && bestQuality > previousBestQuality || !max && bestQuality < previousBestQuality)
    125124        bestSolutions.Clear();
    126125
     
    134133        }
    135134      }
    136       PreviousBestQualityParameter.ActualValue = (DoubleValue)BestQualityParameter.ActualValue.Clone();
    137135
     136      //update best quality
     137      if (max && bestQuality >= BestQualityParameter.ActualValue.Value
     138          || !max && bestQuality <= BestQualityParameter.ActualValue.Value) {
     139        BestQualityParameter.ActualValue.Value = bestQuality;
     140      }
    138141      //update best known quality
    139142      if (bestKnownQuality == null || max && bestQuality > bestKnownQuality.Value
     
    141144        BestKnownQualityParameter.ActualValue = new DoubleValue(bestQuality);
    142145      }
     146      PreviousBestQualityParameter.ActualValue = (DoubleValue)BestQualityParameter.ActualValue.Clone();
    143147
    144148      return base.Apply();
     
    156160    public int GetHashCode(DoubleArray obj) {
    157161      if (obj == null) return 0;
    158       return obj.Aggregate(23, (current, item) => current ^ (int)item);
     162      return (int)obj.Aggregate(23L, (current, item) => current ^ System.BitConverter.DoubleToInt64Bits(item));
    159163    }
    160164  }
  • stable/HeuristicLab.Problems.ParameterOptimization/3.3/ParameterOptimizationProblem.cs

    r10594 r11151  
    9494      : base(evaluator, new UniformRandomRealVectorCreator()) {
    9595      Parameters.Add(new FixedValueParameter<IntValue>(ProblemSizeParameterName, "The dimension of the parameter vector that is to be optimized.", new IntValue(1)));
    96       Parameters.Add(new ValueParameter<DoubleMatrix>(BoundsParameterName, "The bounds for each dimension of the parameter vector. If fewer bounds are", new DoubleMatrix(new double[,] { { 0, 100 } }, new string[] { "LowerBound", "UpperBound" })));
     96      Parameters.Add(new ValueParameter<DoubleMatrix>(BoundsParameterName, "The bounds for each dimension of the parameter vector. If the number of bounds is smaller than the problem size then the bounds are reused in a cyclic manner.", new DoubleMatrix(new double[,] { { 0, 100 } }, new string[] { "LowerBound", "UpperBound" })));
    9797      Parameters.Add(new ValueParameter<StringArray>(ParameterNamesParameterName, "The element names which are used to calculate the quality of a parameter vector.", new StringArray(new string[] { "Parameter0" })));
    9898
     
    121121    protected override void OnEvaluatorChanged() {
    122122      base.OnEvaluatorChanged();
    123       strategyVectorManipulator.GeneralLearningRateParameter.Value = new DoubleValue(1.0 / Math.Sqrt(2 * ProblemSize));
    124       strategyVectorManipulator.LearningRateParameter.Value = new DoubleValue(1.0 / Math.Sqrt(2 * Math.Sqrt(ProblemSize)));
    125123      UpdateParameters();
    126124    }
     
    136134      Evaluator.ParameterNamesParameter.ActualName = ParameterNamesParameter.Name;
    137135
    138       var bestSolutionAnalyzer = Operators.OfType<BestSolutionAnalyzer>().First();
    139       bestSolutionAnalyzer.ParameterVectorParameter.ActualName = SolutionCreator.RealVectorParameter.ActualName;
    140       bestSolutionAnalyzer.ParameterNamesParameter.ActualName = ParameterNamesParameter.Name;
    141 
     136      foreach (var bestSolutionAnalyzer in Operators.OfType<BestSolutionAnalyzer>()) {
     137        bestSolutionAnalyzer.ParameterVectorParameter.ActualName = SolutionCreator.RealVectorParameter.ActualName;
     138        bestSolutionAnalyzer.ParameterNamesParameter.ActualName = ParameterNamesParameter.Name;
     139      }
    142140      Bounds = new DoubleMatrix(ProblemSize, 2);
    143141      Bounds.RowNames = ParameterNames;
     
    171169        if (string.IsNullOrEmpty(ParameterNames[i])) ParameterNames[i] = "Parameter" + i;
    172170      }
     171
     172      strategyVectorManipulator.GeneralLearningRateParameter.Value = new DoubleValue(1.0 / Math.Sqrt(2 * ProblemSize));
     173      strategyVectorManipulator.LearningRateParameter.Value = new DoubleValue(1.0 / Math.Sqrt(2 * Math.Sqrt(ProblemSize)));
    173174    }
    174175
  • stable/HeuristicLab.Problems.ParameterOptimization/3.3/Plugin.cs.frame

    r10594 r11151  
    2020#endregion
    2121
    22 using System;
    2322using HeuristicLab.PluginInfrastructure;
    24 using Microsoft.Win32;
    2523
    2624namespace HeuristicLab.Problems.ParameterOptimization {
  • stable/HeuristicLab.Problems.ParameterOptimization/3.3/Properties/AssemblyInfo.cs.frame

    r10605 r11151  
    2727// associated with an assembly.
    2828[assembly: AssemblyTitle("HeuristicLab.Problems.ParameterOptimization")]
    29 [assembly: AssemblyDescription("HeuristicLab problems for parameter optimization.")]
     29[assembly: AssemblyDescription("HeuristicLab problem for parameter optimization.")]
    3030[assembly: AssemblyConfiguration("")]
    3131[assembly: AssemblyCompany("")]
Note: See TracChangeset for help on using the changeset viewer.