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/FeynmanBonus14.cs

    r17678 r18086  
    2929      get {
    3030        return string.Format(
    31           "Jackson 2.11: q/(4*pi*epsilon*y**2)*(4*pi*epsilon*Volt*d-q*d*y**3/(y**2-d**2)**2) | {0} samples | {1}",
    32           trainingSamples, noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));
     31          "Jackson 2.11: q/(4*pi*epsilon*y**2)*(4*pi*epsilon*Volt*d-q*d*y**3/(y**2-d**2)**2) | {0}",
     32          noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));
    3333      }
    3434    }
     
    3737
    3838    protected override string[] VariableNames {
    39       get { return new[] {"q", "y", "Volt", "d", "epsilon", noiseRatio == null ? "F" : "F_noise"}; }
     39      get { return noiseRatio == null ? new[] { "q", "y", "Volt", "d", "epsilon", "F" } : new[] { "q", "y", "Volt", "d", "epsilon", "F", "F_noise"}; }
    4040    }
    4141
     
    7575      }
    7676
    77       if (noiseRatio != null) {
    78         var F_noise     = new List<double>();
    79         var sigma_noise = (double) noiseRatio * F.StandardDeviationPop();
    80         F_noise.AddRange(F.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise)));
    81         data.Remove(F);
    82         data.Add(F_noise);
    83       }
     77      var targetNoise = ValueGenerator.GenerateNoise(F, rand, noiseRatio);
     78      if (targetNoise != null) data.Add(targetNoise);
    8479
    8580      return data;
Note: See TracChangeset for help on using the changeset viewer.