Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/25/21 18:06:47 (4 years ago)
Author:
pfleck
Message:

#3040 started added some vector benchmarks for gptp.

Location:
branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3
Files:
2 added
3 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/HeuristicLab.Problems.Instances.DataAnalysis-3.3.csproj

    r17825 r17915  
    288288    <Compile Include="Regression\Feynman\FeynmanLargeInstanceProvider.cs" />
    289289    <Compile Include="Regression\Feynman\FeynmanSmallInstanceProvider.cs" />
     290    <Compile Include="Regression\GPTP2021VectorBenchmarks\GPTP2021VectorBenchmarkDataDescriptor.cs" />
     291    <Compile Include="Regression\GPTP2021VectorBenchmarks\GPTP2021VectorBenchmarksInstanceProvider.cs" />
    290292    <Compile Include="Regression\MibaFriction\CF3.cs" />
    291293    <Compile Include="Regression\MibaFriction\Wear1.cs" />
     
    418420    <EmbeddedResource Include="Regression\Data\MibaFriction.zip" />
    419421    <EmbeddedResource Include="Regression\Data\PennML.zip" />
     422    <EmbeddedResource Include="Regression\Data\GPTP2021VectorBenchmarks.zip" />
    420423    <None Include="Regression\Data\UCITimeSeries.zip">
    421424      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
  • branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/GPTP2021VectorBenchmarks/GPTP2021VectorBenchmarksInstanceProvider.cs

    r17851 r17915  
    2222using System;
    2323using System.Collections.Generic;
     24using System.IO.Compression;
     25using System.Linq;
     26using System.Runtime.Remoting.Messaging;
    2427
    2528namespace HeuristicLab.Problems.Instances.DataAnalysis {
    26   public class RegressionRealWorldInstanceProvider : ResourceRegressionInstanceProvider {
     29  public class GPTP2021VectorBenchmarksInstanceProvider : ResourceRegressionInstanceProvider {
    2730    public override string Name {
    28       get { return "Real World Benchmark Problems"; }
     31      get { return "GPTP 2021 Vector Benchmark Problems"; }
    2932    }
    3033    public override string Description {
     
    4043    }
    4144
    42     protected override string FileName { get { return "RegressionRealWorld"; } }
     45    protected override string FileName { get { return "GPTP2021VectorBenchmarks"; } }
    4346
    4447    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      };
    5287    }
    5388  }
  • branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VectorData/VectorDataTestThree.cs

    r17588 r17915  
    8080
    8181        //Y = (X1 + sum[2:](V1)) * mean[:-2](V2 + X2)
    82         y = (x1 + v1.SubVector(2, v1.Count - 2).Sum() ) * (v2 + x2).SubVector(0, v2.Count - 2).Mean();
     82        y = (x1 + v1.SubVector(2, v1.Count - 2).Sum()) * (v2 + x2).SubVector(0, v2.Count - 2).Mean();
    8383
    8484        x1Column.Add(x1);
  • branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VectorData/VectorDataTestTwo.cs

    r17588 r17915  
    7878        v2 = rand.NextDoubleVector(2, 4, v2Length);
    7979
    80         y = x1 * v1.PointwiseExp().PointwiseMultiply(x2  - v2 - 2).Sum();
     80        y = x1 * v1.PointwiseExp().PointwiseMultiply(x2 - v2 - 2).Sum();
    8181
    8282        x1Column.Add(x1);
Note: See TracChangeset for help on using the changeset viewer.