Changeset 15281 for branches/Async/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Vladislavleva/KotanchekFunction.cs
- Timestamp:
- 07/23/17 11:17:18 (7 years ago)
- Location:
- branches/Async
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Async
- Property svn:ignore
-
old new 24 24 protoc.exe 25 25 obj 26 .vs
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/Async/HeuristicLab.Problems.Instances.DataAnalysis
- Property svn:mergeinfo changed
-
branches/Async/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Vladislavleva/KotanchekFunction.cs
r15280 r15281 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 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; private set; } 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.