Changeset 16692 for branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/FeatureSelection/FeatureSelectionInstanceProvider.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/FeatureSelection/FeatureSelectionInstanceProvider.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. … … 41 41 get { return ""; } 42 42 } 43 public int Seed { get; private set; } 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>()
Note: See TracChangeset
for help on using the changeset viewer.