Changeset 14228 for trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Vladislavleva/KotanchekFunction.cs
- Timestamp:
- 08/02/16 18:09:47 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 }
Note: See TracChangeset
for help on using the changeset viewer.