Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/14/20 12:25:24 (5 years ago)
Author:
pfleck
Message:

#3040 Added a new benchmark instance.

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

Legend:

Unmodified
Added
Removed
  • branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VectorData/VectorDataInstanceProvider.cs

    r17418 r17541  
    5454        new VectorDataTestOneC(rand.Next()),
    5555        new VectorDataTestOneD(rand.Next()),
     56        new VectorDataTestTwoA(rand.Next()),
     57        new VectorDataTestTwoB(rand.Next()),
     58        //new VectorDataTestTwoC(rand.Next()),
     59        //new VectorDataTestTwoD(rand.Next()),
    5660        new AzzaliBenchmark1(rand.Next()),
    5761        new AzzaliBenchmark2(rand.Next()),
  • branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VectorData/VectorDataTestOne.cs

    r17448 r17541  
    2525using System.Linq;
    2626using HeuristicLab.Core;
    27 using HeuristicLab.Problems.DataAnalysis;
    2827using HeuristicLab.Random;
    2928using MathNet.Numerics.Statistics;
     
    3231
    3332namespace HeuristicLab.Problems.Instances.DataAnalysis {
    34   public abstract class VectorDataTestBase : ArtificialRegressionDataDescriptor {
     33  public abstract class VectorDataTestOne : ArtificialRegressionDataDescriptor {
    3534
    3635    protected const int Rows = 100;
     
    4847    public int Seed { get; private set; }
    4948
    50     protected VectorDataTestBase()
     49    protected VectorDataTestOne()
    5150      : this((int)DateTime.Now.Ticks) { }
    52     protected VectorDataTestBase(int seed)
     51    protected VectorDataTestOne(int seed)
    5352      : base() {
    5453      Seed = seed;
     
    9796  }
    9897
    99   public class VectorDataTestOneA : VectorDataTestBase {
     98  public class VectorDataTestOneA : VectorDataTestOne {
    10099    public override string Name {
    101       get { return "Vector Data Test - I a (Y = X1 * sum(V1) + X2 * avg(V2)"; }
     100      get { return "Vector Data Test - I [fully-constrained]: Y = X1 * sum(V1) + X2 * mean(V2)"; }
    102101    }
    103102
     
    115114  }
    116115
    117   public class VectorDataTestOneB : VectorDataTestBase {
    118     public override string Name { get { return "Vector Data Test - I b (Y = X1 * sum(V1) + X2 * avg(V2)"; } }
     116  public class VectorDataTestOneB : VectorDataTestOne {
     117    public override string Name { get { return "Vector Data Test - I [row-constrained]: Y = X1 * sum(V1) + X2 * mean(V2)"; } }
    119118
    120119    public VectorDataTestOneB() : base() { }
     
    131130  }
    132131
    133   public class VectorDataTestOneC : VectorDataTestBase {
    134     public override string Name { get { return "Vector Data Test - I c (Y = X1 * sum(V1) + X2 * avg(V2)"; } }
     132  public class VectorDataTestOneC : VectorDataTestOne {
     133    public override string Name { get { return "Vector Data Test - I [column-constrained]: Y = X1 * sum(V1) + X2 * mean(V2)"; } }
    135134
    136135    public VectorDataTestOneC() : base() { }
     
    152151  }
    153152
    154   public class VectorDataTestOneD : VectorDataTestBase {
    155     public override string Name { get { return "Vector Data Test - I d (Y = X1 * sum(V1) + X2 * avg(V2)"; } }
     153  public class VectorDataTestOneD : VectorDataTestOne {
     154    public override string Name { get { return "Vector Data Test - I [unconstrained]: Y = X1 * sum(V1) + X2 * mean(V2)"; } }
    156155
    157156    public VectorDataTestOneD() : base() { }
  • branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VectorData/VectorDataTestTwo.cs

    r17489 r17541  
    2525using System.Linq;
    2626using HeuristicLab.Core;
    27 using HeuristicLab.Problems.DataAnalysis;
    2827using HeuristicLab.Random;
    2928using MathNet.Numerics.Statistics;
     
    3231
    3332namespace HeuristicLab.Problems.Instances.DataAnalysis {
    34   public abstract class VectorDataTestBase : ArtificialRegressionDataDescriptor {
     33  public abstract class VectorDataTestTwo : ArtificialRegressionDataDescriptor {
    3534
    3635    protected const int Rows = 100;
     
    4847    public int Seed { get; private set; }
    4948
    50     protected VectorDataTestBase()
     49    protected VectorDataTestTwo()
    5150      : this((int)DateTime.Now.Ticks) { }
    52     protected VectorDataTestBase(int seed)
     51    protected VectorDataTestTwo(int seed)
    5352      : base() {
    5453      Seed = seed;
     
    8180        v2 = rand.NextDoubleVector(3, 5, v2Length);
    8281
    83         y = x1 * v1.Sum() + x2 * v2.Mean();
     82        y = x1 * v1.PointwiseExp().PointwiseMultiply(v2 + x2).Sum();
    8483
    8584        x1Column.Add(x1);
     
    9796  }
    9897
    99   public class VectorDataTestOneA : VectorDataTestBase {
     98  public class VectorDataTestTwoA : VectorDataTestTwo {
    10099    public override string Name {
    101       get { return "Vector Data Test - I a (Y = X1 * sum(V1) + X2 * avg(V2)"; }
     100      get { return "Vector Data Test - II [fully-constrained]: Y = X1 * sum(exp(V1) * (V2 + X2))"; }
    102101    }
    103102
    104     public VectorDataTestOneA() : base() { }
    105     public VectorDataTestOneA(int seed) : base(seed) { }
     103    public VectorDataTestTwoA() : base() { }
     104    public VectorDataTestTwoA(int seed) : base(seed) { }
    106105
    107106    protected override List<int>[] GetVectorLengths(IRandom rand) {
     
    115114  }
    116115
    117   public class VectorDataTestOneB : VectorDataTestBase {
    118     public override string Name { get { return "Vector Data Test - I b (Y = X1 * sum(V1) + X2 * avg(V2)"; } }
     116  public class VectorDataTestTwoB : VectorDataTestTwo {
     117    public override string Name { get { return "Vector Data Test - II [row-constrained]: Y = X1 * mean(exp(V1) + X2 * V2)"; } }
    119118
    120     public VectorDataTestOneB() : base() { }
    121     public VectorDataTestOneB(int seed) : base(seed) { }
     119    public VectorDataTestTwoB() : base() { }
     120    public VectorDataTestTwoB(int seed) : base(seed) { }
    122121
    123122    protected override List<int>[] GetVectorLengths(IRandom rand) {
     
    131130  }
    132131
    133   public class VectorDataTestOneC : VectorDataTestBase {
    134     public override string Name { get { return "Vector Data Test - I c (Y = X1 * sum(V1) + X2 * avg(V2)"; } }
     132  //public class VectorDataTestTwoC : VectorDataTestTwo {
     133  //  public override string Name { get { return "Vector Data Test - II [column-constrained]: Y = X1 * mean(exp(V1) + X2 * V2)"; } }
    135134
    136     public VectorDataTestOneC() : base() { }
    137     public VectorDataTestOneC(int seed) : base(seed) { }
     135  //  public VectorDataTestTwoC() : base() { }
     136  //  public VectorDataTestTwoC(int seed) : base(seed) { }
    138137
    139     protected override List<int>[] GetVectorLengths(IRandom rand) {
    140       // length between length 4 and 8; each feature is same length
    141       // force two different lengths
    142       int v1Length = rand.Next(4, 8);
    143       int v2Length;
    144       do {
    145         v2Length = rand.Next(4, 8);
    146       } while (v1Length != v2Length);
    147       return new List<int>[2] {
    148         Enumerable.Repeat(v1Length, Rows).ToList(),
    149         Enumerable.Repeat(v2Length, Rows).ToList()
    150       };
    151     }
    152   }
     138  //  protected override List<int>[] GetVectorLengths(IRandom rand) {
     139  //    // length between length 4 and 8; each feature is same length
     140  //    // force two different lengths
     141  //    int v1Length = rand.Next(4, 8);
     142  //    int v2Length;
     143  //    do {
     144  //      v2Length = rand.Next(4, 8);
     145  //    } while (v1Length != v2Length);
     146  //    return new List<int>[2] {
     147  //      Enumerable.Repeat(v1Length, Rows).ToList(),
     148  //      Enumerable.Repeat(v2Length, Rows).ToList()
     149  //    };
     150  //  }
     151  //}
    153152
    154   public class VectorDataTestOneD : VectorDataTestBase {
    155     public override string Name { get { return "Vector Data Test - I d (Y = X1 * sum(V1) + X2 * avg(V2)"; } }
     153  //public class VectorDataTestTwoD : VectorDataTestTwo {
     154  //  public override string Name { get { return "Vector Data Test - II [unconstrained]: Y = X1 * mean(exp(V1) + X2 * V2)"; } }
    156155
    157     public VectorDataTestOneD() : base() { }
    158     public VectorDataTestOneD(int seed) : base(seed) { }
     156  //  public VectorDataTestTwoD() : base() { }
     157  //  public VectorDataTestTwoD(int seed) : base(seed) { }
    159158
    160     protected override List<int>[] GetVectorLengths(IRandom rand) {
    161       // always random between 4 and 8
    162       return new List<int>[2] {
    163           Enumerable.Range(0, Rows).Select(i => rand.Next(4, 8)).ToList(),
    164           Enumerable.Range(0, Rows).Select(i => rand.Next(4, 8)).ToList()
    165         };
    166     }
    167   }
     159  //  protected override List<int>[] GetVectorLengths(IRandom rand) {
     160  //    // always random between 4 and 8
     161  //    return new List<int>[2] {
     162  //        Enumerable.Range(0, Rows).Select(i => rand.Next(4, 8)).ToList(),
     163  //        Enumerable.Range(0, Rows).Select(i => rand.Next(4, 8)).ToList()
     164  //      };
     165  //  }
     166  //}
    168167}
Note: See TracChangeset for help on using the changeset viewer.