Changeset 7044 for branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Benchmarks/3.4/Generator
- Timestamp:
- 11/22/11 16:52:43 (13 years ago)
- Location:
- branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Benchmarks/3.4/Generator
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Benchmarks/3.4/Generator/RegressionBenchmark.cs
r7025 r7044 57 57 } 58 58 59 protected abstract List<double> CalculateFunction(List<List<double>> data); 60 61 protected abstract List<List<double>> GenerateInput(List<List<double>> dataList); 62 63 public IDataAnalysisProblemData GenerateProblemData() { 64 List<string> varNames = new List<string>(); 65 varNames.Add(this.TargetVariable); 66 varNames.AddRange(InputVariable); 67 68 List<List<double>> dataList = GenerateInput(new List<List<double>>()); 69 70 dataList.Insert(0, CalculateFunction(dataList)); 71 72 Dataset dataset = new Dataset(varNames, dataList); 73 74 RegressionProblemData problemData = new RegressionProblemData(dataset, dataset.DoubleVariables.Skip(1), dataset.DoubleVariables.First()); 75 76 problemData.Name = "Data generated for benchmark problem \"" + this.Name + "\""; 77 problemData.Description = this.Description; 78 79 problemData.TestPartition.Start = this.TestPartition.Start; 80 problemData.TestPartition.End = this.TestPartition.End; 81 82 problemData.TrainingPartition.Start = this.TrainingPartition.Start; 83 problemData.TrainingPartition.End = this.TrainingPartition.End; 84 85 return problemData; 86 } 59 public abstract IDataAnalysisProblemData GenerateProblemData(); 87 60 88 61 public static List<double> GenerateSteps(DoubleRange range, double stepWidth) {
Note: See TracChangeset
for help on using the changeset viewer.