Changeset 17448 for branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VectorData/AzzaliBenchmark2.cs
- Timestamp:
- 02/25/20 07:41:01 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VectorData/AzzaliBenchmark2.cs
r17418 r17448 1 using System; 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 * 5 * This file is part of HeuristicLab. 6 * 7 * HeuristicLab is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * HeuristicLab is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 #endregion 21 22 using System; 2 23 using System.Collections; 3 24 using System.Collections.Generic; … … 7 28 using HeuristicLab.Problems.DataAnalysis; 8 29 using HeuristicLab.Random; 30 using MathNet.Numerics.Statistics; 31 32 using DoubleVector = MathNet.Numerics.LinearAlgebra.Vector<double>; 9 33 10 34 namespace HeuristicLab.Problems.Instances.DataAnalysis { 11 35 public class AzzaliBenchmark2 : ArtificialRegressionDataDescriptor { 12 public override string Name { get { return "Azzali Benchmark2 B2 = ((X3 + X1) / mean(X4)) * X2"; } }36 public override string Name { get { return "Azzali Benchmark2 B2 = ((X3 + X1) / CumMean(X4)) * X2"; } } 13 37 public override string Description { get { return "I. Azzali, L. Vanneschi, S. Silva, I. Bakurov, and M. Giacobini, “A Vectorial Approach to Genetic Programming,” EuroGP, pp. 213–227, 2019."; } } 14 38 … … 47 71 var x4 = rand.NextDoubleVector(-5, +5, 10); 48 72 49 var b2 = ((x3 + x1) / x4.CumulativeMean()) * x2; 73 var cumMean = x4.MapIndexed((j, v) => x4.SubVector(0, j + 1).Mean()); 74 var b2 = ((x3 + x1) / cumMean) * x2; 50 75 51 76 x1Column.Add(x1);
Note: See TracChangeset
for help on using the changeset viewer.