- Timestamp:
- 09/23/16 12:57:27 (8 years ago)
- Location:
- stable
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk/sources merged: 14228-14229
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Problems.Instances.DataAnalysis
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis merged: 14228-14229
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Nguyen/NguyenFunctionEight.cs
r14186 r14305 46 46 protected override int TestPartitionEnd { get { return 520; } } 47 47 48 public int Seed { get; private set; } 49 50 public NguyenFunctionEight() : this((int)System.DateTime.Now.Ticks) { } 51 public NguyenFunctionEight(int seed) : base() { 52 Seed = seed; 53 } 54 48 55 protected override List<List<double>> GenerateValues() { 49 56 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()); 51 58 52 59 double x; -
stable/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Nguyen/NguyenFunctionEleven.cs
r14186 r14305 23 23 using System.Collections.Generic; 24 24 using System.Linq; 25 using HeuristicLab.Random; 25 26 26 27 namespace HeuristicLab.Problems.Instances.DataAnalysis { … … 45 46 protected override int TestPartitionStart { get { return 20; } } 46 47 protected override int TestPartitionEnd { get { return 1020; } } 48 public int Seed { get; private set; } 47 49 50 public NguyenFunctionEleven() : this((int)System.DateTime.Now.Ticks) { } 51 public NguyenFunctionEleven(int seed) : base() { 52 Seed = seed; 53 } 48 54 protected override List<List<double>> GenerateValues() { 49 55 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()); 52 60 53 61 double x, y; -
stable/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Nguyen/NguyenFunctionFive.cs
r14186 r14305 45 45 protected override int TestPartitionStart { get { return 20; } } 46 46 protected override int TestPartitionEnd { get { return 520; } } 47 public int Seed { get; private set; } 47 48 49 public NguyenFunctionFive() : this((int)System.DateTime.Now.Ticks) { } 50 public NguyenFunctionFive(int seed) : base() { 51 Seed = seed; 52 } 48 53 protected override List<List<double>> GenerateValues() { 49 54 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()); 51 56 52 57 double x; -
stable/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Nguyen/NguyenFunctionFour.cs
r14186 r14305 45 45 protected override int TestPartitionStart { get { return 20; } } 46 46 protected override int TestPartitionEnd { get { return 520; } } 47 public int Seed { get; private set; } 47 48 49 public NguyenFunctionFour() : this((int)System.DateTime.Now.Ticks) { } 50 public NguyenFunctionFour(int seed) : base() { 51 Seed = seed; 52 } 48 53 protected override List<List<double>> GenerateValues() { 49 54 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()); 51 56 52 57 double x; -
stable/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Nguyen/NguyenFunctionNine.cs
r14186 r14305 23 23 using System.Collections.Generic; 24 24 using System.Linq; 25 using HeuristicLab.Random; 25 26 26 27 namespace HeuristicLab.Problems.Instances.DataAnalysis { … … 45 46 protected override int TestPartitionStart { get { return 20; } } 46 47 protected override int TestPartitionEnd { get { return 1020; } } 48 public int Seed { get; private set; } 47 49 50 public NguyenFunctionNine() : this((int)System.DateTime.Now.Ticks) { } 51 public NguyenFunctionNine(int seed) : base() { 52 Seed = seed; 53 } 48 54 protected override List<List<double>> GenerateValues() { 49 55 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()); 52 60 53 61 double x, y; -
stable/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Nguyen/NguyenFunctionOne.cs
r14186 r14305 45 45 protected override int TestPartitionStart { get { return 20; } } 46 46 protected override int TestPartitionEnd { get { return 520; } } 47 public int Seed { get; private set; } 47 48 49 public NguyenFunctionOne() : this((int)System.DateTime.Now.Ticks) { } 50 public NguyenFunctionOne(int seed) : base() { 51 Seed = seed; 52 } 48 53 protected override List<List<double>> GenerateValues() { 49 54 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()); 51 56 52 57 double x; -
stable/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Nguyen/NguyenFunctionSeven.cs
r14186 r14305 46 46 protected override int TestPartitionEnd { get { return 520; } } 47 47 48 public int Seed { get; private set; } 49 50 public NguyenFunctionSeven() : this((int)System.DateTime.Now.Ticks) { } 51 public NguyenFunctionSeven(int seed) : base() { 52 Seed = seed; 53 } 48 54 protected override List<List<double>> GenerateValues() { 49 55 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()); 51 57 52 58 double x; -
stable/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Nguyen/NguyenFunctionSix.cs
r14186 r14305 45 45 protected override int TestPartitionStart { get { return 20; } } 46 46 protected override int TestPartitionEnd { get { return 520; } } 47 public int Seed { get; private set; } 47 48 49 public NguyenFunctionSix() : this((int)System.DateTime.Now.Ticks) { } 50 public NguyenFunctionSix(int seed) : base() { 51 Seed = seed; 52 } 48 53 protected override List<List<double>> GenerateValues() { 49 54 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()); 51 56 52 57 double x; … … 54 59 for (int i = 0; i < data[0].Count; i++) { 55 60 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)); 57 62 } 58 63 data.Add(results); -
stable/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Nguyen/NguyenFunctionTen.cs
r14186 r14305 23 23 using System.Collections.Generic; 24 24 using System.Linq; 25 using HeuristicLab.Random; 25 26 26 27 namespace HeuristicLab.Problems.Instances.DataAnalysis { … … 45 46 protected override int TestPartitionStart { get { return 20; } } 46 47 protected override int TestPartitionEnd { get { return 1020; } } 48 public int Seed { get; private set; } 47 49 50 public NguyenFunctionTen() : this((int)System.DateTime.Now.Ticks) { } 51 public NguyenFunctionTen(int seed) : base() { 52 Seed = seed; 53 } 48 54 protected override List<List<double>> GenerateValues() { 49 55 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()); 52 60 53 61 double x, y; -
stable/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Nguyen/NguyenFunctionThree.cs
r14186 r14305 45 45 protected override int TestPartitionStart { get { return 20; } } 46 46 protected override int TestPartitionEnd { get { return 520; } } 47 public int Seed { get; private set; } 47 48 49 public NguyenFunctionThree() : this((int)System.DateTime.Now.Ticks) { } 50 public NguyenFunctionThree(int seed) : base() { 51 Seed = seed; 52 } 48 53 protected override List<List<double>> GenerateValues() { 49 54 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()); 51 56 52 57 double x; -
stable/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Nguyen/NguyenFunctionTwelve.cs
r14186 r14305 23 23 using System.Collections.Generic; 24 24 using System.Linq; 25 using HeuristicLab.Random; 25 26 26 27 namespace HeuristicLab.Problems.Instances.DataAnalysis { … … 45 46 protected override int TestPartitionStart { get { return 20; } } 46 47 protected override int TestPartitionEnd { get { return 1020; } } 48 public int Seed { get; private set; } 47 49 50 public NguyenFunctionTwelve() : this((int)System.DateTime.Now.Ticks) { } 51 public NguyenFunctionTwelve(int seed) : base() { 52 Seed = seed; 53 } 48 54 protected override List<List<double>> GenerateValues() { 49 55 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()); 52 60 53 61 double x, y; -
stable/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Nguyen/NguyenFunctionTwo.cs
r14186 r14305 45 45 protected override int TestPartitionStart { get { return 20; } } 46 46 protected override int TestPartitionEnd { get { return 520; } } 47 public int Seed { get; private set; } 47 48 49 public NguyenFunctionTwo() : this((int)System.DateTime.Now.Ticks) { } 50 public NguyenFunctionTwo(int seed) : base() { 51 Seed = seed; 52 } 48 53 protected override List<List<double>> GenerateValues() { 49 54 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()); 51 56 52 57 double x; -
stable/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Nguyen/NguyenInstanceProvider.cs
r14186 r14305 22 22 using System; 23 23 using System.Collections.Generic; 24 using HeuristicLab.Random; 24 25 25 26 namespace HeuristicLab.Problems.Instances.DataAnalysis { … … 37 38 get { return "McDermott et al., 2012 \"Genetic Programming Needs Better Benchmarks\", in Proc. of GECCO 2012."; } 38 39 } 40 public int Seed { get; private set; } 41 42 public NguyenInstanceProvider() : this((int)System.DateTime.Now.Ticks) { } 43 public NguyenInstanceProvider(int seed) : base() { 44 Seed = seed; 45 } 39 46 40 47 public override IEnumerable<IDataDescriptor> GetDataDescriptors() { 41 48 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())); 54 62 return descriptorList; 55 63 }
Note: See TracChangeset
for help on using the changeset viewer.