Changeset 14228 for trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Various/FriedmanOne.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/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
Note: See TracChangeset
for help on using the changeset viewer.