Changeset 17915 for branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression
- Timestamp:
- 03/25/21 18:06:47 (4 years ago)
- Location:
- branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression
- Files:
-
- 2 added
- 2 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/GPTP2021VectorBenchmarks/GPTP2021VectorBenchmarksInstanceProvider.cs
r17851 r17915 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.IO.Compression; 25 using System.Linq; 26 using System.Runtime.Remoting.Messaging; 24 27 25 28 namespace HeuristicLab.Problems.Instances.DataAnalysis { 26 public class RegressionRealWorldInstanceProvider : ResourceRegressionInstanceProvider {29 public class GPTP2021VectorBenchmarksInstanceProvider : ResourceRegressionInstanceProvider { 27 30 public override string Name { 28 get { return " Real WorldBenchmark Problems"; }31 get { return "GPTP 2021 Vector Benchmark Problems"; } 29 32 } 30 33 public override string Description { … … 40 43 } 41 44 42 protected override string FileName { get { return " RegressionRealWorld"; } }45 protected override string FileName { get { return "GPTP2021VectorBenchmarks"; } } 43 46 44 47 public override IEnumerable<IDataDescriptor> GetDataDescriptors() { 45 List<ResourceRegressionDataDescriptor> descriptorList = new List<ResourceRegressionDataDescriptor>(); 46 descriptorList.Add(new ChemicalOne()); 47 descriptorList.Add(new Housing()); 48 descriptorList.Add(new Tower()); 49 descriptorList.Add(new Powermeter()); 50 descriptorList.Add(new SARCOS()); 51 return descriptorList; 48 return new List<ResourceRegressionDataDescriptor> { 49 new GPTP2021VectorBenchmarkDataDescriptor("test_A_01", new []{ "v1" }), 50 new GPTP2021VectorBenchmarkDataDescriptor("test_A_02", new []{ "v1" }), 51 new GPTP2021VectorBenchmarkDataDescriptor("test_A_03", new []{ "x1", "v1" }), 52 new GPTP2021VectorBenchmarkDataDescriptor("test_A_04", new []{ "x1", "x2", "v1", "v2" }), 53 new GPTP2021VectorBenchmarkDataDescriptor("test_A_05", new []{ "x1", "x2", "v1", "v2" }), 54 new GPTP2021VectorBenchmarkDataDescriptor("test_B_01", new []{ "x1", "x2", "v1", "v2" }), 55 new GPTP2021VectorBenchmarkDataDescriptor("test_B_02", new []{ "x1", "x2", "v1", "v2" }), 56 new GPTP2021VectorBenchmarkDataDescriptor("test_B_03", new []{ "x1", "x2", "v1", "v2", "v3" }), 57 new GPTP2021VectorBenchmarkDataDescriptor("test_B_04", new []{ "x1", "x2", "v1", "v2", "v3", "v4" }), 58 59 new GPTP2021VectorBenchmarkDataDescriptor("unrolled_test_A_01", Flatten(V("v1"))), 60 new GPTP2021VectorBenchmarkDataDescriptor("unrolled_test_A_02", Flatten(V("v1"))), 61 new GPTP2021VectorBenchmarkDataDescriptor("unrolled_test_A_03", Flatten(S("x1"), V("v1"))), 62 new GPTP2021VectorBenchmarkDataDescriptor("unrolled_test_A_04", Flatten(S("x1"), S("x2"), V("v1"), V("v2"))), 63 new GPTP2021VectorBenchmarkDataDescriptor("unrolled_test_A_05", Flatten(S("x1"), S("x2"), V("v1"), V("v2"))), 64 new GPTP2021VectorBenchmarkDataDescriptor("unrolled_test_B_01", Flatten(S("x1"), S("x2"), V("v1"), V("v2"))), 65 new GPTP2021VectorBenchmarkDataDescriptor("unrolled_test_B_02", Flatten(S("x1"), S("x2"), V("v1"), V("v2"))), 66 new GPTP2021VectorBenchmarkDataDescriptor("unrolled_test_B_03", Flatten(S("x1"), S("x2"), V("v1"), V("v2"), V("v3"))), 67 new GPTP2021VectorBenchmarkDataDescriptor("unrolled_test_B_04", Flatten(S("x1"), S("x2"), V("v1"), V("v2"), V("v3"), V("v4"))) 68 }; 69 } 70 71 private static IEnumerable<string> S(string name) { 72 yield return name; 73 } 74 // Unroll vector variable name 75 private static IEnumerable<string> V(string name, int length = 20) { 76 return Enumerable.Range(0, length).Select(i => name + "_" + i); 77 } 78 private static T[] Flatten<T>(params IEnumerable<T>[] values) { 79 return values.SelectMany(x => x).ToArray(); 80 } 81 82 protected override TableFileFormatOptions GetFormatOptions(ZipArchiveEntry entry) { 83 return new TableFileFormatOptions() { 84 ColumnSeparator = ';', 85 VectorSeparator = ',' 86 }; 52 87 } 53 88 } -
branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VectorData/VectorDataTestThree.cs
r17588 r17915 80 80 81 81 //Y = (X1 + sum[2:](V1)) * mean[:-2](V2 + X2) 82 y = (x1 + v1.SubVector(2, v1.Count - 2).Sum() 82 y = (x1 + v1.SubVector(2, v1.Count - 2).Sum()) * (v2 + x2).SubVector(0, v2.Count - 2).Mean(); 83 83 84 84 x1Column.Add(x1); -
branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VectorData/VectorDataTestTwo.cs
r17588 r17915 78 78 v2 = rand.NextDoubleVector(2, 4, v2Length); 79 79 80 y = x1 * v1.PointwiseExp().PointwiseMultiply(x2 80 y = x1 * v1.PointwiseExp().PointwiseMultiply(x2 - v2 - 2).Sum(); 81 81 82 82 x1Column.Add(x1);
Note: See TracChangeset
for help on using the changeset viewer.