Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/23/16 12:57:27 (8 years ago)
Author:
gkronber
Message:

#2371: merged r14228, r14229 from trunk to stable

Location:
stable
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Problems.Instances.DataAnalysis

  • stable/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Vladislavleva/KotanchekFunction.cs

    r14193 r14305  
    2424using System.Linq;
    2525using HeuristicLab.Common;
     26using HeuristicLab.Random;
    2627
    2728namespace HeuristicLab.Problems.Instances.DataAnalysis {
     
    4748    protected override int TestPartitionEnd { get { return 100 + (45 * 45); } }
    4849
     50    public int Seed { get; private set; }
     51
     52    public KotanchekFunction() : this((int)DateTime.Now.Ticks) { }
     53
     54    public KotanchekFunction(int seed) : base() {
     55      Seed = seed;
     56    }
    4957    protected override List<List<double>> GenerateValues() {
    5058      List<List<double>> data = new List<List<double>>();
     
    5361      List<List<double>> testData = new List<List<double>>() { oneVariableTestData, oneVariableTestData };
    5462      var combinations = ValueGenerator.GenerateAllCombinationsOfValuesInLists(testData).ToList<IEnumerable<double>>();
     63      var rand = new MersenneTwister((uint)Seed);
     64
    5565      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    56         data.Add(ValueGenerator.GenerateUniformDistributedValues(100, 0.3, 4).ToList());
     66        data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), 100, 0.3, 4).ToList());
    5767        data[i].AddRange(combinations[i]);
    5868      }
  • stable/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Vladislavleva/RationalPolynomialThreeDimensional.cs

    r14186 r14305  
    2424using System.Linq;
    2525using HeuristicLab.Common;
     26using HeuristicLab.Random;
    2627
    2728namespace HeuristicLab.Problems.Instances.DataAnalysis {
     
    4647    protected override int TestPartitionStart { get { return 300; } }
    4748    protected override int TestPartitionEnd { get { return 300 + (15 * 12 * 15); } }
     49    public int Seed { get; private set; }
    4850
     51    public RationalPolynomialThreeDimensional() : this((int)DateTime.Now.Ticks) { }
     52
     53    public RationalPolynomialThreeDimensional(int seed) : base() {
     54      Seed = seed;
     55    }
    4956    protected override List<List<double>> GenerateValues() {
    5057      List<List<double>> data = new List<List<double>>();
    5158
    5259      int n = 300;
    53       data.Add(ValueGenerator.GenerateUniformDistributedValues(n, 0.05, 2).ToList());
    54       data.Add(ValueGenerator.GenerateUniformDistributedValues(n, 1, 2).ToList());
    55       data.Add(ValueGenerator.GenerateUniformDistributedValues(n, 0.05, 2).ToList());
     60      var rand = new MersenneTwister((uint)Seed);
     61      data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), n, 0.05, 2).ToList());
     62      data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), n, 1, 2).ToList());
     63      data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), n, 0.05, 2).ToList());
    5664
    5765      List<List<double>> testData = new List<List<double>>() {
  • stable/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Vladislavleva/RationalPolynomialTwoDimensional.cs

    r14186 r14305  
    2424using System.Linq;
    2525using HeuristicLab.Common;
     26using HeuristicLab.Random;
    2627
    2728namespace HeuristicLab.Problems.Instances.DataAnalysis {
     
    4748    protected override int TestPartitionEnd { get { return 50 + (34 * 34); } }
    4849
     50    public int Seed { get; private set; }
     51
     52    public RationalPolynomialTwoDimensional() : this((int)DateTime.Now.Ticks) { }
     53
     54    public RationalPolynomialTwoDimensional(int seed) : base() {
     55      Seed = seed;
     56    }
    4957    protected override List<List<double>> GenerateValues() {
    5058      List<List<double>> data = new List<List<double>>();
     
    5462      List<List<double>> testData = new List<List<double>>() { oneVariableTestData, oneVariableTestData };
    5563      var combinations = ValueGenerator.GenerateAllCombinationsOfValuesInLists(testData).ToList<IEnumerable<double>>();
     64      var rand = new MersenneTwister((uint)Seed);
    5665
    5766      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    58         data.Add(ValueGenerator.GenerateUniformDistributedValues(50, 0.05, 6.05).ToList());
     67        data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), 50, 0.05, 6.05).ToList());
    5968        data[i].AddRange(combinations[i]);
    6069      }
  • stable/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Vladislavleva/RippleFunction.cs

    r14186 r14305  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HeuristicLab.Random;
    2526
    2627namespace HeuristicLab.Problems.Instances.DataAnalysis {
     
    4546    protected override int TestPartitionStart { get { return 300; } }
    4647    protected override int TestPartitionEnd { get { return 300 + 1000; } }
     48    public int Seed { get; private set; }
    4749
     50    public RippleFunction() : this((int)DateTime.Now.Ticks) { }
     51
     52    public RippleFunction(int seed) : base() {
     53      Seed = seed;
     54    }
    4855    protected override List<List<double>> GenerateValues() {
    4956      List<List<double>> data = new List<List<double>>();
     57      var rand = new MersenneTwister((uint)Seed);
    5058      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    51         data.Add(ValueGenerator.GenerateUniformDistributedValues(300, 0.05, 6.05).ToList());
     59        data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), 300, 0.05, 6.05).ToList());
    5260      }
    5361
    5462      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    55         data[i].AddRange(ValueGenerator.GenerateUniformDistributedValues(1000, -0.25, 6.35));
     63        data[i].AddRange(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), 1000, -0.25, 6.35));
    5664      }
    5765
  • stable/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Vladislavleva/SineCosineFunction.cs

    r14186 r14305  
    2424using System.Linq;
    2525using HeuristicLab.Common;
     26using HeuristicLab.Random;
    2627
    2728namespace HeuristicLab.Problems.Instances.DataAnalysis {
     
    4647    protected override int TestPartitionStart { get { return 30; } }
    4748    protected override int TestPartitionEnd { get { return 30 + (306 * 306); } }
     49    public int Seed { get; private set; }
    4850
     51    public SineCosineFunction() : this((int)DateTime.Now.Ticks) { }
     52
     53    public SineCosineFunction(int seed) : base() {
     54      Seed = seed;
     55    }
    4956    protected override List<List<double>> GenerateValues() {
    5057      List<List<double>> data = new List<List<double>>();
     
    5360      var combinations = ValueGenerator.GenerateAllCombinationsOfValuesInLists(testData).ToList<IEnumerable<double>>();
    5461
     62      var rand = new MersenneTwister((uint)Seed);
    5563      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    56         data.Add(ValueGenerator.GenerateUniformDistributedValues(30, 0.1, 5.9).ToList());
     64        data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), 30, 0.1, 5.9).ToList());
    5765        data[i].AddRange(combinations[i]);
    5866      }
  • stable/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Vladislavleva/UnwrappedBallFunctionFiveDimensional.cs

    r14186 r14305  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HeuristicLab.Random;
    2526
    2627namespace HeuristicLab.Problems.Instances.DataAnalysis {
     
    4546    protected override int TestPartitionStart { get { return 1024; } }
    4647    protected override int TestPartitionEnd { get { return 6024; } }
     48    public int Seed { get; private set; }
    4749
     50    public UnwrappedBallFunctionFiveDimensional() : this((int)DateTime.Now.Ticks) { }
     51
     52    public UnwrappedBallFunctionFiveDimensional(int seed) : base() {
     53      Seed = seed;
     54    }
    4855    protected override List<List<double>> GenerateValues() {
    4956      List<List<double>> data = new List<List<double>>();
     57      var rand = new MersenneTwister((uint)Seed);
    5058      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    51         data.Add(ValueGenerator.GenerateUniformDistributedValues(1024, 0.05, 6.05).ToList());
    52         data[i].AddRange(ValueGenerator.GenerateUniformDistributedValues(5000, -0.25, 6.35));
     59        data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), 1024, 0.05, 6.05).ToList());
     60        data[i].AddRange(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), 5000, -0.25, 6.35));
    5361      }
    5462
  • stable/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Vladislavleva/VladislavlevaInstanceProvider.cs

    r14186 r14305  
    2222using System;
    2323using System.Collections.Generic;
     24using HeuristicLab.Random;
    2425
    2526namespace HeuristicLab.Problems.Instances.DataAnalysis {
     
    3839    }
    3940
     41    public int Seed { get; private set; }
     42
     43    public VladislavlevaInstanceProvider() : this((int)DateTime.Now.Ticks) { }
     44    public VladislavlevaInstanceProvider(int seed) : base() {
     45      Seed = seed;
     46    }
     47
    4048    public override IEnumerable<IDataDescriptor> GetDataDescriptors() {
    4149      List<IDataDescriptor> descriptorList = new List<IDataDescriptor>();
    42       descriptorList.Add(new KotanchekFunction());
     50      var rand = new MersenneTwister((uint)Seed);
     51      descriptorList.Add(new KotanchekFunction(rand.Next()));
    4352      descriptorList.Add(new SalutowiczFunctionOneDimensional());
    4453      descriptorList.Add(new SalutowiczFunctionTwoDimensional());
    45       descriptorList.Add(new UnwrappedBallFunctionFiveDimensional());
    46       descriptorList.Add(new RationalPolynomialThreeDimensional());
    47       descriptorList.Add(new SineCosineFunction());
    48       descriptorList.Add(new RippleFunction());
    49       descriptorList.Add(new RationalPolynomialTwoDimensional());
     54      descriptorList.Add(new UnwrappedBallFunctionFiveDimensional(rand.Next()));
     55      descriptorList.Add(new RationalPolynomialThreeDimensional(rand.Next()));
     56      descriptorList.Add(new SineCosineFunction(rand.Next()));
     57      descriptorList.Add(new RippleFunction(rand.Next()));
     58      descriptorList.Add(new RationalPolynomialTwoDimensional(rand.Next()));
    5059      return descriptorList;
    5160    }
Note: See TracChangeset for help on using the changeset viewer.