- Timestamp:
- 05/14/20 12:25:24 (5 years ago)
- Location:
- branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3
- Files:
-
- 3 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/HeuristicLab.Problems.Instances.DataAnalysis-3.3.csproj
r17475 r17541 262 262 <Compile Include="Regression\VectorData\RandomExtensions.cs" /> 263 263 <Compile Include="Regression\VectorData\VectorDataInstanceProvider.cs" /> 264 <Compile Include="Regression\VectorData\VectorDataTestTwo.cs" /> 264 265 <Compile Include="Regression\VectorData\VectorDataTestOne.cs" /> 265 266 <Compile Include="Regression\Vladislavleva\KotanchekFunction.cs" /> -
branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VectorData/VectorDataInstanceProvider.cs
r17418 r17541 54 54 new VectorDataTestOneC(rand.Next()), 55 55 new VectorDataTestOneD(rand.Next()), 56 new VectorDataTestTwoA(rand.Next()), 57 new VectorDataTestTwoB(rand.Next()), 58 //new VectorDataTestTwoC(rand.Next()), 59 //new VectorDataTestTwoD(rand.Next()), 56 60 new AzzaliBenchmark1(rand.Next()), 57 61 new AzzaliBenchmark2(rand.Next()), -
branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VectorData/VectorDataTestOne.cs
r17448 r17541 25 25 using System.Linq; 26 26 using HeuristicLab.Core; 27 using HeuristicLab.Problems.DataAnalysis;28 27 using HeuristicLab.Random; 29 28 using MathNet.Numerics.Statistics; … … 32 31 33 32 namespace HeuristicLab.Problems.Instances.DataAnalysis { 34 public abstract class VectorDataTest Base : ArtificialRegressionDataDescriptor {33 public abstract class VectorDataTestOne : ArtificialRegressionDataDescriptor { 35 34 36 35 protected const int Rows = 100; … … 48 47 public int Seed { get; private set; } 49 48 50 protected VectorDataTest Base()49 protected VectorDataTestOne() 51 50 : this((int)DateTime.Now.Ticks) { } 52 protected VectorDataTest Base(int seed)51 protected VectorDataTestOne(int seed) 53 52 : base() { 54 53 Seed = seed; … … 97 96 } 98 97 99 public class VectorDataTestOneA : VectorDataTest Base {98 public class VectorDataTestOneA : VectorDataTestOne { 100 99 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)"; } 102 101 } 103 102 … … 115 114 } 116 115 117 public class VectorDataTestOneB : VectorDataTest Base {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)"; } } 119 118 120 119 public VectorDataTestOneB() : base() { } … … 131 130 } 132 131 133 public class VectorDataTestOneC : VectorDataTest Base {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)"; } } 135 134 136 135 public VectorDataTestOneC() : base() { } … … 152 151 } 153 152 154 public class VectorDataTestOneD : VectorDataTest Base {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)"; } } 156 155 157 156 public VectorDataTestOneD() : base() { } -
branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VectorData/VectorDataTestTwo.cs
r17489 r17541 25 25 using System.Linq; 26 26 using HeuristicLab.Core; 27 using HeuristicLab.Problems.DataAnalysis;28 27 using HeuristicLab.Random; 29 28 using MathNet.Numerics.Statistics; … … 32 31 33 32 namespace HeuristicLab.Problems.Instances.DataAnalysis { 34 public abstract class VectorDataTest Base: ArtificialRegressionDataDescriptor {33 public abstract class VectorDataTestTwo : ArtificialRegressionDataDescriptor { 35 34 36 35 protected const int Rows = 100; … … 48 47 public int Seed { get; private set; } 49 48 50 protected VectorDataTest Base()49 protected VectorDataTestTwo() 51 50 : this((int)DateTime.Now.Ticks) { } 52 protected VectorDataTest Base(int seed)51 protected VectorDataTestTwo(int seed) 53 52 : base() { 54 53 Seed = seed; … … 81 80 v2 = rand.NextDoubleVector(3, 5, v2Length); 82 81 83 y = x1 * v1. Sum() + x2 * v2.Mean();82 y = x1 * v1.PointwiseExp().PointwiseMultiply(v2 + x2).Sum(); 84 83 85 84 x1Column.Add(x1); … … 97 96 } 98 97 99 public class VectorDataTest OneA : VectorDataTestBase{98 public class VectorDataTestTwoA : VectorDataTestTwo { 100 99 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))"; } 102 101 } 103 102 104 public VectorDataTest OneA() : base() { }105 public VectorDataTest OneA(int seed) : base(seed) { }103 public VectorDataTestTwoA() : base() { } 104 public VectorDataTestTwoA(int seed) : base(seed) { } 106 105 107 106 protected override List<int>[] GetVectorLengths(IRandom rand) { … … 115 114 } 116 115 117 public class VectorDataTest OneB : 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)"; } } 119 118 120 public VectorDataTest OneB() : base() { }121 public VectorDataTest OneB(int seed) : base(seed) { }119 public VectorDataTestTwoB() : base() { } 120 public VectorDataTestTwoB(int seed) : base(seed) { } 122 121 123 122 protected override List<int>[] GetVectorLengths(IRandom rand) { … … 131 130 } 132 131 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)"; } } 135 134 136 public VectorDataTestOneC() : base() { }137 public VectorDataTestOneC(int seed) : base(seed) { }135 // public VectorDataTestTwoC() : base() { } 136 // public VectorDataTestTwoC(int seed) : base(seed) { } 138 137 139 protected override List<int>[] GetVectorLengths(IRandom rand) {140 // length between length 4 and 8; each feature is same length141 // force two different lengths142 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 //} 153 152 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)"; } } 156 155 157 public VectorDataTestOneD() : base() { }158 public VectorDataTestOneD(int seed) : base(seed) { }156 // public VectorDataTestTwoD() : base() { } 157 // public VectorDataTestTwoD(int seed) : base(seed) { } 159 158 160 protected override List<int>[] GetVectorLengths(IRandom rand) {161 // always random between 4 and 8162 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 //} 168 167 }
Note: See TracChangeset
for help on using the changeset viewer.