Changeset 17973 for trunk/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman90.cs
- Timestamp:
- 05/04/21 14:29:30 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman90.cs
r17966 r17973 37 37 38 38 protected override string[] VariableNames { 39 get { return n ew[] {"p_d", "Ef", "t", "h", "omega", "omega_0", noiseRatio == null ? "prob" : "prob_noise"}; }39 get { return noiseRatio == null ? new[] { "p_d", "Ef", "t", "h", "omega", "omega_0", "prob" } : new[] { "p_d", "Ef", "t", "h", "omega", "omega_0", "prob", "prob_noise" }; } 40 40 } 41 41 … … 79 79 } 80 80 81 if (noiseRatio != null) { 82 var prob_noise = new List<double>(); 83 var sigma_noise = (double) Math.Sqrt(noiseRatio.Value) * prob.StandardDeviationPop(); 84 prob_noise.AddRange(prob.Select(md => md + NormalDistributedRandomPolar.NextDouble(rand, 0, sigma_noise))); 85 data.Remove(prob); 86 data.Add(prob_noise); 87 } 81 var targetNoise = GetNoisyTarget(prob, rand); 82 if (targetNoise != null) data.Add(targetNoise); 88 83 89 84 return data;
Note: See TracChangeset
for help on using the changeset viewer.