Free cookie consent management tool by TermsFeed Policy Generator

Changeset 7095


Ignore:
Timestamp:
11/29/11 14:58:06 (11 years ago)
Author:
sforsten
Message:

#1669: Input variables of Korn functions have been adjusted according to the description.

Location:
branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Benchmarks/3.4
Files:
16 edited

Legend:

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

    r7085 r7095  
    5252    #endregion
    5353
     54    protected static FastRandom rand = new FastRandom();
     55
    5456    protected RegressionBenchmark() { }
    5557    protected RegressionBenchmark(RegressionBenchmark original, Cloner cloner)
     
    6769    public static List<double> GenerateUniformDistributedValues(int amount, DoubleRange range) {
    6870      List<double> values = new List<double>();
    69       System.Random rand = new System.Random();
    7071      for (int i = 0; i < amount; i++) {
    7172        values.Add(rand.NextDouble() * (range.End - range.Start) + range.Start);
     
    7677    public static List<double> GenerateNormalDistributedValues(int amount, double mu, double sigma) {
    7778      List<double> values = new List<double>();
    78       FastRandom rand = new FastRandom();
    7979      for (int i = 0; i < amount; i++) {
    8080        values.Add(NormalDistributedRandom.NextDouble(rand, mu, sigma));
  • branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Benchmarks/3.4/RegressionBenchmarks/Korns/KornFunctionEight.cs

    r7044 r7095  
    2828
    2929    public KornFunctionEight() {
    30       Name = "Korn 8 y = 6.87 + (11 * cos(7.23 * X0 * X3 * X4))";
     30      Name = "Korn 8 y = 6.87 + (11 * sqrt(7.23 * X0 * X3 * X4))";
    3131      Description = "Paper: Accuracy in Symbolic Regression" + Environment.NewLine
    3232        + "Authors: Michael F. Korns" + Environment.NewLine
    33         + "Function: y = 6.87 + (11 * cos(7.23 * X0 * X3 * X4))" + Environment.NewLine
     33        + "Function: y = 6.87 + (11 * sqrt(7.23 * X0 * X3 * X4))" + Environment.NewLine
    3434        + "Real Numbers: 3.45, -.982, 100.389, and all other real constants" + Environment.NewLine
    3535        + "Row Features: x1, x2, x9, and all other features" + Environment.NewLine
     
    3939        + "We test each of the test cases on matrices of 10000 rows by 1 to 5 columns with no noise. "
    4040        + "For each test a training matrix is filled with random numbers between -50 and +50. The test case "
    41         + "target expressions are limited to one basis function whose maximum depth is three grammar nodes.\"";
     41        + "target expressions are limited to one basis function whose maximum depth is three grammar nodes.\"" + Environment.NewLine + Environment.NewLine
     42        + "Note: Because of the square root only non-negatic values are created for the input variables!";
    4243      targetVariable = "Y";
    43       inputVariables = new List<string>() { "X0", "X3", "X4" };
     44      inputVariables = new List<string>() { "X0", "X1", "X2", "X3", "X4" };
    4445      trainingPartition = new IntRange(0, 5000);
    4546      testPartition = new IntRange(5001, 10000);
     
    5152      for (int i = 0; i < data[0].Count; i++) {
    5253        x0 = data[0][i];
    53         x3 = data[1][i];
    54         x4 = data[2][i];
    55         results.Add(6.87 + (11 * Math.Cos(7.23 * x0 * x3 * x4)));
     54        x3 = data[3][i];
     55        x4 = data[4][i];
     56        results.Add(6.87 + (11 * Math.Sqrt(7.23 * x0 * x3 * x4)));
    5657      }
    5758      return results;
     
    6061    protected override List<List<double>> GenerateInput() {
    6162      List<List<double>> dataList = new List<List<double>>();
    62       DoubleRange range = new DoubleRange(-50, 50);
     63      DoubleRange range = new DoubleRange(0, 50);
    6364      for (int i = 0; i < inputVariables.Count; i++) {
    6465        dataList.Add(RegressionBenchmark.GenerateUniformDistributedValues(testPartition.End, range));
  • branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Benchmarks/3.4/RegressionBenchmarks/Korns/KornFunctionEleven.cs

    r7044 r7095  
    4141        + "target expressions are limited to one basis function whose maximum depth is three grammar nodes.\"";
    4242      targetVariable = "Y";
    43       inputVariables = new List<string>() { "X0" };
     43      inputVariables = new List<string>() { "X0", "X1", "X2", "X3", "X4" };
    4444      trainingPartition = new IntRange(0, 5000);
    4545      testPartition = new IntRange(5001, 10000);
  • branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Benchmarks/3.4/RegressionBenchmarks/Korns/KornFunctionFive.cs

    r7044 r7095  
    3939        + "We test each of the test cases on matrices of 10000 rows by 1 to 5 columns with no noise. "
    4040        + "For each test a training matrix is filled with random numbers between -50 and +50. The test case "
    41         + "target expressions are limited to one basis function whose maximum depth is three grammar nodes.\"";
     41        + "target expressions are limited to one basis function whose maximum depth is three grammar nodes.\"" + Environment.NewLine + Environment.NewLine
     42        + "Note: Because of the logarithm only non-negatic values are created for the input variables!";
    4243      targetVariable = "Y";
    43       inputVariables = new List<string>() { "X4" };
     44      inputVariables = new List<string>() { "X0", "X1", "X2", "X3", "X4" };
    4445      trainingPartition = new IntRange(0, 5000);
    4546      testPartition = new IntRange(5001, 10000);
     
    5051      List<double> results = new List<double>();
    5152      for (int i = 0; i < data[0].Count; i++) {
    52         x4 = data[0][i];
     53        x4 = data[4][i];
    5354        results.Add(3.0 + (2.13 * Math.Log(x4)));
    5455      }
     
    5859    protected override List<List<double>> GenerateInput() {
    5960      List<List<double>> dataList = new List<List<double>>();
    60       DoubleRange range = new DoubleRange(-50, 50);
     61      DoubleRange range = new DoubleRange(0, 50);
    6162      for (int i = 0; i < inputVariables.Count; i++) {
    6263        dataList.Add(RegressionBenchmark.GenerateUniformDistributedValues(testPartition.End, range));
  • branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Benchmarks/3.4/RegressionBenchmarks/Korns/KornFunctionFiveteen.cs

    r7044 r7095  
    3939        + "We test each of the test cases on matrices of 10000 rows by 1 to 5 columns with no noise. "
    4040        + "For each test a training matrix is filled with random numbers between -50 and +50. The test case "
    41         + "target expressions are limited to one basis function whose maximum depth is three grammar nodes.\"";
     41        + "target expressions are limited to one basis function whose maximum depth is three grammar nodes.\"" + Environment.NewLine + Environment.NewLine
     42        + "Note: Because of the logarithm only non-negatic values are created for the input variables!";
    4243      targetVariable = "Y";
    43       inputVariables = new List<string>() { "X0", "X1", "X2", "X3" };
     44      inputVariables = new List<string>() { "X0", "X1", "X2", "X3", "X4" };
    4445      trainingPartition = new IntRange(0, 5000);
    4546      testPartition = new IntRange(5001, 10000);
     
    6162    protected override List<List<double>> GenerateInput() {
    6263      List<List<double>> dataList = new List<List<double>>();
    63       DoubleRange range = new DoubleRange(-50, 50);
     64      DoubleRange range = new DoubleRange(0, 50);
    6465      for (int i = 0; i < inputVariables.Count; i++) {
    6566        dataList.Add(RegressionBenchmark.GenerateUniformDistributedValues(testPartition.End, range));
  • branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Benchmarks/3.4/RegressionBenchmarks/Korns/KornFunctionFour.cs

    r7044 r7095  
    4141        + "target expressions are limited to one basis function whose maximum depth is three grammar nodes.\"";
    4242      targetVariable = "Y";
    43       inputVariables = new List<string>() { "X2" };
     43      inputVariables = new List<string>() { "X0", "X1", "X2", "X3", "X4" };
    4444      trainingPartition = new IntRange(0, 5000);
    4545      testPartition = new IntRange(5001, 10000);
     
    5050      List<double> results = new List<double>();
    5151      for (int i = 0; i < data[0].Count; i++) {
    52         x2 = data[0][i];
     52        x2 = data[2][i];
    5353        results.Add(-2.3 + (0.13 * Math.Sin(x2)));
    5454      }
  • branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Benchmarks/3.4/RegressionBenchmarks/Korns/KornFunctionFourteen.cs

    r7044 r7095  
    4141        + "target expressions are limited to one basis function whose maximum depth is three grammar nodes.\"";
    4242      targetVariable = "Y";
    43       inputVariables = new List<string>() { "X0", "X1", "X2", "X3" };
     43      inputVariables = new List<string>() { "X0", "X1", "X2", "X3", "X4" };
    4444      trainingPartition = new IntRange(0, 5000);
    4545      testPartition = new IntRange(5001, 10000);
  • branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Benchmarks/3.4/RegressionBenchmarks/Korns/KornFunctionNine.cs

    r7044 r7095  
    3939        + "We test each of the test cases on matrices of 10000 rows by 1 to 5 columns with no noise. "
    4040        + "For each test a training matrix is filled with random numbers between -50 and +50. The test case "
    41         + "target expressions are limited to one basis function whose maximum depth is three grammar nodes.\"";
     41        + "target expressions are limited to one basis function whose maximum depth is three grammar nodes.\"" + Environment.NewLine + Environment.NewLine
     42        + "Note: Because of the square root and the logarithm only non-negatic values are created for the input variables!";
    4243      targetVariable = "Y";
    43       inputVariables = new List<string>() { "X0", "X1", "X2", "X3" };
     44      inputVariables = new List<string>() { "X0", "X1", "X2", "X3", "X4" };
    4445      trainingPartition = new IntRange(0, 5000);
    4546      testPartition = new IntRange(5001, 10000);
     
    6162    protected override List<List<double>> GenerateInput() {
    6263      List<List<double>> dataList = new List<List<double>>();
    63       DoubleRange range = new DoubleRange(-50, 50);
     64      DoubleRange range = new DoubleRange(0, 50);
    6465      for (int i = 0; i < inputVariables.Count; i++) {
    6566        dataList.Add(RegressionBenchmark.GenerateUniformDistributedValues(testPartition.End, range));
  • branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Benchmarks/3.4/RegressionBenchmarks/Korns/KornFunctionOne.cs

    r7044 r7095  
    4141        + "target expressions are limited to one basis function whose maximum depth is three grammar nodes.\"";
    4242      targetVariable = "Y";
    43       inputVariables = new List<string>() { "X3" };
     43      inputVariables = new List<string>() { "X0", "X1", "X2", "X3", "X4" };
    4444      trainingPartition = new IntRange(0, 5000);
    4545      testPartition = new IntRange(5001, 10000);
     
    5050      List<double> results = new List<double>();
    5151      for (int i = 0; i < data[0].Count; i++) {
    52         x3 = data[0][i];
     52        x3 = data[3][i];
    5353        results.Add(1.57 + (24.3 * x3));
    5454      }
     
    5959      List<List<double>> dataList = new List<List<double>>();
    6060      DoubleRange range = new DoubleRange(-50, 50);
    61       dataList.Add(RegressionBenchmark.GenerateUniformDistributedValues(testPartition.End, range));
     61      for (int i = 0; i < inputVariables.Count; i++) {
     62        dataList.Add(RegressionBenchmark.GenerateUniformDistributedValues(testPartition.End, range));
     63      }
    6264
    6365      return dataList;
  • branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Benchmarks/3.4/RegressionBenchmarks/Korns/KornFunctionSeven.cs

    r7044 r7095  
    4141        + "target expressions are limited to one basis function whose maximum depth is three grammar nodes.\"";
    4242      targetVariable = "Y";
    43       inputVariables = new List<string>() { "X0" };
     43      inputVariables = new List<string>() { "X0", "X1", "X2", "X3", "X4" };
    4444      trainingPartition = new IntRange(0, 5000);
    4545      testPartition = new IntRange(5001, 10000);
  • branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Benchmarks/3.4/RegressionBenchmarks/Korns/KornFunctionSix.cs

    r7044 r7095  
    3939        + "We test each of the test cases on matrices of 10000 rows by 1 to 5 columns with no noise. "
    4040        + "For each test a training matrix is filled with random numbers between -50 and +50. The test case "
    41         + "target expressions are limited to one basis function whose maximum depth is three grammar nodes.\"";
     41        + "target expressions are limited to one basis function whose maximum depth is three grammar nodes.\"" + Environment.NewLine + Environment.NewLine
     42        + "Note: Because of the square root only non-negatic values are created for the input variables!";
    4243      targetVariable = "Y";
    43       inputVariables = new List<string>() { "X0" };
     44      inputVariables = new List<string>() { "X0", "X1", "X2", "X3", "X4" };
    4445      trainingPartition = new IntRange(0, 5000);
    4546      testPartition = new IntRange(5001, 10000);
     
    5859    protected override List<List<double>> GenerateInput() {
    5960      List<List<double>> dataList = new List<List<double>>();
    60       DoubleRange range = new DoubleRange(-50, 50);
     61      DoubleRange range = new DoubleRange(0, 50);
    6162      for (int i = 0; i < inputVariables.Count; i++) {
    6263        dataList.Add(RegressionBenchmark.GenerateUniformDistributedValues(testPartition.End, range));
  • branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Benchmarks/3.4/RegressionBenchmarks/Korns/KornFunctionTen.cs

    r7044 r7095  
    4141        + "target expressions are limited to one basis function whose maximum depth is three grammar nodes.\"";
    4242      targetVariable = "Y";
    43       inputVariables = new List<string>() { "X1", "X2", "X3", "X4" };
     43      inputVariables = new List<string>() { "X0", "X1", "X2", "X3", "X4" };
    4444      trainingPartition = new IntRange(0, 5000);
    4545      testPartition = new IntRange(5001, 10000);
     
    5050      List<double> results = new List<double>();
    5151      for (int i = 0; i < data[0].Count; i++) {
    52         x1 = data[0][i];
    53         x2 = data[1][i];
    54         x3 = data[2][i];
    55         x4 = data[3][i];
     52        x1 = data[1][i];
     53        x2 = data[2][i];
     54        x3 = data[3][i];
     55        x4 = data[4][i];
    5656        results.Add(0.81 + (24.3 * (((2.0 * x1) + (3.0 * Math.Pow(x2, 2))) / ((4.0 * Math.Pow(x3, 3)) + (5.0 * Math.Pow(x4, 4))))));
    5757      }
  • branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Benchmarks/3.4/RegressionBenchmarks/Korns/KornFunctionThirteen.cs

    r7044 r7095  
    4141        + "target expressions are limited to one basis function whose maximum depth is three grammar nodes.\"";
    4242      targetVariable = "Y";
    43       inputVariables = new List<string>() { "X0", "X1", "X2", "X3" };
     43      inputVariables = new List<string>() { "X0", "X1", "X2", "X3", "X4" };
    4444      trainingPartition = new IntRange(0, 5000);
    4545      testPartition = new IntRange(5001, 10000);
  • branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Benchmarks/3.4/RegressionBenchmarks/Korns/KornFunctionThree.cs

    r7044 r7095  
    4141        + "target expressions are limited to one basis function whose maximum depth is three grammar nodes.\"";
    4242      targetVariable = "Y";
    43       inputVariables = new List<string>() { "X0", "X1", "X3", "X4" };
     43      inputVariables = new List<string>() { "X0", "X1", "X2", "X3", "X4" };
    4444      trainingPartition = new IntRange(0, 5000);
    4545      testPartition = new IntRange(5001, 10000);
     
    5252        x0 = data[0][i];
    5353        x1 = data[1][i];
    54         x3 = data[2][i];
    55         x4 = data[3][i];
     54        x3 = data[3][i];
     55        x4 = data[4][i];
    5656        results.Add(-5.41 + (4.9 * (((x3 - x0) + (x1 / x4)) / (3 * x4))));
    5757      }
  • branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Benchmarks/3.4/RegressionBenchmarks/Korns/KornFunctionTwelve.cs

    r7044 r7095  
    4141        + "target expressions are limited to one basis function whose maximum depth is three grammar nodes.\"";
    4242      targetVariable = "Y";
    43       inputVariables = new List<string>() { "X0", "X4" };
     43      inputVariables = new List<string>() { "X0", "X1", "X2", "X3", "X4" };
    4444      trainingPartition = new IntRange(0, 5000);
    4545      testPartition = new IntRange(5001, 10000);
     
    5151      for (int i = 0; i < data[0].Count; i++) {
    5252        x0 = data[0][i];
    53         x4 = data[0][i];
     53        x4 = data[4][i];
    5454        results.Add(2.0 - (2.1 * (Math.Cos(9.8 * x0) * Math.Sin(1.3 * x4))));
    5555      }
  • branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Benchmarks/3.4/RegressionBenchmarks/Korns/KornFunctionTwo.cs

    r7044 r7095  
    4141        + "target expressions are limited to one basis function whose maximum depth is three grammar nodes.\"";
    4242      targetVariable = "Y";
    43       inputVariables = new List<string>() { "X1", "X3", "X4" };
     43      inputVariables = new List<string>() { "X0", "X1", "X2", "X3", "X4" };
    4444      trainingPartition = new IntRange(0, 5000);
    4545      testPartition = new IntRange(5001, 10000);
     
    5050      List<double> results = new List<double>();
    5151      for (int i = 0; i < data[0].Count; i++) {
    52         x1 = data[0][i];
    53         x3 = data[1][i];
    54         x4 = data[2][i];
     52        x1 = data[1][i];
     53        x3 = data[3][i];
     54        x4 = data[4][i];
    5555        results.Add(0.23 + (14.2 * ((x3 + x1) / (3.0 * x4))));
    5656      }
     
    6464        dataList.Add(RegressionBenchmark.GenerateUniformDistributedValues(testPartition.End, range));
    6565      }
    66 
    6766      return dataList;
    6867    }
Note: See TracChangeset for help on using the changeset viewer.