Changeset 18086 for branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman92.cs
- Timestamp:
- 11/19/21 16:07:45 (2 years ago)
- Location:
- branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman
- Files:
-
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman92.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("III.12.43 n*h | {0} samples | {1}", trainingSamples,30 return string.Format("III.12.43 n*h | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 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) noiseRatio * L.StandardDeviationPop(); 67 L_noise.AddRange(L.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 68 data.Remove(L); 69 data.Add(L_noise); 70 } 67 var targetNoise = ValueGenerator.GenerateNoise(L, rand, noiseRatio); 68 if (targetNoise != null) data.Add(targetNoise); 71 69 72 70 return data;
Note: See TracChangeset
for help on using the changeset viewer.