Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/19/21 16:07:45 (2 years ago)
Author:
mkommend
Message:

#2521: Merged trunk changes into branch.

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  
    2828    public override string Name {
    2929      get {
    30         return string.Format("III.12.43 n*h | {0} samples | {1}", trainingSamples,
     30        return string.Format("III.12.43 n*h | {0}",
    3131          noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));
    3232      }
     
    3434
    3535    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    }
    3740    protected override string[] AllowedInputVariables { get { return new[] {"n", "h"}; } }
    3841
     
    6265      }
    6366
    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);
    7169
    7270      return data;
Note: See TracChangeset for help on using the changeset viewer.