Changeset 17093


Ignore:
Timestamp:
07/05/19 16:52:06 (2 weeks ago)
Author:
gkronber
Message:

#3014: added a copy of the target variable with simulated noise to the AircraftMaximumLift problem instance

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Physics/AircraftMaximumLift.cs

    r16565 r17093  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HeuristicLab.Common;
    2526using HeuristicLab.Random;
    2627
     
    5455
    5556    protected override string TargetVariable { get { return "f(X)"; } }
    56     protected override string[] VariableNames { get { return new string[] { "x1", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9", "x10", "x11", "x12", "x13", "x14", "x15", "x16", "x17", "x18", "f(X)" }; } }
    57     protected override string[] AllowedInputVariables { get { return VariableNames.Except(new string[] { TargetVariable }).ToArray(); } }
     57    protected override string[] VariableNames { get { return new string[] { "x1", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9", "x10", "x11", "x12", "x13", "x14", "x15", "x16", "x17", "x18", "f(X)", "f(X)_noise" }; } }
     58    protected override string[] AllowedInputVariables { get { return VariableNames.Except(new string[] { "f(X)", "f(X)_noise" }).ToArray(); } }
    5859    protected override int TrainingPartitionStart { get { return 0; } }
    5960    protected override int TrainingPartitionEnd { get { return 100; } }
     
    106107
    107108      List<double> fx = new List<double>();
     109      List<double> fx_noise = new List<double>();
    108110      data.Add(x1);
    109111      data.Add(x2);
     
    125127      data.Add(x18);
    126128      data.Add(fx);
     129      data.Add(fx_noise);
    127130
    128131      for (int i = 0; i < x1.Count; i++) {
     
    139142      }
    140143
     144      var sigma_noise = 0.05 * fx.StandardDeviationPop();
     145      fx_noise.AddRange(fx.Select(fxi => fxi + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise)));
     146
    141147      return data;
    142148    }
Note: See TracChangeset for help on using the changeset viewer.