Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/14/20 13:19:04 (4 years ago)
Author:
pfleck
Message:

#3040 Added Azzali benchmarks

File:
1 edited

Legend:

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

    r17365 r17400  
    6868
    6969      for (int i = 0; i < 100; i++) {
    70         x1 = GetRandomDouble(-2, 2, rand);
    71         x2 = GetRandomDouble(2, 6, rand);
    72         x3 = GetRandomDouble(0, 1, rand);
     70        x1 = rand.NextDouble(-2, 2);
     71        x2 = rand.NextDouble(2, 6);
     72        x3 = rand.NextDouble(0, 1);
    7373        int length = rand.Next(3, 6);
    74         v1 = GetRandomDoubleVector(-2, 2, length, rand);
    75         v2 = GetRandomDoubleVector(3, 5, length, rand);
    76         y = x1 * v1.Sum() + x2 * v2.Average();
     74        v1 = rand.NextDoubleVector(-2, 2, length);
     75        v2 = rand.NextDoubleVector(3, 5, length);
     76
     77        y = x1 * v1.Sum() + x2 * v2.Mean();
    7778
    7879        x1Column.Add(x1);
     
    8687      return new List<IList> { x1Column, x2Column, x3Column, v1Column, v2Column, yColumn };
    8788    }
    88 
    89 
    90     private static double GetRandomDouble(double min, double max, IRandom rand) {
    91       return (max - min) * rand.NextDouble() + min;
    92     }
    93     private static DoubleVector GetRandomDoubleVector(double min, double max, int length, IRandom rand) {
    94       var values = new double[length];
    95       for (int i = 0; i < values.Length; i++) {
    96         values[i] = GetRandomDouble(min, max, rand);
    97       }
    98       return new DoubleVector(values);
    99     }
    10089  }
    10190}
Note: See TracChangeset for help on using the changeset viewer.