Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/19/21 16:07:45 (3 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/FeynmanBonus19.cs

    r17678 r18086  
    2929      get {
    3030        return string.Format(
    31           "Weinberg 15.2.2: -1/(8*pi*G)*(c**4*k_f/r**2 + c**2*H_G**2*(1-2*alpha)) | {0} samples | {1}",
    32           trainingSamples, noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));
     31          "Weinberg 15.2.2: -1/(8*pi*G)*(c**4*k_f/r**2 + c**2*H_G**2*(1-2*alpha)) | {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[] {"G", "k_f", "r", "H_G", "alpha", "c", noiseRatio == null ? "pr" : "pr_noise"}; }
     39      get { return noiseRatio == null ? new[] { "G", "k_f", "r", "H_G", "alpha", "c", "pr" } : new[] { "G", "k_f", "r", "H_G", "alpha", "c", "pr", "pr_noise" }; }
    4040    }
    4141
     
    7676      }
    7777
    78       if (noiseRatio != null) {
    79         var pr_noise    = new List<double>();
    80         var sigma_noise = (double) noiseRatio * pr.StandardDeviationPop();
    81         pr_noise.AddRange(pr.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise)));
    82         data.Remove(pr);
    83         data.Add(pr_noise);
    84       }
     78      var targetNoise = ValueGenerator.GenerateNoise(pr, rand, noiseRatio);
     79      if (targetNoise != null) data.Add(targetNoise);
    8580
    8681      return data;
Note: See TracChangeset for help on using the changeset viewer.