Changeset 17364 for branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression
- Timestamp:
- 11/22/19 10:06:42 (5 years ago)
- Location:
- branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression
- Files:
-
- 2 added
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/ArtificialRegressionDataDescriptor.cs
r17180 r17364 20 20 #endregion 21 21 22 using System.Collections; 22 23 using System.Collections.Generic; 23 24 using HeuristicLab.Problems.DataAnalysis; … … 26 27 public abstract class ArtificialRegressionDataDescriptor : RegressionDataDescriptor { 27 28 public IRegressionProblemData GenerateRegressionData() { 28 Dataset dataset = new Dataset(VariableNames, this.GenerateValues()); 29 var values = GenerateValues(); 30 Dataset dataset = values != null 31 ? new Dataset(VariableNames, GenerateValues()) 32 : new Dataset(VariableNames, GenerateValuesExtended()); 29 33 return GenerateRegressionData(dataset); 30 34 } 31 35 32 36 protected abstract List<List<double>> GenerateValues(); 37 38 protected virtual List<IList> GenerateValuesExtended() { 39 return null; 40 } 33 41 } 34 42 } -
branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VectorData/VariousInstanceProvider.cs
r17362 r17364 25 25 26 26 namespace HeuristicLab.Problems.Instances.DataAnalysis { 27 public class V ariousInstanceProvider : ArtificialRegressionInstanceProvider {27 public class VectorDataInstanceProvider : ArtificialRegressionInstanceProvider { 28 28 public override string Name { 29 get { return "V ariousBenchmark Problems"; }29 get { return "Vector Data Benchmark Problems"; } 30 30 } 31 31 public override string Description { … … 40 40 public int Seed { get; private set; } 41 41 42 public VariousInstanceProvider() : this((int)DateTime.Now.Ticks) { } 42 public VectorDataInstanceProvider() 43 : this((int)DateTime.Now.Ticks) { } 43 44 44 public VariousInstanceProvider(int seed) : base() { 45 public VectorDataInstanceProvider(int seed) 46 : base() { 45 47 Seed = seed; 46 48 } 47 49 public override IEnumerable<IDataDescriptor> GetDataDescriptors() { 48 List<IDataDescriptor> descriptorList = new List<IDataDescriptor>();49 50 var rand = new MersenneTwister((uint)Seed); 50 descriptorList.Add(new BreimanOne(rand.Next())); 51 descriptorList.Add(new FriedmanOne(rand.Next())); 52 descriptorList.Add(new FriedmanTwo(rand.Next())); 53 descriptorList.Add(new PolyTen(rand.Next())); 54 descriptorList.Add(new SpatialCoevolution(rand.Next())); 55 return descriptorList; 51 return new List<IDataDescriptor> { 52 new VectorDataTestOne(rand.Next()) 53 }; 56 54 } 57 55 }
Note: See TracChangeset
for help on using the changeset viewer.