Changeset 18086 for branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/FeynmanBonus3.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/FeynmanBonus3.cs
r17678 r18086 29 29 get { 30 30 return string.Format( 31 "Compton Scattering: E_n/(1+E_n/(m*c**2)*(1-cos(theta))) | {0} samples | {1}", trainingSamples,31 "Compton Scattering: E_n/(1+E_n/(m*c**2)*(1-cos(theta))) | {0}", 32 32 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 33 33 } … … 37 37 38 38 protected override string[] VariableNames { 39 get { return n ew[] {"E_n", "m", "c", "theta", noiseRatio == null ? "K" : "K_noise"}; }39 get { return noiseRatio == null ? new[] { "E_n", "m", "c", "theta", "K" } : new[] { "E_n", "m", "c", "theta", "K", "K_noise" }; } 40 40 } 41 41 … … 71 71 } 72 72 73 if (noiseRatio != null) { 74 var K_noise = new List<double>(); 75 var sigma_noise = (double) noiseRatio * K.StandardDeviationPop(); 76 K_noise.AddRange(K.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 77 data.Remove(K); 78 data.Add(K_noise); 79 } 73 var targetNoise = ValueGenerator.GenerateNoise(K, rand, noiseRatio); 74 if (targetNoise != null) data.Add(targetNoise); 80 75 81 76 return data;
Note: See TracChangeset
for help on using the changeset viewer.