Changeset 17093
- Timestamp:
- 07/05/19 16:52:06 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Physics/AircraftMaximumLift.cs
r16565 r17093 23 23 using System.Collections.Generic; 24 24 using System.Linq; 25 using HeuristicLab.Common; 25 26 using HeuristicLab.Random; 26 27 … … 54 55 55 56 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(); } } 58 59 protected override int TrainingPartitionStart { get { return 0; } } 59 60 protected override int TrainingPartitionEnd { get { return 100; } } … … 106 107 107 108 List<double> fx = new List<double>(); 109 List<double> fx_noise = new List<double>(); 108 110 data.Add(x1); 109 111 data.Add(x2); … … 125 127 data.Add(x18); 126 128 data.Add(fx); 129 data.Add(fx_noise); 127 130 128 131 for (int i = 0; i < x1.Count; i++) { … … 139 142 } 140 143 144 var sigma_noise = 0.05 * fx.StandardDeviationPop(); 145 fx_noise.AddRange(fx.Select(fxi => fxi + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 146 141 147 return data; 142 148 }
Note: See TracChangeset
for help on using the changeset viewer.