Changeset 14305 for stable/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/FeatureSelection
- Timestamp:
- 09/23/16 12:57:27 (8 years ago)
- Location:
- stable
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk/sources merged: 14228-14229
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Problems.Instances.DataAnalysis
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis merged: 14228-14229
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/FeatureSelection/FeatureSelectionInstanceProvider.cs
r14186 r14305 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.