Changeset 16692 for branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Vladislavleva/RippleFunction.cs
- Timestamp:
- 03/18/19 17:24:30 (6 years ago)
- Location:
- branches/2521_ProblemRefactoring
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring
- Property svn:ignore
-
old new 24 24 protoc.exe 25 25 obj 26 .vs
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis
- Property svn:mergeinfo changed
-
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Vladislavleva/RippleFunction.cs
r12012 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 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; private set; } 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
Note: See TracChangeset
for help on using the changeset viewer.