Changeset 18086 for branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman33.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/Feynman33.cs
r17678 r18086 29 29 get { 30 30 return string.Format( 31 "I.32.17 (1/2*epsilon*c*Ef**2)*(8*pi*r**2/3)*(omega**4/(omega**2-omega_0**2)**2) | {0} samples | {1}",32 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));31 "I.32.17 (1/2*epsilon*c*Ef**2)*(8*pi*r**2/3)*(omega**4/(omega**2-omega_0**2)**2) | {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[] {"epsilon", "c", "Ef", "r", "omega", "omega_0", noiseRatio == null ? "Pwr" : "Pwr_noise"}; }39 get { return noiseRatio == null ? new[] { "epsilon", "c", "Ef", "r", "omega", "omega_0", "Pwr" } : new[] { "epsilon", "c", "Ef", "r", "omega", "omega_0", "Pwr", "Pwr_noise" }; } 40 40 } 41 41 … … 78 78 } 79 79 80 if (noiseRatio != null) { 81 var Pwr_noise = new List<double>(); 82 var sigma_noise = (double) noiseRatio * Pwr.StandardDeviationPop(); 83 Pwr_noise.AddRange(Pwr.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 84 data.Remove(Pwr); 85 data.Add(Pwr_noise); 86 } 80 var targetNoise = ValueGenerator.GenerateNoise(Pwr, rand, noiseRatio); 81 if (targetNoise != null) data.Add(targetNoise); 87 82 88 83 return data;
Note: See TracChangeset
for help on using the changeset viewer.