Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/25/20 07:41:01 (5 years ago)
Author:
pfleck
Message:

#3040 Replaced own Vector with MathNet.Numerics Vector.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VectorData/AzzaliBenchmark3.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
     22using System;
    223using System.Collections;
    324using System.Collections.Generic;
     
    829using HeuristicLab.Random;
    930
     31using DoubleVector = MathNet.Numerics.LinearAlgebra.Vector<double>;
     32
    1033namespace HeuristicLab.Problems.Instances.DataAnalysis {
    1134  public class AzzaliBenchmark3 : ArtificialRegressionDataDescriptor {
    12     public override string Name { get { return "Azzali Benchmark2 B3 = "; } }
     35    public override string Name { get { return "Azzali Benchmark2 B3 = CumMin[3,3] * (X2 / X3) + X4"; } }
    1336    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."; } }
    1437
     
    4972        var x5 = rand.NextDouble(0, 1);
    5073
    51         int p = 3, q = 3;
    52         var cumulativeMin = new DoubleVector(
     74        const int p = 3, q = 3;
     75        var cumulativeMin = DoubleVector.Build.DenseOfEnumerable(
    5376          Enumerable.Range(0, x1.Count)
    5477            .Select(idx => Enumerable.Range(idx - p, q)) // build index ranges for each target entry
Note: See TracChangeset for help on using the changeset viewer.