Changeset 18086 for branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/FeynmanBonus19.cs
- Timestamp:
- 11/19/21 16:07:45 (3 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/FeynmanBonus19.cs
r17678 r18086 29 29 get { 30 30 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)); 33 33 } 34 34 } … … 37 37 38 38 protected override string[] VariableNames { 39 get { return n ew[] {"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" }; } 40 40 } 41 41 … … 76 76 } 77 77 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); 85 80 86 81 return data;
Note: See TracChangeset
for help on using the changeset viewer.