Changeset 17973 for trunk/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman92.cs
- Timestamp:
- 05/04/21 14:29:30 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman92.cs
r17966 r17973 34 34 35 35 protected override string TargetVariable { get { return noiseRatio == null ? "L" : "L_noise"; } } 36 protected override string[] VariableNames { get { return new[] {"n", "h", noiseRatio == null ? "L" : "L_noise"}; } } 36 37 protected override string[] VariableNames { 38 get { return noiseRatio == null ? new[] { "n", "h", "L" } : new[] { "n", "h", "L", "L_noise" }; } 39 } 37 40 protected override string[] AllowedInputVariables { get { return new[] {"n", "h"}; } } 38 41 … … 62 65 } 63 66 64 if (noiseRatio != null) { 65 var L_noise = new List<double>(); 66 var sigma_noise = (double) Math.Sqrt(noiseRatio.Value) * L.StandardDeviationPop(); 67 L_noise.AddRange(L.Select(md => md + NormalDistributedRandomPolar.NextDouble(rand, 0, sigma_noise))); 68 data.Remove(L); 69 data.Add(L_noise); 70 } 67 var targetNoise = GetNoisyTarget(L, rand); 68 if (targetNoise != null) data.Add(targetNoise); 71 69 72 70 return data;
Note: See TracChangeset
for help on using the changeset viewer.