Free cookie consent management tool by TermsFeed Policy Generator

Changeset 14228 for trunk


Ignore:
Timestamp:
08/02/16 18:09:47 (8 years ago)
Author:
gkronber
Message:

#2371: added constructors to allow specification of random seeds for randomly generated regression problem instances (primarily for unit tests)

Location:
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3
Files:
54 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/HeuristicLab.Problems.Instances.DataAnalysis-3.3.csproj

    r13939 r14228  
    172172    <Compile Include="Regression\Korns\KornsFunctionEleven.cs" />
    173173    <Compile Include="Regression\Korns\KornsFunctionFive.cs" />
    174     <Compile Include="Regression\Korns\KornsFunctionFiveteen.cs" />
     174    <Compile Include="Regression\Korns\KornsFunctionFifteen.cs" />
    175175    <Compile Include="Regression\Korns\KornsFunctionFour.cs" />
    176176    <Compile Include="Regression\Korns\KornsFunctionFourteen.cs" />
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/FeatureSelection/FeatureSelectionInstanceProvider.cs

    r14185 r14228  
    4141      get { return ""; }
    4242    }
     43    public int Seed { get; }
     44
     45    public FeatureSelectionInstanceProvider() : base() {
     46      Seed = (int)DateTime.Now.Ticks;
     47    }
     48
     49    public FeatureSelectionInstanceProvider(int seed) : base() {
     50      Seed = seed;
     51    }
     52
    4353
    4454    public override IEnumerable<IDataDescriptor> GetDataDescriptors() {
     
    4656      var pp = new double[] { 0.1, 0.25, 0.5 };
    4757      var noiseRatios = new double[] { 0.01, 0.05, 0.1, 0.2 };
    48       var mt = new MersenneTwister();
    49       var xGenerator = new NormalDistributedRandom(mt, 0, 1);
    50       var weightGenerator = new UniformDistributedRandom(mt, 0, 10);
     58      var rand = new MersenneTwister((uint)Seed); // use fixed seed for deterministic problem generation
     59
    5160      return (from size in sizes
    5261              from p in pp
    5362              from noiseRatio in noiseRatios
     63              let instanceSeed = rand.Next()
     64              let mt = new MersenneTwister((uint)instanceSeed)
     65              let xGenerator = new NormalDistributedRandom(mt, 0, 1)
     66              let weightGenerator = new UniformDistributedRandom(mt, 0, 10)
    5467              select new FeatureSelection(size, p, noiseRatio, xGenerator, weightGenerator))
    5568              .Cast<IDataDescriptor>()
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Friedman/FriedmanRandomFunctionInstanceProvider.cs

    r14110 r14228  
    4040      get { return "Friedman, Jerome H. 'Greedy function approximation: a gradient boosting machine.' Annals of statistics (2001): 1189-1232."; }
    4141    }
     42    public int Seed { get; }
     43
     44    public FriedmanRandomFunctionInstanceProvider() : base() {
     45    }
     46
     47    public FriedmanRandomFunctionInstanceProvider(int seed) : base() {
     48      Seed = seed;
     49    }
    4250
    4351    public override IEnumerable<IDataDescriptor> GetDataDescriptors() {
    4452      var numVariables = new int[] { 10, 25, 50, 100 };
    4553      var noiseRatios = new double[] { 0.01, 0.05, 0.1 };
    46       var rand = new System.Random(1234); // use fixed seed for deterministic problem generation
     54      var rand = new MersenneTwister((uint)Seed); // use fixed seed for deterministic problem generation
    4755      return (from size in numVariables
    4856              from noiseRatio in noiseRatios
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Keijzer/KeijzerFunctionEleven.cs

    r14185 r14228  
    2424using System.Linq;
    2525using HeuristicLab.Common;
     26using HeuristicLab.Random;
    2627
    2728namespace HeuristicLab.Problems.Instances.DataAnalysis {
     
    4748    protected override int TestPartitionStart { get { return 20; } }
    4849    protected override int TestPartitionEnd { get { return 20 + (601 * 601); } }
     50    public int Seed { get; }
    4951
     52    public KeijzerFunctionEleven() : this((int)System.DateTime.Now.Ticks) {
     53    }
     54    public KeijzerFunctionEleven(int seed) : base() {
     55      Seed = seed;
     56    }
    5057    protected override List<List<double>> GenerateValues() {
    5158      List<List<double>> data = new List<List<double>>();
     
    5461
    5562      var combinations = ValueGenerator.GenerateAllCombinationsOfValuesInLists(testData).ToList();
    56 
     63      var rand = new MersenneTwister((uint)Seed);
    5764      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    58         data.Add(ValueGenerator.GenerateUniformDistributedValues(20, -3, 3).ToList());
     65        data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), 20, -3, 3).ToList());
    5966        data[i].AddRange(combinations[i]);
    6067      }
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Keijzer/KeijzerFunctionFifteen.cs

    r14185 r14228  
    2424using System.Linq;
    2525using HeuristicLab.Common;
     26using HeuristicLab.Random;
    2627
    2728namespace HeuristicLab.Problems.Instances.DataAnalysis {
     
    4647    protected override int TestPartitionStart { get { return 20; } }
    4748    protected override int TestPartitionEnd { get { return 20 + (601 * 601); } }
     49    public int Seed { get; }
    4850
     51    public KeijzerFunctionFifteen() : this((int)System.DateTime.Now.Ticks) {
     52    }
     53    public KeijzerFunctionFifteen(int seed) : base() {
     54      Seed = seed;
     55    }
    4956    protected override List<List<double>> GenerateValues() {
    5057      List<List<double>> data = new List<List<double>>();
     
    5360
    5461      var combinations = ValueGenerator.GenerateAllCombinationsOfValuesInLists(testData).ToList();
     62      var rand = new MersenneTwister((uint)Seed);
    5563
    5664      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    57         data.Add(ValueGenerator.GenerateUniformDistributedValues(20, -3, 3).ToList());
     65        data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), 20, -3, 3).ToList());
    5866        data[i].AddRange(combinations[i]);
    5967      }
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Keijzer/KeijzerFunctionFive.cs

    r14185 r14228  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HeuristicLab.Random;
    2526
    2627namespace HeuristicLab.Problems.Instances.DataAnalysis {
     
    4546    protected override int TestPartitionStart { get { return 1000; } }
    4647    protected override int TestPartitionEnd { get { return 11000; } }
     48    public int Seed { get; }
    4749
     50    public KeijzerFunctionFive() : this((int)System.DateTime.Now.Ticks) {
     51    }
     52    public KeijzerFunctionFive(int seed) : base() {
     53      Seed = seed;
     54    }
    4855    protected override List<List<double>> GenerateValues() {
    4956      List<List<double>> data = new List<List<double>>();
    50       data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -1, 1).ToList());
    51       data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, 1, 2).ToList());
    52       data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -1, 1).ToList());
     57      var rand = new MersenneTwister((uint)Seed);
     58
     59      data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, -1, 1).ToList());
     60      data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 1, 2).ToList());
     61      data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, -1, 1).ToList());
    5362
    5463      double x, y, z;
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Keijzer/KeijzerFunctionFourteen.cs

    r14185 r14228  
    2424using System.Linq;
    2525using HeuristicLab.Common;
     26using HeuristicLab.Random;
    2627
    2728namespace HeuristicLab.Problems.Instances.DataAnalysis {
     
    4647    protected override int TestPartitionStart { get { return 20; } }
    4748    protected override int TestPartitionEnd { get { return 20 + (601 * 601); } }
     49    public int Seed { get; }
     50
     51    public KeijzerFunctionFourteen() : this((int)System.DateTime.Now.Ticks) {
     52    }
     53    public KeijzerFunctionFourteen(int seed) : base() {
     54      Seed = seed;
     55    }
     56
    4857
    4958    protected override List<List<double>> GenerateValues() {
    5059      List<List<double>> data = new List<List<double>>();
    51       List<double> oneVariableTestData = SequenceGenerator.GenerateSteps(-3, 3, 0.01m).Select(v => (double) v).ToList();
     60      List<double> oneVariableTestData = SequenceGenerator.GenerateSteps(-3, 3, 0.01m).Select(v => (double)v).ToList();
    5261      List<List<double>> testData = new List<List<double>>() { oneVariableTestData, oneVariableTestData };
    5362
    5463      var combinations = ValueGenerator.GenerateAllCombinationsOfValuesInLists(testData).ToList();
     64      var rand = new MersenneTwister((uint)Seed);
    5565
    5666      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    57         data.Add(ValueGenerator.GenerateUniformDistributedValues(20, -3, 3).ToList());
     67        data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), 20, -3, 3).ToList());
    5868        data[i].AddRange(combinations[i]);
    5969      }
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Keijzer/KeijzerFunctionTen.cs

    r14185 r14228  
    2424using System.Linq;
    2525using HeuristicLab.Common;
     26using HeuristicLab.Random;
    2627
    2728namespace HeuristicLab.Problems.Instances.DataAnalysis {
     
    4647    protected override int TestPartitionStart { get { return 100; } }
    4748    protected override int TestPartitionEnd { get { return 100 + (101 * 101); } }
     49    public int Seed { get; }
    4850
     51    public KeijzerFunctionTen() : this((int)System.DateTime.Now.Ticks) {
     52    }
     53    public KeijzerFunctionTen(int seed) : base() {
     54      Seed = seed;
     55    }
    4956    protected override List<List<double>> GenerateValues() {
    5057      List<List<double>> data = new List<List<double>>();
     
    5461
    5562      var combinations = ValueGenerator.GenerateAllCombinationsOfValuesInLists(testData).ToList<IEnumerable<double>>();
     63      var rand = new MersenneTwister((uint)Seed);
    5664      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    57         data.Add(ValueGenerator.GenerateUniformDistributedValues(100, 0, 1).ToList());
     65        data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), 100, 0, 1).ToList());
    5866        data[i].AddRange(combinations[i]);
    5967      }
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Keijzer/KeijzerFunctionThirteen.cs

    r14185 r14228  
    2424using System.Linq;
    2525using HeuristicLab.Common;
     26using HeuristicLab.Random;
    2627
    2728namespace HeuristicLab.Problems.Instances.DataAnalysis {
     
    4647    protected override int TestPartitionStart { get { return 20; } }
    4748    protected override int TestPartitionEnd { get { return 20 + (601 * 601); } }
     49    public int Seed { get; }
    4850
     51    public KeijzerFunctionThirteen() : this((int)System.DateTime.Now.Ticks) {
     52    }
     53    public KeijzerFunctionThirteen(int seed) : base() {
     54      Seed = seed;
     55    }
    4956    protected override List<List<double>> GenerateValues() {
    5057      List<List<double>> data = new List<List<double>>();
     
    5360
    5461      var combinations = ValueGenerator.GenerateAllCombinationsOfValuesInLists(testData).ToList();
     62      var rand = new MersenneTwister((uint)Seed);
    5563
    5664      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    57         data.Add(ValueGenerator.GenerateUniformDistributedValues(20, -3, 3).ToList());
     65        data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), 20, -3, 3).ToList());
    5866        data[i].AddRange(combinations[i]);
    5967      }
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Keijzer/KeijzerFunctionTwelve.cs

    r14185 r14228  
    2424using System.Linq;
    2525using HeuristicLab.Common;
     26using HeuristicLab.Random;
    2627
    2728namespace HeuristicLab.Problems.Instances.DataAnalysis {
     
    4647    protected override int TestPartitionStart { get { return 20; } }
    4748    protected override int TestPartitionEnd { get { return 20 + (601 * 601); } }
     49    public int Seed { get; }
    4850
     51    public KeijzerFunctionTwelve() : this((int)System.DateTime.Now.Ticks) {
     52    }
     53    public KeijzerFunctionTwelve(int seed) : base() {
     54      Seed = seed;
     55    }
    4956    protected override List<List<double>> GenerateValues() {
    5057      List<List<double>> data = new List<List<double>>();
     
    5360
    5461      var combinations = ValueGenerator.GenerateAllCombinationsOfValuesInLists(testData).ToList();
     62      var rand = new MersenneTwister((uint)Seed);
    5563
    5664      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    57         data.Add(ValueGenerator.GenerateUniformDistributedValues(20, -3, 3).ToList());
     65        data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), 20, -3, 3).ToList());
    5866        data[i].AddRange(combinations[i]);
    5967      }
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Keijzer/KeijzerInstanceProvider.cs

    r14185 r14228  
    2222using System;
    2323using System.Collections.Generic;
     24using HeuristicLab.Random;
    2425
    2526namespace HeuristicLab.Problems.Instances.DataAnalysis {
     
    3738      get { return "McDermott et al., 2012 \"Genetic Programming Needs Better Benchmarks\", in Proc. of GECCO 2012."; }
    3839    }
     40    public int Seed { get; }
     41
     42    public KeijzerInstanceProvider() : this((int)System.DateTime.Now.Ticks) {
     43    }
     44    public KeijzerInstanceProvider(int seed) : base() {
     45      Seed = seed;
     46    }
    3947
    4048    public override IEnumerable<IDataDescriptor> GetDataDescriptors() {
    4149      List<IDataDescriptor> descriptorList = new List<IDataDescriptor>();
     50      var rand = new MersenneTwister((uint)Seed);
    4251      descriptorList.Add(new KeijzerFunctionOne());
    4352      descriptorList.Add(new KeijzerFunctionTwo());
    4453      descriptorList.Add(new KeijzerFunctionThree());
    4554      descriptorList.Add(new KeijzerFunctionFour());
    46       descriptorList.Add(new KeijzerFunctionFive());
     55      descriptorList.Add(new KeijzerFunctionFive(rand.Next()));
    4756      descriptorList.Add(new KeijzerFunctionSix());
    4857      descriptorList.Add(new KeijzerFunctionSeven());
    4958      descriptorList.Add(new KeijzerFunctionEight());
    5059      descriptorList.Add(new KeijzerFunctionNine());
    51       descriptorList.Add(new KeijzerFunctionTen());
    52       descriptorList.Add(new KeijzerFunctionEleven());
    53       descriptorList.Add(new KeijzerFunctionTwelve());
    54       descriptorList.Add(new KeijzerFunctionThirteen());
    55       descriptorList.Add(new KeijzerFunctionFourteen());
    56       descriptorList.Add(new KeijzerFunctionFifteen());
     60      descriptorList.Add(new KeijzerFunctionTen(rand.Next()));
     61      descriptorList.Add(new KeijzerFunctionEleven(rand.Next()));
     62      descriptorList.Add(new KeijzerFunctionTwelve(rand.Next()));
     63      descriptorList.Add(new KeijzerFunctionThirteen(rand.Next()));
     64      descriptorList.Add(new KeijzerFunctionFourteen(rand.Next()));
     65      descriptorList.Add(new KeijzerFunctionFifteen(rand.Next()));
    5766      return descriptorList;
    5867    }
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Korns/KornsFunctionEight.cs

    r14185 r14228  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HeuristicLab.Random;
    2526
    2627namespace HeuristicLab.Problems.Instances.DataAnalysis {
     
    5152    protected override int TestPartitionEnd { get { return 20000; } }
    5253
     54    public int Seed { get; }
     55
     56    public KornsFunctionEight() : this((int)System.DateTime.Now.Ticks) {
     57    }
     58    public KornsFunctionEight(int seed) : base() {
     59      Seed = seed;
     60    }
     61
    5362    protected override List<List<double>> GenerateValues() {
    5463      List<List<double>> data = new List<List<double>>();
    55       data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, 0, 50).ToList()); // note: range is only [0,50] to prevent NaN values (deviates from gp benchmark paper)
    56       data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50).ToList());
    57       data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50).ToList());
    58       data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, 0, 50).ToList()); // note: range is only [0,50] to prevent NaN values (deviates from gp benchmark paper)
    59       data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, 0, 50).ToList()); // note: range is only [0,50] to prevent NaN values (deviates from gp benchmark paper)
     64      var rand = new MersenneTwister((uint)Seed);
     65
     66      data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 0, 50).ToList()); // note: range is only [0,50] to prevent NaN values (deviates from gp benchmark paper)
     67      data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, -50, 50).ToList());
     68      data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, -50, 50).ToList());
     69      data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 0, 50).ToList()); // note: range is only [0,50] to prevent NaN values (deviates from gp benchmark paper)
     70      data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 0, 50).ToList()); // note: range is only [0,50] to prevent NaN values (deviates from gp benchmark paper)
    6071
    6172      double x0, x3, x4;
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Korns/KornsFunctionEleven.cs

    r14185 r14228  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HeuristicLab.Random;
    2526
    2627namespace HeuristicLab.Problems.Instances.DataAnalysis {
     
    4950    protected override int TestPartitionStart { get { return 10000; } }
    5051    protected override int TestPartitionEnd { get { return 20000; } }
     52    public int Seed { get; }
    5153
     54    public KornsFunctionEleven() : this((int)System.DateTime.Now.Ticks) {
     55    }
     56    public KornsFunctionEleven(int seed) : base() {
     57      Seed = seed;
     58    }
    5259    protected override List<List<double>> GenerateValues() {
    5360      List<List<double>> data = new List<List<double>>();
     61      var rand = new MersenneTwister((uint)Seed);
     62
    5463      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    55         data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50).ToList());
     64        data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, -50, 50).ToList());
    5665      }
    5766
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Korns/KornsFunctionFifteen.cs

    r14227 r14228  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HeuristicLab.Random;
    2526
    2627namespace HeuristicLab.Problems.Instances.DataAnalysis {
    27   public class KornsFunctionFiveteen : ArtificialRegressionDataDescriptor {
     28  public class KornsFunctionFifteen : ArtificialRegressionDataDescriptor {
    2829
    2930    public override string Name { get { return "Korns 15 y = 12.0 - (6.0 * ((tan(X0) / exp(X1)) * (ln(X2) - tan(X3))))"; } }
     
    5051    protected override int TestPartitionStart { get { return 10000; } }
    5152    protected override int TestPartitionEnd { get { return 20000; } }
     53    public int Seed { get; }
    5254
     55
     56    public KornsFunctionFifteen() : this((int)System.DateTime.Now.Ticks) {
     57    }
     58    public KornsFunctionFifteen(int seed) : base() {
     59      Seed = seed;
     60    }
    5361    protected override List<List<double>> GenerateValues() {
    5462      List<List<double>> data = new List<List<double>>();
    55       data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50).ToList());
    56       data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50).ToList());
    57       data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, 0, 50).ToList()); // note: range is only [0,50] to prevent NaN values (deviates from gp benchmark paper)
    58       data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50).ToList());
    59       data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50).ToList());
     63      var rand = new MersenneTwister((uint)Seed);
     64
     65      data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, -50, 50).ToList());
     66      data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, -50, 50).ToList());
     67      data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 0, 50).ToList()); // note: range is only [0,50] to prevent NaN values (deviates from gp benchmark paper)
     68      data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, -50, 50).ToList());
     69      data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, -50, 50).ToList());
    6070
    6171      double x0, x1, x2, x3;
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Korns/KornsFunctionFive.cs

    r14185 r14228  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HeuristicLab.Random;
    2526
    2627namespace HeuristicLab.Problems.Instances.DataAnalysis {
     
    5051    protected override int TestPartitionStart { get { return 10000; } }
    5152    protected override int TestPartitionEnd { get { return 20000; } }
     53    public int Seed { get; }
    5254
     55    public KornsFunctionFive() : this((int)System.DateTime.Now.Ticks) {
     56    }
     57    public KornsFunctionFive(int seed) : base() {
     58      Seed = seed;
     59    }
    5360    protected override List<List<double>> GenerateValues() {
    5461      List<List<double>> data = new List<List<double>>();
    55       data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50).ToList());
    56       data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50).ToList());
    57       data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50).ToList());
    58       data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50).ToList());
    59       data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, 0, 50).ToList()); // note: range is only [0,50] to prevent NaN values (deviates from gp benchmark paper)
     62      var rand = new MersenneTwister((uint)Seed);
     63
     64      data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, -50, 50).ToList());
     65      data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, -50, 50).ToList());
     66      data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, -50, 50).ToList());
     67      data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, -50, 50).ToList());
     68      data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 0, 50).ToList()); // note: range is only [0,50] to prevent NaN values (deviates from gp benchmark paper)
    6069
    6170      double x4;
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Korns/KornsFunctionFour.cs

    r14185 r14228  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HeuristicLab.Random;
    2526
    2627namespace HeuristicLab.Problems.Instances.DataAnalysis {
     
    5051    protected override int TestPartitionEnd { get { return 20000; } }
    5152
     53    public int Seed { get; }
    5254
     55    public KornsFunctionFour() : this((int)System.DateTime.Now.Ticks) {
     56    }
     57    public KornsFunctionFour(int seed) : base() {
     58      Seed = seed;
     59    }
    5360    protected override List<List<double>> GenerateValues() {
    5461      List<List<double>> data = new List<List<double>>();
     62      var rand = new MersenneTwister((uint)Seed);
    5563      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    56         data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50).ToList());
     64        data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, -50, 50).ToList());
    5765      }
    5866
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Korns/KornsFunctionFourteen.cs

    r14185 r14228  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HeuristicLab.Random;
    2526
    2627namespace HeuristicLab.Problems.Instances.DataAnalysis {
     
    4950    protected override int TestPartitionStart { get { return 10000; } }
    5051    protected override int TestPartitionEnd { get { return 20000; } }
     52    public int Seed { get; }
    5153
     54    public KornsFunctionFourteen() : this((int)System.DateTime.Now.Ticks) {
     55    }
     56    public KornsFunctionFourteen(int seed) : base() {
     57      Seed = seed;
     58    }
    5259    protected override List<List<double>> GenerateValues() {
    5360      List<List<double>> data = new List<List<double>>();
     61      var rand = new MersenneTwister((uint)Seed);
    5462      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    55         data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50).ToList());
     63        data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, -50, 50).ToList());
    5664      }
    5765
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Korns/KornsFunctionNine.cs

    r14185 r14228  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HeuristicLab.Random;
    2526
    2627namespace HeuristicLab.Problems.Instances.DataAnalysis {
     
    5152    protected override int TestPartitionStart { get { return 10000; } }
    5253    protected override int TestPartitionEnd { get { return 20000; } }
     54    public int Seed { get; }
    5355
     56    public KornsFunctionNine() : this((int)System.DateTime.Now.Ticks) {
     57    }
     58    public KornsFunctionNine(int seed) : base() {
     59      Seed = seed;
     60    }
    5461    protected override List<List<double>> GenerateValues() {
    5562      List<List<double>> data = new List<List<double>>();
    56       data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, 0, 50).ToList()); // note: range is only [0,50] to prevent NaN values (deviates from gp benchmark paper)
    57       data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, 0, 50).ToList()); // note: range is only [0,50] to prevent NaN values (deviates from gp benchmark paper)
    58       data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50).ToList());
    59       data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50).ToList());
    60       data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50).ToList());
     63      var rand = new MersenneTwister((uint)Seed);
     64
     65      data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 0, 50).ToList()); // note: range is only [0,50] to prevent NaN values (deviates from gp benchmark paper)
     66      data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 0, 50).ToList()); // note: range is only [0,50] to prevent NaN values (deviates from gp benchmark paper)
     67      data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, -50, 50).ToList());
     68      data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, -50, 50).ToList());
     69      data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, -50, 50).ToList());
    6170
    6271      double x0, x1, x2, x3;
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Korns/KornsFunctionOne.cs

    r14185 r14228  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HeuristicLab.Random;
    2526
    2627namespace HeuristicLab.Problems.Instances.DataAnalysis {
     
    5051    protected override int TestPartitionStart { get { return 10000; } }
    5152    protected override int TestPartitionEnd { get { return 20000; } }
     53    public int Seed { get; }
    5254
     55    public KornsFunctionOne() : this((int)System.DateTime.Now.Ticks) {
     56    }
     57    public KornsFunctionOne(int seed) : base() {
     58      Seed = seed;
     59    }
    5360    protected override List<List<double>> GenerateValues() {
    5461      List<List<double>> data = new List<List<double>>();
     62      var rand = new MersenneTwister((uint)Seed);
     63
    5564      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    56         data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50).ToList());
     65        data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, -50, 50).ToList());
    5766      }
    5867
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Korns/KornsFunctionSeven.cs

    r14185 r14228  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HeuristicLab.Random;
    2526
    2627namespace HeuristicLab.Problems.Instances.DataAnalysis {
     
    5051    protected override int TestPartitionStart { get { return 10000; } }
    5152    protected override int TestPartitionEnd { get { return 20000; } }
     53    public int Seed { get; }
    5254
     55    public KornsFunctionSeven() : this((int)System.DateTime.Now.Ticks) {
     56    }
     57    public KornsFunctionSeven(int seed) : base() {
     58      Seed = seed;
     59    }
    5360    protected override List<List<double>> GenerateValues() {
    5461      List<List<double>> data = new List<List<double>>();
    55       data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50).ToList());
    56       data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50).ToList());
    57       data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50).ToList());
    58       data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50).ToList());
    59       data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50).ToList());
     62      var rand = new MersenneTwister((uint)Seed);
     63
     64      for (int i = 0; i < 5; i++)
     65        data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, -50, 50).ToList());
    6066
    6167      double x0;
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Korns/KornsFunctionSix.cs

    r14185 r14228  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HeuristicLab.Random;
    2526
    2627namespace HeuristicLab.Problems.Instances.DataAnalysis {
     
    5051    protected override int TestPartitionStart { get { return 10000; } }
    5152    protected override int TestPartitionEnd { get { return 20000; } }
     53    public int Seed { get; }
    5254
     55    public KornsFunctionSix() : this((int)System.DateTime.Now.Ticks) {
     56    }
     57    public KornsFunctionSix(int seed) : base() {
     58      Seed = seed;
     59    }
    5360    protected override List<List<double>> GenerateValues() {
    5461      List<List<double>> data = new List<List<double>>();
    55       data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, 0, 50).ToList()); // note: range is only [0,50] to prevent NaN values (deviates from gp benchmark paper)
    56       data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50).ToList());
    57       data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50).ToList());
    58       data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50).ToList());
    59       data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50).ToList());
     62      var rand = new MersenneTwister((uint)Seed);
     63
     64      data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 0, 50).ToList()); // note: range is only [0,50] to prevent NaN values (deviates from gp benchmark paper)
     65      data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, -50, 50).ToList());
     66      data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, -50, 50).ToList());
     67      data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, -50, 50).ToList());
     68      data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, -50, 50).ToList());
    6069
    6170      double x0;
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Korns/KornsFunctionTen.cs

    r14185 r14228  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HeuristicLab.Random;
    2526
    2627namespace HeuristicLab.Problems.Instances.DataAnalysis {
     
    4950    protected override int TestPartitionStart { get { return 10000; } }
    5051    protected override int TestPartitionEnd { get { return 20000; } }
     52    public int Seed { get; }
    5153
     54    public KornsFunctionTen() : this((int)System.DateTime.Now.Ticks) {
     55    }
     56    public KornsFunctionTen(int seed) : base() {
     57      Seed = seed;
     58    }
    5259    protected override List<List<double>> GenerateValues() {
    5360      List<List<double>> data = new List<List<double>>();
     61      var rand = new MersenneTwister((uint)Seed);
     62
    5463      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    55         data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50).ToList());
     64        data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, -50, 50).ToList());
    5665      }
    5766
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Korns/KornsFunctionThirteen.cs

    r14185 r14228  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HeuristicLab.Random;
    2526
    2627namespace HeuristicLab.Problems.Instances.DataAnalysis {
     
    4950    protected override int TestPartitionStart { get { return 10000; } }
    5051    protected override int TestPartitionEnd { get { return 20000; } }
     52    public int Seed { get; }
    5153
     54    public KornsFunctionThirteen() : this((int)System.DateTime.Now.Ticks) {
     55    }
     56    public KornsFunctionThirteen(int seed) : base() {
     57      Seed = seed;
     58    }
    5259    protected override List<List<double>> GenerateValues() {
    5360      List<List<double>> data = new List<List<double>>();
     61      var rand = new MersenneTwister((uint)Seed);
     62
    5463      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    55         data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50).ToList());
     64        data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, -50, 50).ToList());
    5665      }
    5766
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Korns/KornsFunctionThree.cs

    r14185 r14228  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HeuristicLab.Random;
    2526
    2627namespace HeuristicLab.Problems.Instances.DataAnalysis {
     
    4950    protected override int TestPartitionStart { get { return 10000; } }
    5051    protected override int TestPartitionEnd { get { return 20000; } }
     52    public int Seed { get; }
    5153
     54    public KornsFunctionThree() : this((int)System.DateTime.Now.Ticks) {
     55    }
     56    public KornsFunctionThree(int seed) : base() {
     57      Seed = seed;
     58    }
    5259    protected override List<List<double>> GenerateValues() {
    5360      List<List<double>> data = new List<List<double>>();
     61      var rand = new MersenneTwister((uint)Seed);
    5462      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    55         data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50).ToList());
     63        data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, -50, 50).ToList());
    5664      }
    5765
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Korns/KornsFunctionTwelve.cs

    r14185 r14228  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HeuristicLab.Random;
    2526
    2627namespace HeuristicLab.Problems.Instances.DataAnalysis {
     
    4950    protected override int TestPartitionStart { get { return 10000; } }
    5051    protected override int TestPartitionEnd { get { return 20000; } }
     52    public int Seed { get; }
    5153
     54    public KornsFunctionTwelve() : this((int)System.DateTime.Now.Ticks) {
     55    }
     56    public KornsFunctionTwelve(int seed) : base() {
     57      Seed = seed;
     58    }
    5259    protected override List<List<double>> GenerateValues() {
    5360      List<List<double>> data = new List<List<double>>();
     61      var rand = new MersenneTwister((uint)Seed);
     62
    5463      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    55         data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50).ToList());
     64        data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, -50, 50).ToList());
    5665      }
    5766
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Korns/KornsFunctionTwo.cs

    r14185 r14228  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HeuristicLab.Random;
    2526
    2627namespace HeuristicLab.Problems.Instances.DataAnalysis {
     
    4950    protected override int TestPartitionStart { get { return 10000; } }
    5051    protected override int TestPartitionEnd { get { return 20000; } }
     52    public int Seed { get; }
    5153
     54    public KornsFunctionTwo() : this((int)System.DateTime.Now.Ticks) {
     55    }
     56    public KornsFunctionTwo(int seed) : base() {
     57      Seed = seed;
     58    }
    5259    protected override List<List<double>> GenerateValues() {
    5360      List<List<double>> data = new List<List<double>>();
     61      var rand = new MersenneTwister((uint)Seed);
     62
    5463      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    55         data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -50, 50).ToList());
     64        data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, -50, 50).ToList());
    5665      }
    5766
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Korns/KornsInstanceProvider.cs

    r14185 r14228  
    2222using System;
    2323using System.Collections.Generic;
     24using HeuristicLab.Random;
    2425
    2526namespace HeuristicLab.Problems.Instances.DataAnalysis {
     
    3738      get { return "McDermott et al., 2012 \"Genetic Programming Needs Better Benchmarks\", in Proc. of GECCO 2012."; }
    3839    }
     40    public int Seed { get; }
     41    public KornsInstanceProvider() : this((int)System.DateTime.Now.Ticks) { }
     42    public KornsInstanceProvider(int seed) : base() {
     43      Seed = seed;
     44    }
    3945
    4046    public override IEnumerable<IDataDescriptor> GetDataDescriptors() {
    4147      List<IDataDescriptor> descriptorList = new List<IDataDescriptor>();
    42       descriptorList.Add(new KornsFunctionOne());
    43       descriptorList.Add(new KornsFunctionTwo());
    44       descriptorList.Add(new KornsFunctionThree());
    45       descriptorList.Add(new KornsFunctionFour());
    46       descriptorList.Add(new KornsFunctionFive());
    47       descriptorList.Add(new KornsFunctionSix());
    48       descriptorList.Add(new KornsFunctionSeven());
    49       descriptorList.Add(new KornsFunctionEight());
    50       descriptorList.Add(new KornsFunctionNine());
    51       descriptorList.Add(new KornsFunctionTen());
    52       descriptorList.Add(new KornsFunctionEleven());
    53       descriptorList.Add(new KornsFunctionTwelve());
    54       descriptorList.Add(new KornsFunctionThirteen());
    55       descriptorList.Add(new KornsFunctionFourteen());
    56       descriptorList.Add(new KornsFunctionFiveteen());
     48      var rand = new MersenneTwister((uint)Seed);
     49      descriptorList.Add(new KornsFunctionOne(rand.Next()));
     50      descriptorList.Add(new KornsFunctionTwo(rand.Next()));
     51      descriptorList.Add(new KornsFunctionThree(rand.Next()));
     52      descriptorList.Add(new KornsFunctionFour(rand.Next()));
     53      descriptorList.Add(new KornsFunctionFive(rand.Next()));
     54      descriptorList.Add(new KornsFunctionSix(rand.Next()));
     55      descriptorList.Add(new KornsFunctionSeven(rand.Next()));
     56      descriptorList.Add(new KornsFunctionEight(rand.Next()));
     57      descriptorList.Add(new KornsFunctionNine(rand.Next()));
     58      descriptorList.Add(new KornsFunctionTen(rand.Next()));
     59      descriptorList.Add(new KornsFunctionEleven(rand.Next()));
     60      descriptorList.Add(new KornsFunctionTwelve(rand.Next()));
     61      descriptorList.Add(new KornsFunctionThirteen(rand.Next()));
     62      descriptorList.Add(new KornsFunctionFourteen(rand.Next()));
     63      descriptorList.Add(new KornsFunctionFifteen(rand.Next()));
    5764      return descriptorList;
    5865    }
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Nguyen/NguyenFunctionEight.cs

    r14185 r14228  
    4646    protected override int TestPartitionEnd { get { return 520; } }
    4747
     48    public int Seed { get; }
     49
     50    public NguyenFunctionEight() : this((int)System.DateTime.Now.Ticks) { }
     51    public NguyenFunctionEight(int seed) : base() {
     52      Seed = seed;
     53    }
     54
    4855    protected override List<List<double>> GenerateValues() {
    4956      List<List<double>> data = new List<List<double>>();
    50       data.Add(ValueGenerator.GenerateUniformDistributedValues(520, 0, 4).ToList());
     57      data.Add(ValueGenerator.GenerateUniformDistributedValues(Seed, 520, 0, 4).ToList());
    5158
    5259      double x;
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Nguyen/NguyenFunctionEleven.cs

    r14185 r14228  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HeuristicLab.Random;
    2526
    2627namespace HeuristicLab.Problems.Instances.DataAnalysis {
     
    4546    protected override int TestPartitionStart { get { return 20; } }
    4647    protected override int TestPartitionEnd { get { return 1020; } }
     48    public int Seed { get; }
    4749
     50    public NguyenFunctionEleven() : this((int)System.DateTime.Now.Ticks) { }
     51    public NguyenFunctionEleven(int seed) : base() {
     52      Seed = seed;
     53    }
    4854    protected override List<List<double>> GenerateValues() {
    4955      List<List<double>> data = new List<List<double>>();
    50       data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, 0, 1).ToList());
    51       data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, 0, 1).ToList());
     56      var rand = new MersenneTwister((uint)Seed);
     57
     58      data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 0, 1).ToList());
     59      data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 0, 1).ToList());
    5260
    5361      double x, y;
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Nguyen/NguyenFunctionFive.cs

    r14185 r14228  
    4545    protected override int TestPartitionStart { get { return 20; } }
    4646    protected override int TestPartitionEnd { get { return 520; } }
     47    public int Seed { get; }
    4748
     49    public NguyenFunctionFive() : this((int)System.DateTime.Now.Ticks) { }
     50    public NguyenFunctionFive(int seed) : base() {
     51      Seed = seed;
     52    }
    4853    protected override List<List<double>> GenerateValues() {
    4954      List<List<double>> data = new List<List<double>>();
    50       data.Add(ValueGenerator.GenerateUniformDistributedValues(520, -1, 1).ToList());
     55      data.Add(ValueGenerator.GenerateUniformDistributedValues(Seed, 520, -1, 1).ToList());
    5156
    5257      double x;
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Nguyen/NguyenFunctionFour.cs

    r14185 r14228  
    4545    protected override int TestPartitionStart { get { return 20; } }
    4646    protected override int TestPartitionEnd { get { return 520; } }
     47    public int Seed { get; }
    4748
     49    public NguyenFunctionFour() : this((int)System.DateTime.Now.Ticks) { }
     50    public NguyenFunctionFour(int seed) : base() {
     51      Seed = seed;
     52    }
    4853    protected override List<List<double>> GenerateValues() {
    4954      List<List<double>> data = new List<List<double>>();
    50       data.Add(ValueGenerator.GenerateUniformDistributedValues(520, -1, 1).ToList());
     55      data.Add(ValueGenerator.GenerateUniformDistributedValues(Seed, 520, -1, 1).ToList());
    5156
    5257      double x;
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Nguyen/NguyenFunctionNine.cs

    r14185 r14228  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HeuristicLab.Random;
    2526
    2627namespace HeuristicLab.Problems.Instances.DataAnalysis {
     
    4546    protected override int TestPartitionStart { get { return 20; } }
    4647    protected override int TestPartitionEnd { get { return 1020; } }
     48    public int Seed { get; }
    4749
     50    public NguyenFunctionNine() : this((int)System.DateTime.Now.Ticks) { }
     51    public NguyenFunctionNine(int seed) : base() {
     52      Seed = seed;
     53    }
    4854    protected override List<List<double>> GenerateValues() {
    4955      List<List<double>> data = new List<List<double>>();
    50       data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, 0, 1).ToList());
    51       data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, 0, 1).ToList());
     56      var rand = new MersenneTwister((uint)Seed);
     57
     58      data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 0, 1).ToList());
     59      data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 0, 1).ToList());
    5260
    5361      double x, y;
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Nguyen/NguyenFunctionOne.cs

    r14185 r14228  
    4545    protected override int TestPartitionStart { get { return 20; } }
    4646    protected override int TestPartitionEnd { get { return 520; } }
     47    public int Seed { get; }
    4748
     49    public NguyenFunctionOne() : this((int)System.DateTime.Now.Ticks) { }
     50    public NguyenFunctionOne(int seed) : base() {
     51      Seed = seed;
     52    }
    4853    protected override List<List<double>> GenerateValues() {
    4954      List<List<double>> data = new List<List<double>>();
    50       data.Add(ValueGenerator.GenerateUniformDistributedValues(520, -1, 1).ToList());
     55      data.Add(ValueGenerator.GenerateUniformDistributedValues(Seed, 520, -1, 1).ToList());
    5156
    5257      double x;
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Nguyen/NguyenFunctionSeven.cs

    r14185 r14228  
    4646    protected override int TestPartitionEnd { get { return 520; } }
    4747
     48    public int Seed { get; }
     49
     50    public NguyenFunctionSeven() : this((int)System.DateTime.Now.Ticks) { }
     51    public NguyenFunctionSeven(int seed) : base() {
     52      Seed = seed;
     53    }
    4854    protected override List<List<double>> GenerateValues() {
    4955      List<List<double>> data = new List<List<double>>();
    50       data.Add(ValueGenerator.GenerateUniformDistributedValues(520, 0, 2).ToList());
     56      data.Add(ValueGenerator.GenerateUniformDistributedValues(Seed, 520, 0, 2).ToList());
    5157
    5258      double x;
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Nguyen/NguyenFunctionSix.cs

    r14185 r14228  
    4545    protected override int TestPartitionStart { get { return 20; } }
    4646    protected override int TestPartitionEnd { get { return 520; } }
     47    public int Seed { get; }
    4748
     49    public NguyenFunctionSix() : this((int)System.DateTime.Now.Ticks) { }
     50    public NguyenFunctionSix(int seed) : base() {
     51      Seed = seed;
     52    }
    4853    protected override List<List<double>> GenerateValues() {
    4954      List<List<double>> data = new List<List<double>>();
    50       data.Add(ValueGenerator.GenerateUniformDistributedValues(520, -1, 1).ToList());
     55      data.Add(ValueGenerator.GenerateUniformDistributedValues(Seed, 520, -1, 1).ToList());
    5156
    5257      double x;
     
    5459      for (int i = 0; i < data[0].Count; i++) {
    5560        x = data[0][i];
    56         results.Add(Math.Sin(x) + Math.Sin(x + x*x));
     61        results.Add(Math.Sin(x) + Math.Sin(x + x * x));
    5762      }
    5863      data.Add(results);
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Nguyen/NguyenFunctionTen.cs

    r14185 r14228  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HeuristicLab.Random;
    2526
    2627namespace HeuristicLab.Problems.Instances.DataAnalysis {
     
    4546    protected override int TestPartitionStart { get { return 20; } }
    4647    protected override int TestPartitionEnd { get { return 1020; } }
     48    public int Seed { get; }
    4749
     50    public NguyenFunctionTen() : this((int)System.DateTime.Now.Ticks) { }
     51    public NguyenFunctionTen(int seed) : base() {
     52      Seed = seed;
     53    }
    4854    protected override List<List<double>> GenerateValues() {
    4955      List<List<double>> data = new List<List<double>>();
    50       data.Add(ValueGenerator.GenerateUniformDistributedValues(1020, 0, 1).ToList());
    51       data.Add(ValueGenerator.GenerateUniformDistributedValues(1020, 0, 1).ToList());
     56      var rand = new MersenneTwister((uint)Seed);
     57
     58      data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), 1020, 0, 1).ToList());
     59      data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), 1020, 0, 1).ToList());
    5260
    5361      double x, y;
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Nguyen/NguyenFunctionThree.cs

    r14185 r14228  
    4545    protected override int TestPartitionStart { get { return 20; } }
    4646    protected override int TestPartitionEnd { get { return 520; } }
     47    public int Seed { get; }
    4748
     49    public NguyenFunctionThree() : this((int)System.DateTime.Now.Ticks) { }
     50    public NguyenFunctionThree(int seed) : base() {
     51      Seed = seed;
     52    }
    4853    protected override List<List<double>> GenerateValues() {
    4954      List<List<double>> data = new List<List<double>>();
    50       data.Add(ValueGenerator.GenerateUniformDistributedValues(520, -1, 1).ToList());
     55      data.Add(ValueGenerator.GenerateUniformDistributedValues(Seed, 520, -1, 1).ToList());
    5156
    5257      double x;
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Nguyen/NguyenFunctionTwelve.cs

    r14185 r14228  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HeuristicLab.Random;
    2526
    2627namespace HeuristicLab.Problems.Instances.DataAnalysis {
     
    4546    protected override int TestPartitionStart { get { return 20; } }
    4647    protected override int TestPartitionEnd { get { return 1020; } }
     48    public int Seed { get; }
    4749
     50    public NguyenFunctionTwelve() : this((int)System.DateTime.Now.Ticks) { }
     51    public NguyenFunctionTwelve(int seed) : base() {
     52      Seed = seed;
     53    }
    4854    protected override List<List<double>> GenerateValues() {
    4955      List<List<double>> data = new List<List<double>>();
    50       data.Add(ValueGenerator.GenerateUniformDistributedValues(1020, 0, 1).ToList());
    51       data.Add(ValueGenerator.GenerateUniformDistributedValues(1020, 0, 1).ToList());
     56      var rand = new MersenneTwister((uint)Seed);
     57
     58      data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), 1020, 0, 1).ToList());
     59      data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), 1020, 0, 1).ToList());
    5260
    5361      double x, y;
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Nguyen/NguyenFunctionTwo.cs

    r14185 r14228  
    4545    protected override int TestPartitionStart { get { return 20; } }
    4646    protected override int TestPartitionEnd { get { return 520; } }
     47    public int Seed { get; }
    4748
     49    public NguyenFunctionTwo() : this((int)System.DateTime.Now.Ticks) { }
     50    public NguyenFunctionTwo(int seed) : base() {
     51      Seed = seed;
     52    }
    4853    protected override List<List<double>> GenerateValues() {
    4954      List<List<double>> data = new List<List<double>>();
    50       data.Add(ValueGenerator.GenerateUniformDistributedValues(520, -1, 1).ToList());
     55      data.Add(ValueGenerator.GenerateUniformDistributedValues(Seed, 520, -1, 1).ToList());
    5156
    5257      double x;
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Nguyen/NguyenInstanceProvider.cs

    r14185 r14228  
    2222using System;
    2323using System.Collections.Generic;
     24using HeuristicLab.Random;
    2425
    2526namespace HeuristicLab.Problems.Instances.DataAnalysis {
     
    3738      get { return "McDermott et al., 2012 \"Genetic Programming Needs Better Benchmarks\", in Proc. of GECCO 2012."; }
    3839    }
     40    public int Seed { get; }
     41
     42    public NguyenInstanceProvider() : this((int)System.DateTime.Now.Ticks) { }
     43    public NguyenInstanceProvider(int seed) : base() {
     44      Seed = seed;
     45    }
    3946
    4047    public override IEnumerable<IDataDescriptor> GetDataDescriptors() {
    4148      List<IDataDescriptor> descriptorList = new List<IDataDescriptor>();
    42       descriptorList.Add(new NguyenFunctionOne());
    43       descriptorList.Add(new NguyenFunctionTwo());
    44       descriptorList.Add(new NguyenFunctionThree());
    45       descriptorList.Add(new NguyenFunctionFour());
    46       descriptorList.Add(new NguyenFunctionFive());
    47       descriptorList.Add(new NguyenFunctionSix());
    48       descriptorList.Add(new NguyenFunctionSeven());
    49       descriptorList.Add(new NguyenFunctionEight());
    50       descriptorList.Add(new NguyenFunctionNine());
    51       descriptorList.Add(new NguyenFunctionTen());
    52       descriptorList.Add(new NguyenFunctionEleven());
    53       descriptorList.Add(new NguyenFunctionTwelve());
     49      var rand = new MersenneTwister((uint)Seed);
     50      descriptorList.Add(new NguyenFunctionOne(rand.Next()));
     51      descriptorList.Add(new NguyenFunctionTwo(rand.Next()));
     52      descriptorList.Add(new NguyenFunctionThree(rand.Next()));
     53      descriptorList.Add(new NguyenFunctionFour(rand.Next()));
     54      descriptorList.Add(new NguyenFunctionFive(rand.Next()));
     55      descriptorList.Add(new NguyenFunctionSix(rand.Next()));
     56      descriptorList.Add(new NguyenFunctionSeven(rand.Next()));
     57      descriptorList.Add(new NguyenFunctionEight(rand.Next()));
     58      descriptorList.Add(new NguyenFunctionNine(rand.Next()));
     59      descriptorList.Add(new NguyenFunctionTen(rand.Next()));
     60      descriptorList.Add(new NguyenFunctionEleven(rand.Next()));
     61      descriptorList.Add(new NguyenFunctionTwelve(rand.Next()));
    5462      return descriptorList;
    5563    }
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/ValueGenerator.cs

    r14185 r14228  
    2626namespace HeuristicLab.Problems.Instances.DataAnalysis {
    2727  internal static class ValueGenerator {
    28     private static FastRandom rand = new FastRandom();
    2928
    3029    /// <summary>
    3130    /// Generates uniformly distributed values between start and end (inclusive!)
    3231    /// </summary>
     32    /// <param name="seed">The seed for the random number generator</param>
    3333    /// <param name="n">Number of values to generate.</param>
    3434    /// <param name="start">The lower value (inclusive)</param>
    3535    /// <param name="end">The upper value (inclusive)</param>
    3636    /// <returns>An enumerable including n values in [start, end]</returns>
    37     public static IEnumerable<double> GenerateUniformDistributedValues(int n, double start, double end) {
     37    public static IEnumerable<double> GenerateUniformDistributedValues(int seed, int n, double start, double end) {
     38      var rand = new FastRandom(seed);
    3839      for (int i = 0; i < n; i++) {
    3940        // we need to return a random value including end.
     
    4748    /// Generates normally distributed values sampling from N(mu, sigma)
    4849    /// </summary>
     50    /// <param name="seed">The seed for the random number generator</param>
    4951    /// <param name="n">Number of values to generate.</param>
    5052    /// <param name="mu">The mu parameter of the normal distribution</param>
    5153    /// <param name="sigma">The sigma parameter of the normal distribution</param>
    5254    /// <returns>An enumerable including n values ~ N(mu, sigma)</returns>
    53     public static IEnumerable<double> GenerateNormalDistributedValues(int n, double mu, double sigma) {
     55    public static IEnumerable<double> GenerateNormalDistributedValues(int seed, int n, double mu, double sigma) {
     56      var rand = new FastRandom(seed);
    5457      for (int i = 0; i < n; i++)
    5558        yield return NormalDistributedRandom.NextDouble(rand, mu, sigma);
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VariableNetworks/VariableNetworkInstanceProvider.cs

    r14110 r14228  
    4040      get { return ""; }
    4141    }
     42    public int Seed { get; }
     43
     44    public VariableNetworkInstanceProvider() : this((int)DateTime.Now.Ticks) { }
     45    public VariableNetworkInstanceProvider(int seed) : base() {
     46      Seed = seed;
     47    }
    4248
    4349    public override IEnumerable<IDataDescriptor> GetDataDescriptors() {
    4450      var numVariables = new int[] { 10, 20, 50, 100 };
    4551      var noiseRatios = new double[] { 0.01, 0.05, 0.1 };
    46       var rand = new System.Random(1234); // use fixed seed for deterministic problem generation
     52      var rand = new MersenneTwister((uint)Seed); // use fixed seed for deterministic problem generation
    4753      return (from size in numVariables
    4854              from noiseRatio in noiseRatios
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Various/BreimanOne.cs

    r14185 r14228  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HeuristicLab.Core;
    2526using HeuristicLab.Random;
    2627
     
    4344    protected override int TestPartitionEnd { get { return 10001; } }
    4445
    45     protected static FastRandom rand = new FastRandom();
     46    public int Seed { get; }
     47
     48    public BreimanOne() : this((int)DateTime.Now.Ticks) { }
     49    public BreimanOne(int seed) : base() {
     50      Seed = seed;
     51    }
    4652
    4753    protected override List<List<double>> GenerateValues() {
    4854      List<List<double>> data = new List<List<double>>();
    4955      List<int> values = new List<int>() { -1, 1 };
    50       data.Add(GenerateUniformIntegerDistribution(values, TestPartitionEnd));
     56      var rand = new MersenneTwister((uint)Seed);
     57      data.Add(GenerateUniformIntegerDistribution(rand, values, TestPartitionEnd));
    5158      values.Add(0);
    5259      for (int i = 0; i < AllowedInputVariables.Count() - 1; i++) {
    53         data.Add(GenerateUniformIntegerDistribution(values, TestPartitionEnd));
     60        data.Add(GenerateUniformIntegerDistribution(rand, values, TestPartitionEnd));
    5461      }
    55 
    5662      double x1, x2, x3, x4, x5, x6, x7;
    5763      double f;
     
    7985    }
    8086
    81     private List<double> GenerateUniformIntegerDistribution(List<int> classes, int amount) {
     87    private List<double> GenerateUniformIntegerDistribution(IRandom rand, List<int> classes, int amount) {
    8288      List<double> values = new List<double>();
    8389      for (int i = 0; i < amount; i++) {
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Various/FriedmanOne.cs

    r14185 r14228  
    4242    protected override int TestPartitionStart { get { return 5000; } }
    4343    protected override int TestPartitionEnd { get { return 10000; } }
     44    public int Seed { get; }
    4445
    45     protected static FastRandom rand = new FastRandom();
     46    public FriedmanOne() : this((int)DateTime.Now.Ticks) { }
     47
     48    public FriedmanOne(int seed) : base() {
     49      Seed = seed;
     50    }
    4651
    4752    protected override List<List<double>> GenerateValues() {
    4853      List<List<double>> data = new List<List<double>>();
     54      var rand = new MersenneTwister((uint)Seed);
    4955      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    50         data.Add(ValueGenerator.GenerateUniformDistributedValues(10000, 0, 1).ToList());
     56        data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), 10000, 0, 1).ToList());
    5157      }
    5258
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Various/FriedmanTwo.cs

    r14185 r14228  
    4343    protected override int TestPartitionEnd { get { return 10000; } }
    4444
    45     protected static FastRandom rand = new FastRandom();
     45    public int Seed { get; }
    4646
     47    public FriedmanTwo() : this((int)DateTime.Now.Ticks) { }
     48
     49    public FriedmanTwo(int seed) : base() {
     50      Seed = seed;
     51    }
    4752    protected override List<List<double>> GenerateValues() {
    4853      List<List<double>> data = new List<List<double>>();
     54      var rand = new MersenneTwister((uint)Seed);
     55
    4956      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    50         data.Add(ValueGenerator.GenerateUniformDistributedValues(10000, 0, 1).ToList());
     57        data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), 10000, 0, 1).ToList());
    5158      }
    5259
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Various/PolyTen.cs

    r14185 r14228  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HeuristicLab.Random;
    2526
    2627namespace HeuristicLab.Problems.Instances.DataAnalysis {
     
    4546    protected override int TestPartitionStart { get { return 250; } }
    4647    protected override int TestPartitionEnd { get { return 500; } }
     48    public int Seed { get; }
    4749
     50    public PolyTen() : this((int)DateTime.Now.Ticks) { }
     51
     52    public PolyTen(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);
     58
    5059      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    51         data.Add(ValueGenerator.GenerateUniformDistributedValues(TestPartitionEnd, -1, 1).ToList());
     60        data.Add(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, -1, 1).ToList());
    5261      }
    5362
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Various/SpatialCoevolution.cs

    r14185 r14228  
    2424using System.Linq;
    2525using HeuristicLab.Common;
     26using HeuristicLab.Random;
    2627
    2728namespace HeuristicLab.Problems.Instances.DataAnalysis {
     
    5051    protected override int TestPartitionStart { get { return 676; } }
    5152    protected override int TestPartitionEnd { get { return 1676; } }
     53    public int Seed { get; }
    5254
     55    public SpatialCoevolution() : this((int)DateTime.Now.Ticks) { }
     56
     57    public SpatialCoevolution(int seed) : base() {
     58      Seed = seed;
     59    }
    5360    protected override List<List<double>> GenerateValues() {
    5461      List<List<double>> data = new List<List<double>>();
     
    5764      List<List<double>> trainingData = new List<List<double>>() { evenlySpacedSequence, evenlySpacedSequence };
    5865      var combinations = ValueGenerator.GenerateAllCombinationsOfValuesInLists(trainingData).ToList();
     66      var rand = new MersenneTwister((uint)Seed);
    5967
    6068      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    6169        data.Add(combinations[i].ToList());
    62         data[i].AddRange(ValueGenerator.GenerateUniformDistributedValues(1000, -5, 5).ToList());
     70        data[i].AddRange(ValueGenerator.GenerateUniformDistributedValues(rand.Next(), 1000, -5, 5).ToList());
    6371      }
    6472
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Various/VariousInstanceProvider.cs

    r14185 r14228  
    2222using System;
    2323using System.Collections.Generic;
     24using HeuristicLab.Random;
    2425
    2526namespace HeuristicLab.Problems.Instances.DataAnalysis {
     
    3738      get { return ""; }
    3839    }
     40    public int Seed { get; }
    3941
     42    public VariousInstanceProvider() : this((int)DateTime.Now.Ticks) { }
     43
     44    public VariousInstanceProvider(int seed) : base() {
     45      Seed = seed;
     46    }
    4047    public override IEnumerable<IDataDescriptor> GetDataDescriptors() {
    4148      List<IDataDescriptor> descriptorList = new List<IDataDescriptor>();
    42       descriptorList.Add(new BreimanOne());
    43       descriptorList.Add(new FriedmanOne());
    44       descriptorList.Add(new FriedmanTwo());
    45       descriptorList.Add(new PolyTen());
    46       descriptorList.Add(new SpatialCoevolution());
     49      var rand = new MersenneTwister((uint)Seed);
     50      descriptorList.Add(new BreimanOne(rand.Next()));
     51      descriptorList.Add(new FriedmanOne(rand.Next()));
     52      descriptorList.Add(new FriedmanTwo(rand.Next()));
     53      descriptorList.Add(new PolyTen(rand.Next()));
     54      descriptorList.Add(new SpatialCoevolution(rand.Next()));
    4755      return descriptorList;
    4856    }
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Vladislavleva/KotanchekFunction.cs

    r14185 r14228  
    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; }
     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      }
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Vladislavleva/RationalPolynomialThreeDimensional.cs

    r14185 r14228  
    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; }
    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>>() {
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Vladislavleva/RationalPolynomialTwoDimensional.cs

    r14185 r14228  
    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; }
     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      }
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Vladislavleva/RippleFunction.cs

    r14185 r14228  
    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; }
    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
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Vladislavleva/SineCosineFunction.cs

    r14185 r14228  
    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; }
    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      }
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Vladislavleva/UnwrappedBallFunctionFiveDimensional.cs

    r14185 r14228  
    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; }
    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
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Vladislavleva/VladislavlevaInstanceProvider.cs

    r14185 r14228  
    2222using System;
    2323using System.Collections.Generic;
     24using HeuristicLab.Random;
    2425
    2526namespace HeuristicLab.Problems.Instances.DataAnalysis {
     
    3839    }
    3940
     41    public int Seed { get; }
     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.