- Timestamp:
- 11/29/11 14:58:06 (13 years ago)
- 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 52 52 #endregion 53 53 54 protected static FastRandom rand = new FastRandom(); 55 54 56 protected RegressionBenchmark() { } 55 57 protected RegressionBenchmark(RegressionBenchmark original, Cloner cloner) … … 67 69 public static List<double> GenerateUniformDistributedValues(int amount, DoubleRange range) { 68 70 List<double> values = new List<double>(); 69 System.Random rand = new System.Random();70 71 for (int i = 0; i < amount; i++) { 71 72 values.Add(rand.NextDouble() * (range.End - range.Start) + range.Start); … … 76 77 public static List<double> GenerateNormalDistributedValues(int amount, double mu, double sigma) { 77 78 List<double> values = new List<double>(); 78 FastRandom rand = new FastRandom();79 79 for (int i = 0; i < amount; i++) { 80 80 values.Add(NormalDistributedRandom.NextDouble(rand, mu, sigma)); -
branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Benchmarks/3.4/RegressionBenchmarks/Korns/KornFunctionEight.cs
r7044 r7095 28 28 29 29 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))"; 31 31 Description = "Paper: Accuracy in Symbolic Regression" + Environment.NewLine 32 32 + "Authors: Michael F. Korns" + Environment.NewLine 33 + "Function: y = 6.87 + (11 * cos(7.23 * X0 * X3 * X4))" + Environment.NewLine33 + "Function: y = 6.87 + (11 * sqrt(7.23 * X0 * X3 * X4))" + Environment.NewLine 34 34 + "Real Numbers: 3.45, -.982, 100.389, and all other real constants" + Environment.NewLine 35 35 + "Row Features: x1, x2, x9, and all other features" + Environment.NewLine … … 39 39 + "We test each of the test cases on matrices of 10000 rows by 1 to 5 columns with no noise. " 40 40 + "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!"; 42 43 targetVariable = "Y"; 43 inputVariables = new List<string>() { "X0", "X 3", "X4" };44 inputVariables = new List<string>() { "X0", "X1", "X2", "X3", "X4" }; 44 45 trainingPartition = new IntRange(0, 5000); 45 46 testPartition = new IntRange(5001, 10000); … … 51 52 for (int i = 0; i < data[0].Count; i++) { 52 53 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))); 56 57 } 57 58 return results; … … 60 61 protected override List<List<double>> GenerateInput() { 61 62 List<List<double>> dataList = new List<List<double>>(); 62 DoubleRange range = new DoubleRange( -50, 50);63 DoubleRange range = new DoubleRange(0, 50); 63 64 for (int i = 0; i < inputVariables.Count; i++) { 64 65 dataList.Add(RegressionBenchmark.GenerateUniformDistributedValues(testPartition.End, range)); -
branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Benchmarks/3.4/RegressionBenchmarks/Korns/KornFunctionEleven.cs
r7044 r7095 41 41 + "target expressions are limited to one basis function whose maximum depth is three grammar nodes.\""; 42 42 targetVariable = "Y"; 43 inputVariables = new List<string>() { "X0" };43 inputVariables = new List<string>() { "X0", "X1", "X2", "X3", "X4" }; 44 44 trainingPartition = new IntRange(0, 5000); 45 45 testPartition = new IntRange(5001, 10000); -
branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Benchmarks/3.4/RegressionBenchmarks/Korns/KornFunctionFive.cs
r7044 r7095 39 39 + "We test each of the test cases on matrices of 10000 rows by 1 to 5 columns with no noise. " 40 40 + "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!"; 42 43 targetVariable = "Y"; 43 inputVariables = new List<string>() { "X 4" };44 inputVariables = new List<string>() { "X0", "X1", "X2", "X3", "X4" }; 44 45 trainingPartition = new IntRange(0, 5000); 45 46 testPartition = new IntRange(5001, 10000); … … 50 51 List<double> results = new List<double>(); 51 52 for (int i = 0; i < data[0].Count; i++) { 52 x4 = data[ 0][i];53 x4 = data[4][i]; 53 54 results.Add(3.0 + (2.13 * Math.Log(x4))); 54 55 } … … 58 59 protected override List<List<double>> GenerateInput() { 59 60 List<List<double>> dataList = new List<List<double>>(); 60 DoubleRange range = new DoubleRange( -50, 50);61 DoubleRange range = new DoubleRange(0, 50); 61 62 for (int i = 0; i < inputVariables.Count; i++) { 62 63 dataList.Add(RegressionBenchmark.GenerateUniformDistributedValues(testPartition.End, range)); -
branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Benchmarks/3.4/RegressionBenchmarks/Korns/KornFunctionFiveteen.cs
r7044 r7095 39 39 + "We test each of the test cases on matrices of 10000 rows by 1 to 5 columns with no noise. " 40 40 + "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!"; 42 43 targetVariable = "Y"; 43 inputVariables = new List<string>() { "X0", "X1", "X2", "X3" };44 inputVariables = new List<string>() { "X0", "X1", "X2", "X3", "X4" }; 44 45 trainingPartition = new IntRange(0, 5000); 45 46 testPartition = new IntRange(5001, 10000); … … 61 62 protected override List<List<double>> GenerateInput() { 62 63 List<List<double>> dataList = new List<List<double>>(); 63 DoubleRange range = new DoubleRange( -50, 50);64 DoubleRange range = new DoubleRange(0, 50); 64 65 for (int i = 0; i < inputVariables.Count; i++) { 65 66 dataList.Add(RegressionBenchmark.GenerateUniformDistributedValues(testPartition.End, range)); -
branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Benchmarks/3.4/RegressionBenchmarks/Korns/KornFunctionFour.cs
r7044 r7095 41 41 + "target expressions are limited to one basis function whose maximum depth is three grammar nodes.\""; 42 42 targetVariable = "Y"; 43 inputVariables = new List<string>() { "X 2" };43 inputVariables = new List<string>() { "X0", "X1", "X2", "X3", "X4" }; 44 44 trainingPartition = new IntRange(0, 5000); 45 45 testPartition = new IntRange(5001, 10000); … … 50 50 List<double> results = new List<double>(); 51 51 for (int i = 0; i < data[0].Count; i++) { 52 x2 = data[ 0][i];52 x2 = data[2][i]; 53 53 results.Add(-2.3 + (0.13 * Math.Sin(x2))); 54 54 } -
branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Benchmarks/3.4/RegressionBenchmarks/Korns/KornFunctionFourteen.cs
r7044 r7095 41 41 + "target expressions are limited to one basis function whose maximum depth is three grammar nodes.\""; 42 42 targetVariable = "Y"; 43 inputVariables = new List<string>() { "X0", "X1", "X2", "X3" };43 inputVariables = new List<string>() { "X0", "X1", "X2", "X3", "X4" }; 44 44 trainingPartition = new IntRange(0, 5000); 45 45 testPartition = new IntRange(5001, 10000); -
branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Benchmarks/3.4/RegressionBenchmarks/Korns/KornFunctionNine.cs
r7044 r7095 39 39 + "We test each of the test cases on matrices of 10000 rows by 1 to 5 columns with no noise. " 40 40 + "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!"; 42 43 targetVariable = "Y"; 43 inputVariables = new List<string>() { "X0", "X1", "X2", "X3" };44 inputVariables = new List<string>() { "X0", "X1", "X2", "X3", "X4" }; 44 45 trainingPartition = new IntRange(0, 5000); 45 46 testPartition = new IntRange(5001, 10000); … … 61 62 protected override List<List<double>> GenerateInput() { 62 63 List<List<double>> dataList = new List<List<double>>(); 63 DoubleRange range = new DoubleRange( -50, 50);64 DoubleRange range = new DoubleRange(0, 50); 64 65 for (int i = 0; i < inputVariables.Count; i++) { 65 66 dataList.Add(RegressionBenchmark.GenerateUniformDistributedValues(testPartition.End, range)); -
branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Benchmarks/3.4/RegressionBenchmarks/Korns/KornFunctionOne.cs
r7044 r7095 41 41 + "target expressions are limited to one basis function whose maximum depth is three grammar nodes.\""; 42 42 targetVariable = "Y"; 43 inputVariables = new List<string>() { "X 3" };43 inputVariables = new List<string>() { "X0", "X1", "X2", "X3", "X4" }; 44 44 trainingPartition = new IntRange(0, 5000); 45 45 testPartition = new IntRange(5001, 10000); … … 50 50 List<double> results = new List<double>(); 51 51 for (int i = 0; i < data[0].Count; i++) { 52 x3 = data[ 0][i];52 x3 = data[3][i]; 53 53 results.Add(1.57 + (24.3 * x3)); 54 54 } … … 59 59 List<List<double>> dataList = new List<List<double>>(); 60 60 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 } 62 64 63 65 return dataList; -
branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Benchmarks/3.4/RegressionBenchmarks/Korns/KornFunctionSeven.cs
r7044 r7095 41 41 + "target expressions are limited to one basis function whose maximum depth is three grammar nodes.\""; 42 42 targetVariable = "Y"; 43 inputVariables = new List<string>() { "X0" };43 inputVariables = new List<string>() { "X0", "X1", "X2", "X3", "X4" }; 44 44 trainingPartition = new IntRange(0, 5000); 45 45 testPartition = new IntRange(5001, 10000); -
branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Benchmarks/3.4/RegressionBenchmarks/Korns/KornFunctionSix.cs
r7044 r7095 39 39 + "We test each of the test cases on matrices of 10000 rows by 1 to 5 columns with no noise. " 40 40 + "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!"; 42 43 targetVariable = "Y"; 43 inputVariables = new List<string>() { "X0" };44 inputVariables = new List<string>() { "X0", "X1", "X2", "X3", "X4" }; 44 45 trainingPartition = new IntRange(0, 5000); 45 46 testPartition = new IntRange(5001, 10000); … … 58 59 protected override List<List<double>> GenerateInput() { 59 60 List<List<double>> dataList = new List<List<double>>(); 60 DoubleRange range = new DoubleRange( -50, 50);61 DoubleRange range = new DoubleRange(0, 50); 61 62 for (int i = 0; i < inputVariables.Count; i++) { 62 63 dataList.Add(RegressionBenchmark.GenerateUniformDistributedValues(testPartition.End, range)); -
branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Benchmarks/3.4/RegressionBenchmarks/Korns/KornFunctionTen.cs
r7044 r7095 41 41 + "target expressions are limited to one basis function whose maximum depth is three grammar nodes.\""; 42 42 targetVariable = "Y"; 43 inputVariables = new List<string>() { "X 1", "X2", "X3", "X4" };43 inputVariables = new List<string>() { "X0", "X1", "X2", "X3", "X4" }; 44 44 trainingPartition = new IntRange(0, 5000); 45 45 testPartition = new IntRange(5001, 10000); … … 50 50 List<double> results = new List<double>(); 51 51 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]; 56 56 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)))))); 57 57 } -
branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Benchmarks/3.4/RegressionBenchmarks/Korns/KornFunctionThirteen.cs
r7044 r7095 41 41 + "target expressions are limited to one basis function whose maximum depth is three grammar nodes.\""; 42 42 targetVariable = "Y"; 43 inputVariables = new List<string>() { "X0", "X1", "X2", "X3" };43 inputVariables = new List<string>() { "X0", "X1", "X2", "X3", "X4" }; 44 44 trainingPartition = new IntRange(0, 5000); 45 45 testPartition = new IntRange(5001, 10000); -
branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Benchmarks/3.4/RegressionBenchmarks/Korns/KornFunctionThree.cs
r7044 r7095 41 41 + "target expressions are limited to one basis function whose maximum depth is three grammar nodes.\""; 42 42 targetVariable = "Y"; 43 inputVariables = new List<string>() { "X0", "X1", "X 3", "X4" };43 inputVariables = new List<string>() { "X0", "X1", "X2", "X3", "X4" }; 44 44 trainingPartition = new IntRange(0, 5000); 45 45 testPartition = new IntRange(5001, 10000); … … 52 52 x0 = data[0][i]; 53 53 x1 = data[1][i]; 54 x3 = data[ 2][i];55 x4 = data[ 3][i];54 x3 = data[3][i]; 55 x4 = data[4][i]; 56 56 results.Add(-5.41 + (4.9 * (((x3 - x0) + (x1 / x4)) / (3 * x4)))); 57 57 } -
branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Benchmarks/3.4/RegressionBenchmarks/Korns/KornFunctionTwelve.cs
r7044 r7095 41 41 + "target expressions are limited to one basis function whose maximum depth is three grammar nodes.\""; 42 42 targetVariable = "Y"; 43 inputVariables = new List<string>() { "X0", "X 4" };43 inputVariables = new List<string>() { "X0", "X1", "X2", "X3", "X4" }; 44 44 trainingPartition = new IntRange(0, 5000); 45 45 testPartition = new IntRange(5001, 10000); … … 51 51 for (int i = 0; i < data[0].Count; i++) { 52 52 x0 = data[0][i]; 53 x4 = data[ 0][i];53 x4 = data[4][i]; 54 54 results.Add(2.0 - (2.1 * (Math.Cos(9.8 * x0) * Math.Sin(1.3 * x4)))); 55 55 } -
branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Benchmarks/3.4/RegressionBenchmarks/Korns/KornFunctionTwo.cs
r7044 r7095 41 41 + "target expressions are limited to one basis function whose maximum depth is three grammar nodes.\""; 42 42 targetVariable = "Y"; 43 inputVariables = new List<string>() { "X 1", "X3", "X4" };43 inputVariables = new List<string>() { "X0", "X1", "X2", "X3", "X4" }; 44 44 trainingPartition = new IntRange(0, 5000); 45 45 testPartition = new IntRange(5001, 10000); … … 50 50 List<double> results = new List<double>(); 51 51 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]; 55 55 results.Add(0.23 + (14.2 * ((x3 + x1) / (3.0 * x4)))); 56 56 } … … 64 64 dataList.Add(RegressionBenchmark.GenerateUniformDistributedValues(testPartition.End, range)); 65 65 } 66 67 66 return dataList; 68 67 }
Note: See TracChangeset
for help on using the changeset viewer.