Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/05/12 11:11:40 (12 years ago)
Author:
gkronber
Message:

#1784: Adapted Korns instances.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Various/SpatialCoevolution.cs

    r7988 r8225  
    2727  public class SpatialCoevolution : ArtificialRegressionDataDescriptor {
    2828
    29     public override string Name { get { return "Spatial co-evolution F(x,y) = 1/(1+power(x,-4)) + 1/(1+pow(y,-4))"; } }
     29    public override string Name { get { return "Spatial co-evolution F(x,y) = 1/(1 + x^(-4)) + 1/(1 + y^(-4))"; } }
    3030    public override string Description {
    3131      get {
    3232        return "Paper: Evolutionary consequences of coevolving targets" + Environment.NewLine
    3333        + "Authors: Ludo Pagie and Paulien Hogeweg" + Environment.NewLine
    34         + "Function: F(x,y) = 1/(1+power(x,-4)) + 1/(1+pow(y,-4))" + Environment.NewLine
    35         + "Terminal set: x, y" + Environment.NewLine
     34        + "Function: F(x,y) = 1/(1 + x^(-4)) + 1/(1 + y^(-4))" + Environment.NewLine
     35        + "Non-terminals: +, -, *, % (protected division), sin, cos, exp, ln(|x|) (protected log)" + Environment.NewLine
     36        + "Terminals: only variables (no random constants)" + Environment.NewLine
    3637        + "The fitness of a solution is defined as the mean of the absolute differences between "
    3738        + "the target function and the solution over all problems on the basis of which it is evaluated. "
    3839        + "A solution is considered completely ’correct’ if, for all 676 problems in the ’complete’ "
    3940        + "problem set used in the static evaluation scheme, the absolute difference between "
    40         + "solution and target function is less than 0:01 (this is a so-called hit).";
     41        + "solution and target function is less than 0.01 (this is a so-called hit).";
    4142      }
    4243    }
     
    4546    protected override string[] AllowedInputVariables { get { return new string[] { "X", "Y" }; } }
    4647    protected override int TrainingPartitionStart { get { return 0; } }
    47     protected override int TrainingPartitionEnd { get { return 1000; } }
    48     protected override int TestPartitionStart { get { return 1000; } }
     48    protected override int TrainingPartitionEnd { get { return 676; } }
     49    protected override int TestPartitionStart { get { return 676; } }
    4950    protected override int TestPartitionEnd { get { return 1676; } }
    5051
     
    5253      List<List<double>> data = new List<List<double>>();
    5354
    54       List<double> oneVariableTestData = ValueGenerator.GenerateSteps(-5, 5, 0.4).ToList();
    55       List<List<double>> testData = new List<List<double>>() { oneVariableTestData, oneVariableTestData };
    56       var combinations = ValueGenerator.GenerateAllCombinationsOfValuesInLists(testData).ToList<IEnumerable<double>>();
     55      List<double> evenlySpacedSequence = ValueGenerator.GenerateSteps(-5, 5, 0.4).ToList();
     56      List<List<double>> trainingData = new List<List<double>>() { evenlySpacedSequence, evenlySpacedSequence };
     57      var combinations = ValueGenerator.GenerateAllCombinationsOfValuesInLists(trainingData).ToList();
    5758
    5859      for (int i = 0; i < AllowedInputVariables.Count(); i++) {
    59         data.Add(ValueGenerator.GenerateUniformDistributedValues(1000, -5, 5).ToList());
    60         data[i].AddRange(combinations[i]);
     60        data.Add(combinations[i].ToList());
     61        data[i].AddRange(ValueGenerator.GenerateUniformDistributedValues(1000, -5, 5).ToList());
    6162      }
    6263
Note: See TracChangeset for help on using the changeset viewer.