Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/14/11 17:08:32 (12 years ago)
Author:
sforsten
Message:

#1669: First version with a simpler design as discussed with Michael Kommenda has been implemented and will be tested soon. Currently only the KotanchekFunction.cs is changed accordingly. Other benchmarks are going to follow soon.

The classes for the different distributions are not needed any longer. Static methods in RegressionBenchmark replace them.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Benchmarks/3.4/RegressionBenchmarks/RationalPolynomial.cs

    r6968 r6991  
    2525using HeuristicLab.Common;
    2626using HeuristicLab.Core;
    27 using HeuristicLab.Data;
    2827
    2928namespace HeuristicLab.Problems.DataAnalysis.Benchmarks {
     
    3231
    3332    public RationalPolynomial() {
    34       Name = "Rational polynomial (3d)";
    35       TargetVariable = "y";
    36       Inputvariables = new Dictionary<string, IntRange>() {
    37         {"x1", new IntRange(0, 2)},
    38         {"x2", new IntRange(1, 2)},
    39         {"x3", new IntRange(1, 2)}
    40       };
    41       AmountOfPoints = 4000;
    42       TrainingPartition = new IntRange(0, 2667);
    43       TestPartition = new IntRange(TrainingPartition.End, AmountOfPoints);
     33      //Name = "Rational polynomial (3d)";
     34      //TargetVariable = "y";
     35
     36      //var inputVariables = new Dictionary<string, RandomDistribution>() {
     37      //  {"x1", new UniformalDistribution(0, 2)},
     38      //  {"x2", new UniformalDistribution(1, 2)},
     39      //  {"x3", new UniformalDistribution(1, 2)}
     40      //};
     41
     42      //TestData = new DatasetDefinition(2667, inputVariables);
     43      //TrainingData = new DatasetDefinition(1333, inputVariables);
    4444    }
    4545
     
    5454    #endregion
    5555
    56     protected override double CalculateFunction(Dictionary<string, IList<double>> data, List<string> vars) {
     56    protected override double CalculateFunction(Dictionary<string, IList<double>> data) {
    5757      double x1 = data[vars.ElementAt(0)].Last();
    5858      double x2 = data[vars.ElementAt(1)].Last();
     
    6060      return (30 * (x1 - 1) * (x3 - 1)) / ((x1 - 10) * Math.Pow(x2, 2));
    6161    }
     62
     63    public override List<string> InputVariable {
     64      get { throw new NotImplementedException(); }
     65    }
     66
     67    public override string TargetVariable {
     68      get { throw new NotImplementedException(); }
     69    }
     70
     71    public override Data.IntRange TrainingPartition {
     72      get { throw new NotImplementedException(); }
     73    }
     74
     75    public override Data.IntRange TestPartition {
     76      get { throw new NotImplementedException(); }
     77    }
     78
     79    protected override Dictionary<string, IList<double>> GenerateInput(Dictionary<string, IList<double>> data) {
     80      throw new NotImplementedException();
     81    }
    6282  }
    6383}
Note: See TracChangeset for help on using the changeset viewer.