- Timestamp:
- 08/02/16 18:09:47 (8 years ago)
- 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 172 172 <Compile Include="Regression\Korns\KornsFunctionEleven.cs" /> 173 173 <Compile Include="Regression\Korns\KornsFunctionFive.cs" /> 174 <Compile Include="Regression\Korns\KornsFunctionFi veteen.cs" />174 <Compile Include="Regression\Korns\KornsFunctionFifteen.cs" /> 175 175 <Compile Include="Regression\Korns\KornsFunctionFour.cs" /> 176 176 <Compile Include="Regression\Korns\KornsFunctionFourteen.cs" /> -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/FeatureSelection/FeatureSelectionInstanceProvider.cs
r14185 r14228 41 41 get { return ""; } 42 42 } 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 43 53 44 54 public override IEnumerable<IDataDescriptor> GetDataDescriptors() { … … 46 56 var pp = new double[] { 0.1, 0.25, 0.5 }; 47 57 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 51 60 return (from size in sizes 52 61 from p in pp 53 62 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) 54 67 select new FeatureSelection(size, p, noiseRatio, xGenerator, weightGenerator)) 55 68 .Cast<IDataDescriptor>() -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Friedman/FriedmanRandomFunctionInstanceProvider.cs
r14110 r14228 40 40 get { return "Friedman, Jerome H. 'Greedy function approximation: a gradient boosting machine.' Annals of statistics (2001): 1189-1232."; } 41 41 } 42 public int Seed { get; } 43 44 public FriedmanRandomFunctionInstanceProvider() : base() { 45 } 46 47 public FriedmanRandomFunctionInstanceProvider(int seed) : base() { 48 Seed = seed; 49 } 42 50 43 51 public override IEnumerable<IDataDescriptor> GetDataDescriptors() { 44 52 var numVariables = new int[] { 10, 25, 50, 100 }; 45 53 var noiseRatios = new double[] { 0.01, 0.05, 0.1 }; 46 var rand = new System.Random(1234); // use fixed seed for deterministic problem generation54 var rand = new MersenneTwister((uint)Seed); // use fixed seed for deterministic problem generation 47 55 return (from size in numVariables 48 56 from noiseRatio in noiseRatios -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Keijzer/KeijzerFunctionEleven.cs
r14185 r14228 24 24 using System.Linq; 25 25 using HeuristicLab.Common; 26 using HeuristicLab.Random; 26 27 27 28 namespace HeuristicLab.Problems.Instances.DataAnalysis { … … 47 48 protected override int TestPartitionStart { get { return 20; } } 48 49 protected override int TestPartitionEnd { get { return 20 + (601 * 601); } } 50 public int Seed { get; } 49 51 52 public KeijzerFunctionEleven() : this((int)System.DateTime.Now.Ticks) { 53 } 54 public KeijzerFunctionEleven(int seed) : base() { 55 Seed = seed; 56 } 50 57 protected override List<List<double>> GenerateValues() { 51 58 List<List<double>> data = new List<List<double>>(); … … 54 61 55 62 var combinations = ValueGenerator.GenerateAllCombinationsOfValuesInLists(testData).ToList(); 56 63 var rand = new MersenneTwister((uint)Seed); 57 64 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()); 59 66 data[i].AddRange(combinations[i]); 60 67 } -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Keijzer/KeijzerFunctionFifteen.cs
r14185 r14228 24 24 using System.Linq; 25 25 using HeuristicLab.Common; 26 using HeuristicLab.Random; 26 27 27 28 namespace HeuristicLab.Problems.Instances.DataAnalysis { … … 46 47 protected override int TestPartitionStart { get { return 20; } } 47 48 protected override int TestPartitionEnd { get { return 20 + (601 * 601); } } 49 public int Seed { get; } 48 50 51 public KeijzerFunctionFifteen() : this((int)System.DateTime.Now.Ticks) { 52 } 53 public KeijzerFunctionFifteen(int seed) : base() { 54 Seed = seed; 55 } 49 56 protected override List<List<double>> GenerateValues() { 50 57 List<List<double>> data = new List<List<double>>(); … … 53 60 54 61 var combinations = ValueGenerator.GenerateAllCombinationsOfValuesInLists(testData).ToList(); 62 var rand = new MersenneTwister((uint)Seed); 55 63 56 64 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()); 58 66 data[i].AddRange(combinations[i]); 59 67 } -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Keijzer/KeijzerFunctionFive.cs
r14185 r14228 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 1000; } } 46 47 protected override int TestPartitionEnd { get { return 11000; } } 48 public int Seed { get; } 47 49 50 public KeijzerFunctionFive() : this((int)System.DateTime.Now.Ticks) { 51 } 52 public KeijzerFunctionFive(int seed) : base() { 53 Seed = seed; 54 } 48 55 protected override List<List<double>> GenerateValues() { 49 56 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()); 53 62 54 63 double x, y, z; -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Keijzer/KeijzerFunctionFourteen.cs
r14185 r14228 24 24 using System.Linq; 25 25 using HeuristicLab.Common; 26 using HeuristicLab.Random; 26 27 27 28 namespace HeuristicLab.Problems.Instances.DataAnalysis { … … 46 47 protected override int TestPartitionStart { get { return 20; } } 47 48 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 48 57 49 58 protected override List<List<double>> GenerateValues() { 50 59 List<List<double>> data = new List<List<double>>(); 51 List<double> oneVariableTestData = SequenceGenerator.GenerateSteps(-3, 3, 0.01m).Select(v => (double) 60 List<double> oneVariableTestData = SequenceGenerator.GenerateSteps(-3, 3, 0.01m).Select(v => (double)v).ToList(); 52 61 List<List<double>> testData = new List<List<double>>() { oneVariableTestData, oneVariableTestData }; 53 62 54 63 var combinations = ValueGenerator.GenerateAllCombinationsOfValuesInLists(testData).ToList(); 64 var rand = new MersenneTwister((uint)Seed); 55 65 56 66 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()); 58 68 data[i].AddRange(combinations[i]); 59 69 } -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Keijzer/KeijzerFunctionTen.cs
r14185 r14228 24 24 using System.Linq; 25 25 using HeuristicLab.Common; 26 using HeuristicLab.Random; 26 27 27 28 namespace HeuristicLab.Problems.Instances.DataAnalysis { … … 46 47 protected override int TestPartitionStart { get { return 100; } } 47 48 protected override int TestPartitionEnd { get { return 100 + (101 * 101); } } 49 public int Seed { get; } 48 50 51 public KeijzerFunctionTen() : this((int)System.DateTime.Now.Ticks) { 52 } 53 public KeijzerFunctionTen(int seed) : base() { 54 Seed = seed; 55 } 49 56 protected override List<List<double>> GenerateValues() { 50 57 List<List<double>> data = new List<List<double>>(); … … 54 61 55 62 var combinations = ValueGenerator.GenerateAllCombinationsOfValuesInLists(testData).ToList<IEnumerable<double>>(); 63 var rand = new MersenneTwister((uint)Seed); 56 64 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()); 58 66 data[i].AddRange(combinations[i]); 59 67 } -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Keijzer/KeijzerFunctionThirteen.cs
r14185 r14228 24 24 using System.Linq; 25 25 using HeuristicLab.Common; 26 using HeuristicLab.Random; 26 27 27 28 namespace HeuristicLab.Problems.Instances.DataAnalysis { … … 46 47 protected override int TestPartitionStart { get { return 20; } } 47 48 protected override int TestPartitionEnd { get { return 20 + (601 * 601); } } 49 public int Seed { get; } 48 50 51 public KeijzerFunctionThirteen() : this((int)System.DateTime.Now.Ticks) { 52 } 53 public KeijzerFunctionThirteen(int seed) : base() { 54 Seed = seed; 55 } 49 56 protected override List<List<double>> GenerateValues() { 50 57 List<List<double>> data = new List<List<double>>(); … … 53 60 54 61 var combinations = ValueGenerator.GenerateAllCombinationsOfValuesInLists(testData).ToList(); 62 var rand = new MersenneTwister((uint)Seed); 55 63 56 64 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()); 58 66 data[i].AddRange(combinations[i]); 59 67 } -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Keijzer/KeijzerFunctionTwelve.cs
r14185 r14228 24 24 using System.Linq; 25 25 using HeuristicLab.Common; 26 using HeuristicLab.Random; 26 27 27 28 namespace HeuristicLab.Problems.Instances.DataAnalysis { … … 46 47 protected override int TestPartitionStart { get { return 20; } } 47 48 protected override int TestPartitionEnd { get { return 20 + (601 * 601); } } 49 public int Seed { get; } 48 50 51 public KeijzerFunctionTwelve() : this((int)System.DateTime.Now.Ticks) { 52 } 53 public KeijzerFunctionTwelve(int seed) : base() { 54 Seed = seed; 55 } 49 56 protected override List<List<double>> GenerateValues() { 50 57 List<List<double>> data = new List<List<double>>(); … … 53 60 54 61 var combinations = ValueGenerator.GenerateAllCombinationsOfValuesInLists(testData).ToList(); 62 var rand = new MersenneTwister((uint)Seed); 55 63 56 64 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()); 58 66 data[i].AddRange(combinations[i]); 59 67 } -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Keijzer/KeijzerInstanceProvider.cs
r14185 r14228 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; } 41 42 public KeijzerInstanceProvider() : this((int)System.DateTime.Now.Ticks) { 43 } 44 public KeijzerInstanceProvider(int seed) : base() { 45 Seed = seed; 46 } 39 47 40 48 public override IEnumerable<IDataDescriptor> GetDataDescriptors() { 41 49 List<IDataDescriptor> descriptorList = new List<IDataDescriptor>(); 50 var rand = new MersenneTwister((uint)Seed); 42 51 descriptorList.Add(new KeijzerFunctionOne()); 43 52 descriptorList.Add(new KeijzerFunctionTwo()); 44 53 descriptorList.Add(new KeijzerFunctionThree()); 45 54 descriptorList.Add(new KeijzerFunctionFour()); 46 descriptorList.Add(new KeijzerFunctionFive( ));55 descriptorList.Add(new KeijzerFunctionFive(rand.Next())); 47 56 descriptorList.Add(new KeijzerFunctionSix()); 48 57 descriptorList.Add(new KeijzerFunctionSeven()); 49 58 descriptorList.Add(new KeijzerFunctionEight()); 50 59 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())); 57 66 return descriptorList; 58 67 } -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Korns/KornsFunctionEight.cs
r14185 r14228 23 23 using System.Collections.Generic; 24 24 using System.Linq; 25 using HeuristicLab.Random; 25 26 26 27 namespace HeuristicLab.Problems.Instances.DataAnalysis { … … 51 52 protected override int TestPartitionEnd { get { return 20000; } } 52 53 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 53 62 protected override List<List<double>> GenerateValues() { 54 63 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) 60 71 61 72 double x0, x3, x4; -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Korns/KornsFunctionEleven.cs
r14185 r14228 23 23 using System.Collections.Generic; 24 24 using System.Linq; 25 using HeuristicLab.Random; 25 26 26 27 namespace HeuristicLab.Problems.Instances.DataAnalysis { … … 49 50 protected override int TestPartitionStart { get { return 10000; } } 50 51 protected override int TestPartitionEnd { get { return 20000; } } 52 public int Seed { get; } 51 53 54 public KornsFunctionEleven() : this((int)System.DateTime.Now.Ticks) { 55 } 56 public KornsFunctionEleven(int seed) : base() { 57 Seed = seed; 58 } 52 59 protected override List<List<double>> GenerateValues() { 53 60 List<List<double>> data = new List<List<double>>(); 61 var rand = new MersenneTwister((uint)Seed); 62 54 63 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()); 56 65 } 57 66 -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Korns/KornsFunctionFifteen.cs
r14227 r14228 23 23 using System.Collections.Generic; 24 24 using System.Linq; 25 using HeuristicLab.Random; 25 26 26 27 namespace HeuristicLab.Problems.Instances.DataAnalysis { 27 public class KornsFunctionFi veteen : ArtificialRegressionDataDescriptor {28 public class KornsFunctionFifteen : ArtificialRegressionDataDescriptor { 28 29 29 30 public override string Name { get { return "Korns 15 y = 12.0 - (6.0 * ((tan(X0) / exp(X1)) * (ln(X2) - tan(X3))))"; } } … … 50 51 protected override int TestPartitionStart { get { return 10000; } } 51 52 protected override int TestPartitionEnd { get { return 20000; } } 53 public int Seed { get; } 52 54 55 56 public KornsFunctionFifteen() : this((int)System.DateTime.Now.Ticks) { 57 } 58 public KornsFunctionFifteen(int seed) : base() { 59 Seed = seed; 60 } 53 61 protected override List<List<double>> GenerateValues() { 54 62 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()); 60 70 61 71 double x0, x1, x2, x3; -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Korns/KornsFunctionFive.cs
r14185 r14228 23 23 using System.Collections.Generic; 24 24 using System.Linq; 25 using HeuristicLab.Random; 25 26 26 27 namespace HeuristicLab.Problems.Instances.DataAnalysis { … … 50 51 protected override int TestPartitionStart { get { return 10000; } } 51 52 protected override int TestPartitionEnd { get { return 20000; } } 53 public int Seed { get; } 52 54 55 public KornsFunctionFive() : this((int)System.DateTime.Now.Ticks) { 56 } 57 public KornsFunctionFive(int seed) : base() { 58 Seed = seed; 59 } 53 60 protected override List<List<double>> GenerateValues() { 54 61 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) 60 69 61 70 double x4; -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Korns/KornsFunctionFour.cs
r14185 r14228 23 23 using System.Collections.Generic; 24 24 using System.Linq; 25 using HeuristicLab.Random; 25 26 26 27 namespace HeuristicLab.Problems.Instances.DataAnalysis { … … 50 51 protected override int TestPartitionEnd { get { return 20000; } } 51 52 53 public int Seed { get; } 52 54 55 public KornsFunctionFour() : this((int)System.DateTime.Now.Ticks) { 56 } 57 public KornsFunctionFour(int seed) : base() { 58 Seed = seed; 59 } 53 60 protected override List<List<double>> GenerateValues() { 54 61 List<List<double>> data = new List<List<double>>(); 62 var rand = new MersenneTwister((uint)Seed); 55 63 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()); 57 65 } 58 66 -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Korns/KornsFunctionFourteen.cs
r14185 r14228 23 23 using System.Collections.Generic; 24 24 using System.Linq; 25 using HeuristicLab.Random; 25 26 26 27 namespace HeuristicLab.Problems.Instances.DataAnalysis { … … 49 50 protected override int TestPartitionStart { get { return 10000; } } 50 51 protected override int TestPartitionEnd { get { return 20000; } } 52 public int Seed { get; } 51 53 54 public KornsFunctionFourteen() : this((int)System.DateTime.Now.Ticks) { 55 } 56 public KornsFunctionFourteen(int seed) : base() { 57 Seed = seed; 58 } 52 59 protected override List<List<double>> GenerateValues() { 53 60 List<List<double>> data = new List<List<double>>(); 61 var rand = new MersenneTwister((uint)Seed); 54 62 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()); 56 64 } 57 65 -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Korns/KornsFunctionNine.cs
r14185 r14228 23 23 using System.Collections.Generic; 24 24 using System.Linq; 25 using HeuristicLab.Random; 25 26 26 27 namespace HeuristicLab.Problems.Instances.DataAnalysis { … … 51 52 protected override int TestPartitionStart { get { return 10000; } } 52 53 protected override int TestPartitionEnd { get { return 20000; } } 54 public int Seed { get; } 53 55 56 public KornsFunctionNine() : this((int)System.DateTime.Now.Ticks) { 57 } 58 public KornsFunctionNine(int seed) : base() { 59 Seed = seed; 60 } 54 61 protected override List<List<double>> GenerateValues() { 55 62 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()); 61 70 62 71 double x0, x1, x2, x3; -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Korns/KornsFunctionOne.cs
r14185 r14228 23 23 using System.Collections.Generic; 24 24 using System.Linq; 25 using HeuristicLab.Random; 25 26 26 27 namespace HeuristicLab.Problems.Instances.DataAnalysis { … … 50 51 protected override int TestPartitionStart { get { return 10000; } } 51 52 protected override int TestPartitionEnd { get { return 20000; } } 53 public int Seed { get; } 52 54 55 public KornsFunctionOne() : this((int)System.DateTime.Now.Ticks) { 56 } 57 public KornsFunctionOne(int seed) : base() { 58 Seed = seed; 59 } 53 60 protected override List<List<double>> GenerateValues() { 54 61 List<List<double>> data = new List<List<double>>(); 62 var rand = new MersenneTwister((uint)Seed); 63 55 64 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()); 57 66 } 58 67 -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Korns/KornsFunctionSeven.cs
r14185 r14228 23 23 using System.Collections.Generic; 24 24 using System.Linq; 25 using HeuristicLab.Random; 25 26 26 27 namespace HeuristicLab.Problems.Instances.DataAnalysis { … … 50 51 protected override int TestPartitionStart { get { return 10000; } } 51 52 protected override int TestPartitionEnd { get { return 20000; } } 53 public int Seed { get; } 52 54 55 public KornsFunctionSeven() : this((int)System.DateTime.Now.Ticks) { 56 } 57 public KornsFunctionSeven(int seed) : base() { 58 Seed = seed; 59 } 53 60 protected override List<List<double>> GenerateValues() { 54 61 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()); 60 66 61 67 double x0; -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Korns/KornsFunctionSix.cs
r14185 r14228 23 23 using System.Collections.Generic; 24 24 using System.Linq; 25 using HeuristicLab.Random; 25 26 26 27 namespace HeuristicLab.Problems.Instances.DataAnalysis { … … 50 51 protected override int TestPartitionStart { get { return 10000; } } 51 52 protected override int TestPartitionEnd { get { return 20000; } } 53 public int Seed { get; } 52 54 55 public KornsFunctionSix() : this((int)System.DateTime.Now.Ticks) { 56 } 57 public KornsFunctionSix(int seed) : base() { 58 Seed = seed; 59 } 53 60 protected override List<List<double>> GenerateValues() { 54 61 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()); 60 69 61 70 double x0; -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Korns/KornsFunctionTen.cs
r14185 r14228 23 23 using System.Collections.Generic; 24 24 using System.Linq; 25 using HeuristicLab.Random; 25 26 26 27 namespace HeuristicLab.Problems.Instances.DataAnalysis { … … 49 50 protected override int TestPartitionStart { get { return 10000; } } 50 51 protected override int TestPartitionEnd { get { return 20000; } } 52 public int Seed { get; } 51 53 54 public KornsFunctionTen() : this((int)System.DateTime.Now.Ticks) { 55 } 56 public KornsFunctionTen(int seed) : base() { 57 Seed = seed; 58 } 52 59 protected override List<List<double>> GenerateValues() { 53 60 List<List<double>> data = new List<List<double>>(); 61 var rand = new MersenneTwister((uint)Seed); 62 54 63 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()); 56 65 } 57 66 -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Korns/KornsFunctionThirteen.cs
r14185 r14228 23 23 using System.Collections.Generic; 24 24 using System.Linq; 25 using HeuristicLab.Random; 25 26 26 27 namespace HeuristicLab.Problems.Instances.DataAnalysis { … … 49 50 protected override int TestPartitionStart { get { return 10000; } } 50 51 protected override int TestPartitionEnd { get { return 20000; } } 52 public int Seed { get; } 51 53 54 public KornsFunctionThirteen() : this((int)System.DateTime.Now.Ticks) { 55 } 56 public KornsFunctionThirteen(int seed) : base() { 57 Seed = seed; 58 } 52 59 protected override List<List<double>> GenerateValues() { 53 60 List<List<double>> data = new List<List<double>>(); 61 var rand = new MersenneTwister((uint)Seed); 62 54 63 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()); 56 65 } 57 66 -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Korns/KornsFunctionThree.cs
r14185 r14228 23 23 using System.Collections.Generic; 24 24 using System.Linq; 25 using HeuristicLab.Random; 25 26 26 27 namespace HeuristicLab.Problems.Instances.DataAnalysis { … … 49 50 protected override int TestPartitionStart { get { return 10000; } } 50 51 protected override int TestPartitionEnd { get { return 20000; } } 52 public int Seed { get; } 51 53 54 public KornsFunctionThree() : this((int)System.DateTime.Now.Ticks) { 55 } 56 public KornsFunctionThree(int seed) : base() { 57 Seed = seed; 58 } 52 59 protected override List<List<double>> GenerateValues() { 53 60 List<List<double>> data = new List<List<double>>(); 61 var rand = new MersenneTwister((uint)Seed); 54 62 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()); 56 64 } 57 65 -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Korns/KornsFunctionTwelve.cs
r14185 r14228 23 23 using System.Collections.Generic; 24 24 using System.Linq; 25 using HeuristicLab.Random; 25 26 26 27 namespace HeuristicLab.Problems.Instances.DataAnalysis { … … 49 50 protected override int TestPartitionStart { get { return 10000; } } 50 51 protected override int TestPartitionEnd { get { return 20000; } } 52 public int Seed { get; } 51 53 54 public KornsFunctionTwelve() : this((int)System.DateTime.Now.Ticks) { 55 } 56 public KornsFunctionTwelve(int seed) : base() { 57 Seed = seed; 58 } 52 59 protected override List<List<double>> GenerateValues() { 53 60 List<List<double>> data = new List<List<double>>(); 61 var rand = new MersenneTwister((uint)Seed); 62 54 63 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()); 56 65 } 57 66 -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Korns/KornsFunctionTwo.cs
r14185 r14228 23 23 using System.Collections.Generic; 24 24 using System.Linq; 25 using HeuristicLab.Random; 25 26 26 27 namespace HeuristicLab.Problems.Instances.DataAnalysis { … … 49 50 protected override int TestPartitionStart { get { return 10000; } } 50 51 protected override int TestPartitionEnd { get { return 20000; } } 52 public int Seed { get; } 51 53 54 public KornsFunctionTwo() : this((int)System.DateTime.Now.Ticks) { 55 } 56 public KornsFunctionTwo(int seed) : base() { 57 Seed = seed; 58 } 52 59 protected override List<List<double>> GenerateValues() { 53 60 List<List<double>> data = new List<List<double>>(); 61 var rand = new MersenneTwister((uint)Seed); 62 54 63 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()); 56 65 } 57 66 -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Korns/KornsInstanceProvider.cs
r14185 r14228 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; } 41 public KornsInstanceProvider() : this((int)System.DateTime.Now.Ticks) { } 42 public KornsInstanceProvider(int seed) : base() { 43 Seed = seed; 44 } 39 45 40 46 public override IEnumerable<IDataDescriptor> GetDataDescriptors() { 41 47 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())); 57 64 return descriptorList; 58 65 } -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Nguyen/NguyenFunctionEight.cs
r14185 r14228 46 46 protected override int TestPartitionEnd { get { return 520; } } 47 47 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 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; -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Nguyen/NguyenFunctionEleven.cs
r14185 r14228 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; } 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; -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Nguyen/NguyenFunctionFive.cs
r14185 r14228 45 45 protected override int TestPartitionStart { get { return 20; } } 46 46 protected override int TestPartitionEnd { get { return 520; } } 47 public int Seed { get; } 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; -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Nguyen/NguyenFunctionFour.cs
r14185 r14228 45 45 protected override int TestPartitionStart { get { return 20; } } 46 46 protected override int TestPartitionEnd { get { return 520; } } 47 public int Seed { get; } 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; -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Nguyen/NguyenFunctionNine.cs
r14185 r14228 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; } 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; -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Nguyen/NguyenFunctionOne.cs
r14185 r14228 45 45 protected override int TestPartitionStart { get { return 20; } } 46 46 protected override int TestPartitionEnd { get { return 520; } } 47 public int Seed { get; } 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; -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Nguyen/NguyenFunctionSeven.cs
r14185 r14228 46 46 protected override int TestPartitionEnd { get { return 520; } } 47 47 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 } 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; -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Nguyen/NguyenFunctionSix.cs
r14185 r14228 45 45 protected override int TestPartitionStart { get { return 20; } } 46 46 protected override int TestPartitionEnd { get { return 520; } } 47 public int Seed { get; } 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); -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Nguyen/NguyenFunctionTen.cs
r14185 r14228 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; } 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; -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Nguyen/NguyenFunctionThree.cs
r14185 r14228 45 45 protected override int TestPartitionStart { get { return 20; } } 46 46 protected override int TestPartitionEnd { get { return 520; } } 47 public int Seed { get; } 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; -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Nguyen/NguyenFunctionTwelve.cs
r14185 r14228 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; } 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; -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Nguyen/NguyenFunctionTwo.cs
r14185 r14228 45 45 protected override int TestPartitionStart { get { return 20; } } 46 46 protected override int TestPartitionEnd { get { return 520; } } 47 public int Seed { get; } 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; -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Nguyen/NguyenInstanceProvider.cs
r14185 r14228 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; } 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 } -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/ValueGenerator.cs
r14185 r14228 26 26 namespace HeuristicLab.Problems.Instances.DataAnalysis { 27 27 internal static class ValueGenerator { 28 private static FastRandom rand = new FastRandom();29 28 30 29 /// <summary> 31 30 /// Generates uniformly distributed values between start and end (inclusive!) 32 31 /// </summary> 32 /// <param name="seed">The seed for the random number generator</param> 33 33 /// <param name="n">Number of values to generate.</param> 34 34 /// <param name="start">The lower value (inclusive)</param> 35 35 /// <param name="end">The upper value (inclusive)</param> 36 36 /// <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); 38 39 for (int i = 0; i < n; i++) { 39 40 // we need to return a random value including end. … … 47 48 /// Generates normally distributed values sampling from N(mu, sigma) 48 49 /// </summary> 50 /// <param name="seed">The seed for the random number generator</param> 49 51 /// <param name="n">Number of values to generate.</param> 50 52 /// <param name="mu">The mu parameter of the normal distribution</param> 51 53 /// <param name="sigma">The sigma parameter of the normal distribution</param> 52 54 /// <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); 54 57 for (int i = 0; i < n; i++) 55 58 yield return NormalDistributedRandom.NextDouble(rand, mu, sigma); -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VariableNetworks/VariableNetworkInstanceProvider.cs
r14110 r14228 40 40 get { return ""; } 41 41 } 42 public int Seed { get; } 43 44 public VariableNetworkInstanceProvider() : this((int)DateTime.Now.Ticks) { } 45 public VariableNetworkInstanceProvider(int seed) : base() { 46 Seed = seed; 47 } 42 48 43 49 public override IEnumerable<IDataDescriptor> GetDataDescriptors() { 44 50 var numVariables = new int[] { 10, 20, 50, 100 }; 45 51 var noiseRatios = new double[] { 0.01, 0.05, 0.1 }; 46 var rand = new System.Random(1234); // use fixed seed for deterministic problem generation52 var rand = new MersenneTwister((uint)Seed); // use fixed seed for deterministic problem generation 47 53 return (from size in numVariables 48 54 from noiseRatio in noiseRatios -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Various/BreimanOne.cs
r14185 r14228 23 23 using System.Collections.Generic; 24 24 using System.Linq; 25 using HeuristicLab.Core; 25 26 using HeuristicLab.Random; 26 27 … … 43 44 protected override int TestPartitionEnd { get { return 10001; } } 44 45 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 } 46 52 47 53 protected override List<List<double>> GenerateValues() { 48 54 List<List<double>> data = new List<List<double>>(); 49 55 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)); 51 58 values.Add(0); 52 59 for (int i = 0; i < AllowedInputVariables.Count() - 1; i++) { 53 data.Add(GenerateUniformIntegerDistribution( values, TestPartitionEnd));60 data.Add(GenerateUniformIntegerDistribution(rand, values, TestPartitionEnd)); 54 61 } 55 56 62 double x1, x2, x3, x4, x5, x6, x7; 57 63 double f; … … 79 85 } 80 86 81 private List<double> GenerateUniformIntegerDistribution( List<int> classes, int amount) {87 private List<double> GenerateUniformIntegerDistribution(IRandom rand, List<int> classes, int amount) { 82 88 List<double> values = new List<double>(); 83 89 for (int i = 0; i < amount; i++) { -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Various/FriedmanOne.cs
r14185 r14228 42 42 protected override int TestPartitionStart { get { return 5000; } } 43 43 protected override int TestPartitionEnd { get { return 10000; } } 44 public int Seed { get; } 44 45 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 } 46 51 47 52 protected override List<List<double>> GenerateValues() { 48 53 List<List<double>> data = new List<List<double>>(); 54 var rand = new MersenneTwister((uint)Seed); 49 55 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()); 51 57 } 52 58 -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Various/FriedmanTwo.cs
r14185 r14228 43 43 protected override int TestPartitionEnd { get { return 10000; } } 44 44 45 p rotected static FastRandom rand = new FastRandom();45 public int Seed { get; } 46 46 47 public FriedmanTwo() : this((int)DateTime.Now.Ticks) { } 48 49 public FriedmanTwo(int seed) : base() { 50 Seed = seed; 51 } 47 52 protected override List<List<double>> GenerateValues() { 48 53 List<List<double>> data = new List<List<double>>(); 54 var rand = new MersenneTwister((uint)Seed); 55 49 56 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()); 51 58 } 52 59 -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Various/PolyTen.cs
r14185 r14228 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 250; } } 46 47 protected override int TestPartitionEnd { get { return 500; } } 48 public int Seed { get; } 47 49 50 public PolyTen() : this((int)DateTime.Now.Ticks) { } 51 52 public PolyTen(int seed) : base() { 53 Seed = seed; 54 } 48 55 protected override List<List<double>> GenerateValues() { 49 56 List<List<double>> data = new List<List<double>>(); 57 var rand = new MersenneTwister((uint)Seed); 58 50 59 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()); 52 61 } 53 62 -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Various/SpatialCoevolution.cs
r14185 r14228 24 24 using System.Linq; 25 25 using HeuristicLab.Common; 26 using HeuristicLab.Random; 26 27 27 28 namespace HeuristicLab.Problems.Instances.DataAnalysis { … … 50 51 protected override int TestPartitionStart { get { return 676; } } 51 52 protected override int TestPartitionEnd { get { return 1676; } } 53 public int Seed { get; } 52 54 55 public SpatialCoevolution() : this((int)DateTime.Now.Ticks) { } 56 57 public SpatialCoevolution(int seed) : base() { 58 Seed = seed; 59 } 53 60 protected override List<List<double>> GenerateValues() { 54 61 List<List<double>> data = new List<List<double>>(); … … 57 64 List<List<double>> trainingData = new List<List<double>>() { evenlySpacedSequence, evenlySpacedSequence }; 58 65 var combinations = ValueGenerator.GenerateAllCombinationsOfValuesInLists(trainingData).ToList(); 66 var rand = new MersenneTwister((uint)Seed); 59 67 60 68 for (int i = 0; i < AllowedInputVariables.Count(); i++) { 61 69 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()); 63 71 } 64 72 -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Various/VariousInstanceProvider.cs
r14185 r14228 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 ""; } 38 39 } 40 public int Seed { get; } 39 41 42 public VariousInstanceProvider() : this((int)DateTime.Now.Ticks) { } 43 44 public VariousInstanceProvider(int seed) : base() { 45 Seed = seed; 46 } 40 47 public override IEnumerable<IDataDescriptor> GetDataDescriptors() { 41 48 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())); 47 55 return descriptorList; 48 56 } -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Vladislavleva/KotanchekFunction.cs
r14185 r14228 24 24 using System.Linq; 25 25 using HeuristicLab.Common; 26 using HeuristicLab.Random; 26 27 27 28 namespace HeuristicLab.Problems.Instances.DataAnalysis { … … 47 48 protected override int TestPartitionEnd { get { return 100 + (45 * 45); } } 48 49 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 } 49 57 protected override List<List<double>> GenerateValues() { 50 58 List<List<double>> data = new List<List<double>>(); … … 53 61 List<List<double>> testData = new List<List<double>>() { oneVariableTestData, oneVariableTestData }; 54 62 var combinations = ValueGenerator.GenerateAllCombinationsOfValuesInLists(testData).ToList<IEnumerable<double>>(); 63 var rand = new MersenneTwister((uint)Seed); 64 55 65 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()); 57 67 data[i].AddRange(combinations[i]); 58 68 } -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Vladislavleva/RationalPolynomialThreeDimensional.cs
r14185 r14228 24 24 using System.Linq; 25 25 using HeuristicLab.Common; 26 using HeuristicLab.Random; 26 27 27 28 namespace HeuristicLab.Problems.Instances.DataAnalysis { … … 46 47 protected override int TestPartitionStart { get { return 300; } } 47 48 protected override int TestPartitionEnd { get { return 300 + (15 * 12 * 15); } } 49 public int Seed { get; } 48 50 51 public RationalPolynomialThreeDimensional() : this((int)DateTime.Now.Ticks) { } 52 53 public RationalPolynomialThreeDimensional(int seed) : base() { 54 Seed = seed; 55 } 49 56 protected override List<List<double>> GenerateValues() { 50 57 List<List<double>> data = new List<List<double>>(); 51 58 52 59 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()); 56 64 57 65 List<List<double>> testData = new List<List<double>>() { -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Vladislavleva/RationalPolynomialTwoDimensional.cs
r14185 r14228 24 24 using System.Linq; 25 25 using HeuristicLab.Common; 26 using HeuristicLab.Random; 26 27 27 28 namespace HeuristicLab.Problems.Instances.DataAnalysis { … … 47 48 protected override int TestPartitionEnd { get { return 50 + (34 * 34); } } 48 49 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 } 49 57 protected override List<List<double>> GenerateValues() { 50 58 List<List<double>> data = new List<List<double>>(); … … 54 62 List<List<double>> testData = new List<List<double>>() { oneVariableTestData, oneVariableTestData }; 55 63 var combinations = ValueGenerator.GenerateAllCombinationsOfValuesInLists(testData).ToList<IEnumerable<double>>(); 64 var rand = new MersenneTwister((uint)Seed); 56 65 57 66 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()); 59 68 data[i].AddRange(combinations[i]); 60 69 } -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Vladislavleva/RippleFunction.cs
r14185 r14228 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 300; } } 46 47 protected override int TestPartitionEnd { get { return 300 + 1000; } } 48 public int Seed { get; } 47 49 50 public RippleFunction() : this((int)DateTime.Now.Ticks) { } 51 52 public RippleFunction(int seed) : base() { 53 Seed = seed; 54 } 48 55 protected override List<List<double>> GenerateValues() { 49 56 List<List<double>> data = new List<List<double>>(); 57 var rand = new MersenneTwister((uint)Seed); 50 58 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()); 52 60 } 53 61 54 62 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)); 56 64 } 57 65 -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Vladislavleva/SineCosineFunction.cs
r14185 r14228 24 24 using System.Linq; 25 25 using HeuristicLab.Common; 26 using HeuristicLab.Random; 26 27 27 28 namespace HeuristicLab.Problems.Instances.DataAnalysis { … … 46 47 protected override int TestPartitionStart { get { return 30; } } 47 48 protected override int TestPartitionEnd { get { return 30 + (306 * 306); } } 49 public int Seed { get; } 48 50 51 public SineCosineFunction() : this((int)DateTime.Now.Ticks) { } 52 53 public SineCosineFunction(int seed) : base() { 54 Seed = seed; 55 } 49 56 protected override List<List<double>> GenerateValues() { 50 57 List<List<double>> data = new List<List<double>>(); … … 53 60 var combinations = ValueGenerator.GenerateAllCombinationsOfValuesInLists(testData).ToList<IEnumerable<double>>(); 54 61 62 var rand = new MersenneTwister((uint)Seed); 55 63 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()); 57 65 data[i].AddRange(combinations[i]); 58 66 } -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Vladislavleva/UnwrappedBallFunctionFiveDimensional.cs
r14185 r14228 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 1024; } } 46 47 protected override int TestPartitionEnd { get { return 6024; } } 48 public int Seed { get; } 47 49 50 public UnwrappedBallFunctionFiveDimensional() : this((int)DateTime.Now.Ticks) { } 51 52 public UnwrappedBallFunctionFiveDimensional(int seed) : base() { 53 Seed = seed; 54 } 48 55 protected override List<List<double>> GenerateValues() { 49 56 List<List<double>> data = new List<List<double>>(); 57 var rand = new MersenneTwister((uint)Seed); 50 58 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)); 53 61 } 54 62 -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Vladislavleva/VladislavlevaInstanceProvider.cs
r14185 r14228 22 22 using System; 23 23 using System.Collections.Generic; 24 using HeuristicLab.Random; 24 25 25 26 namespace HeuristicLab.Problems.Instances.DataAnalysis { … … 38 39 } 39 40 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 40 48 public override IEnumerable<IDataDescriptor> GetDataDescriptors() { 41 49 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())); 43 52 descriptorList.Add(new SalutowiczFunctionOneDimensional()); 44 53 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())); 50 59 return descriptorList; 51 60 }
Note: See TracChangeset
for help on using the changeset viewer.