Changeset 18086 for branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman
- Timestamp:
- 11/19/21 16:07:45 (3 years ago)
- Location:
- branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman
- Files:
-
- 123 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman1.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("I.6.20a exp(-theta**2/2)/sqrt(2*pi) | {0} samples | {1}", trainingSamples,30 return string.Format("I.6.20a exp(-theta**2/2)/sqrt(2*pi) | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 34 34 35 35 protected override string TargetVariable { get { return noiseRatio == null ? "f" : "f_noise"; } } 36 protected override string[] VariableNames { get { return new[] {"theta", noiseRatio == null ? "f" : "f_noise"}; } } 36 37 protected override string[] VariableNames { 38 get { return noiseRatio == null ? new[] {"theta", "f"} : new[] { "theta", "f", "f_noise" }; } 39 } 40 37 41 protected override string[] AllowedInputVariables { get { return new[] {"theta"}; } } 38 42 … … 60 64 } 61 65 62 if (noiseRatio != null) {66 /*if (noiseRatio != null) { 63 67 var f_noise = new List<double>(); 64 var sigma_noise = (double) noiseRatio* f.StandardDeviationPop();65 f_noise.AddRange(f.Select(md => md + NormalDistributedRandom .NextDouble(rand, 0, sigma_noise)));68 var sigma_noise = (double) Math.Sqrt(noiseRatio.Value) * f.StandardDeviationPop(); 69 f_noise.AddRange(f.Select(md => md + NormalDistributedRandomPolar.NextDouble(rand, 0, sigma_noise))); 66 70 data.Remove(f); 67 71 data.Add(f_noise); 68 } 72 }*/ 73 var targetNoise = ValueGenerator.GenerateNoise(f, rand, noiseRatio); 74 if (targetNoise != null) data.Add(targetNoise); 69 75 70 76 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman10.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("I.12.4 q1/(4*pi*epsilon*r**2) | {0} samples | {1}", trainingSamples,30 return string.Format("I.12.4 q1/(4*pi*epsilon*r**2) | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"q1", "epsilon", "r", noiseRatio == null ? "Ef" : "Ef_noise"}; }38 get { return noiseRatio == null ? new[] { "q1", "epsilon", "r", "Ef" } : new[] { "q1", "epsilon", "r", "Ef", "Ef_noise" }; } 39 39 } 40 40 … … 68 68 } 69 69 70 if (noiseRatio != null) { 71 var Ef_noise = new List<double>(); 72 var sigma_noise = (double) noiseRatio * Ef.StandardDeviationPop(); 73 Ef_noise.AddRange(Ef.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 74 data.Remove(Ef); 75 data.Add(Ef_noise); 76 } 70 var targetNoise = ValueGenerator.GenerateNoise(Ef, rand, noiseRatio); 71 if (targetNoise != null) data.Add(targetNoise); 77 72 78 73 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman100.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("III.21.20 -rho_c_0*q*A_vec/m | {0} samples | {1}", trainingSamples,30 return string.Format("III.21.20 -rho_c_0*q*A_vec/m | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"rho_c_0", "q", "A_vec", "m", noiseRatio == null ? "j" : "j_noise"}; }38 get { return noiseRatio == null ? new[] { "rho_c_0", "q", "A_vec", "m", "j"} : new[] { "rho_c_0", "q", "A_vec", "m", "j", "j_noise" }; } 39 39 } 40 40 … … 70 70 } 71 71 72 if (noiseRatio != null) { 73 var j_noise = new List<double>(); 74 var sigma_noise = (double) noiseRatio * j.StandardDeviationPop(); 75 j_noise.AddRange(j.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 76 data.Remove(j); 77 data.Add(j_noise); 78 } 72 var targetNoise = ValueGenerator.GenerateNoise(j, rand, noiseRatio); 73 if (targetNoise != null) data.Add(targetNoise); 79 74 80 75 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman11.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("I.12.5 q2*Ef | {0} samples | {1}", trainingSamples,30 return string.Format("I.12.5 q2*Ef | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"q2", "Ef", noiseRatio == null ? "F" : "F_noise"}; }38 get { return noiseRatio == null ? new[] {"q2", "Ef", "F" } : new[] { "q2", "Ef", "F", "F_noise" }; } 39 39 } 40 40 … … 66 66 } 67 67 68 if (noiseRatio != null) { 69 var F_noise = new List<double>(); 70 var sigma_noise = (double) noiseRatio * F.StandardDeviationPop(); 71 F_noise.AddRange(F.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 72 data.Remove(F); 73 data.Add(F_noise); 74 } 68 var targetNoise = ValueGenerator.GenerateNoise(F, rand, noiseRatio); 69 if (targetNoise != null) data.Add(targetNoise); 75 70 76 71 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman12.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("I.12.11 q*(Ef + B*v*sin(theta)) | {0} samples | {1}", trainingSamples,30 return string.Format("I.12.11 q*(Ef + B*v*sin(theta)) | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"q", "Ef", "B", "v", "theta", noiseRatio == null ? "F" : "F_noise"}; }38 get { return noiseRatio == null ? new[] { "q", "Ef", "B", "v", "theta", "F" } : new[] { "q", "Ef", "B", "v", "theta", "F", "F_noise" }; } 39 39 } 40 40 … … 72 72 } 73 73 74 if (noiseRatio != null) { 75 var F_noise = new List<double>(); 76 var sigma_noise = (double) noiseRatio * F.StandardDeviationPop(); 77 F_noise.AddRange(F.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 78 data.Remove(F); 79 data.Add(F_noise); 80 } 74 var targetNoise = ValueGenerator.GenerateNoise(F, rand, noiseRatio); 75 if (targetNoise != null) data.Add(targetNoise); 81 76 82 77 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman13.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("I.13.4 1/2*m*(v**2+u**2+w**2) | {0} samples | {1}", trainingSamples,30 return string.Format("I.13.4 1/2*m*(v**2+u**2+w**2) | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"m", "v", "u", "w", noiseRatio == null ? "K" : "K_noise"}; }38 get { return noiseRatio == null ? new[] { "m", "v", "u", "w", "K" } : new[] { "m", "v", "u", "w", "K", "K_noise" }; } 39 39 } 40 40 … … 70 70 } 71 71 72 if (noiseRatio != null) { 73 var K_noise = new List<double>(); 74 var sigma_noise = (double) noiseRatio * K.StandardDeviationPop(); 75 K_noise.AddRange(K.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 76 data.Remove(K); 77 data.Add(K_noise); 78 } 72 var targetNoise = ValueGenerator.GenerateNoise(K, rand, noiseRatio); 73 if (targetNoise != null) data.Add(targetNoise); 79 74 80 75 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman14.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("I.13.12 G*m1*m2*(1/r2-1/r1) | {0} samples | {1}", trainingSamples,30 return string.Format("I.13.12 G*m1*m2*(1/r2-1/r1) | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"m1", "m2", "r1", "r2", "G", noiseRatio == null ? "U" : "U_noise"}; }38 get { return noiseRatio == null ? new[] { "m1", "m2", "r1", "r2", "G", "U" } : new[] { "m1", "m2", "r1", "r2", "G", "U", "U_noise" }; } 39 39 } 40 40 … … 72 72 } 73 73 74 if (noiseRatio != null) { 75 var U_noise = new List<double>(); 76 var sigma_noise = (double) noiseRatio * U.StandardDeviationPop(); 77 U_noise.AddRange(U.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 78 data.Remove(U); 79 data.Add(U_noise); 80 } 74 var targetNoise = ValueGenerator.GenerateNoise(U, rand, noiseRatio); 75 if (targetNoise != null) data.Add(targetNoise); 81 76 82 77 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman15.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("I.14.3 m*g*z | {0} samples | {1}", trainingSamples,30 return string.Format("I.14.3 m*g*z | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"m", "g", "z", noiseRatio == null ? "U" : "U_noise"}; }38 get { return noiseRatio == null ? new[] { "m", "g", "z", "U" } : new[] { "m", "g", "z", "U", "U_noise" }; } 39 39 } 40 40 … … 68 68 } 69 69 70 if (noiseRatio != null) { 71 var U_noise = new List<double>(); 72 var sigma_noise = (double) noiseRatio * U.StandardDeviationPop(); 73 U_noise.AddRange(U.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 74 data.Remove(U); 75 data.Add(U_noise); 76 } 70 var targetNoise = ValueGenerator.GenerateNoise(U, rand, noiseRatio); 71 if (targetNoise != null) data.Add(targetNoise); 77 72 78 73 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman16.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("I.14.4 1/2*k_spring*x**2 | {0} samples | {1}", trainingSamples,30 return string.Format("I.14.4 1/2*k_spring*x**2 | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"k_spring", "x", noiseRatio == null ? "U" : "U_noise"}; }38 get { return noiseRatio == null ? new[] { "k_spring", "x", "U" } : new[] { "k_spring", "x", "U", "U_noise" }; } 39 39 } 40 40 … … 66 66 } 67 67 68 if (noiseRatio != null) { 69 var U_noise = new List<double>(); 70 var sigma_noise = (double) noiseRatio * U.StandardDeviationPop(); 71 U_noise.AddRange(U.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 72 data.Remove(U); 73 data.Add(U_noise); 74 } 68 var targetNoise = ValueGenerator.GenerateNoise(U, rand, noiseRatio); 69 if (targetNoise != null) data.Add(targetNoise); 75 70 76 71 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman17.cs
r17678 r18086 10 10 private readonly int trainingSamples; 11 11 12 public Feynman17() : this((int) 12 public Feynman17() : this((int)DateTime.Now.Ticks, 10000, 10000, null) { } 13 13 14 14 public Feynman17(int seed) { 15 Seed 15 Seed = seed; 16 16 trainingSamples = 10000; 17 testSamples 18 noiseRatio 17 testSamples = 10000; 18 noiseRatio = null; 19 19 } 20 20 21 21 public Feynman17(int seed, int trainingSamples, int testSamples, double? noiseRatio) { 22 Seed 22 Seed = seed; 23 23 this.trainingSamples = trainingSamples; 24 this.testSamples 25 this.noiseRatio 24 this.testSamples = testSamples; 25 this.noiseRatio = noiseRatio; 26 26 } 27 27 28 28 public override string Name { 29 29 get { 30 return string.Format("I.15.3x (x-u*t)/sqrt(1-u**2/c**2) | {0} samples | {1}", trainingSamples,31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}", noiseRatio));30 return string.Format("I.15.3x (x-u*t)/sqrt(1-u**2/c**2) | {0}", 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}", noiseRatio)); 32 32 } 33 33 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"x", "u", "c", "t", noiseRatio == null ? "x1" : "x1_noise"}; }38 get { return noiseRatio == null ? new[] { "x", "u", "c", "t", "x1" } : new[] { "x", "u", "c", "t", "x1", "x1_noise" }; } 39 39 } 40 40 41 protected override string[] AllowedInputVariables { get { return new[] { "x", "u", "c", "t"}; } }41 protected override string[] AllowedInputVariables { get { return new[] { "x", "u", "c", "t" }; } } 42 42 43 43 public int Seed { get; private set; } … … 49 49 50 50 protected override List<List<double>> GenerateValues() { 51 var rand = new MersenneTwister((uint) 51 var rand = new MersenneTwister((uint)Seed); 52 52 53 53 var data = new List<List<double>>(); 54 var x 55 var u 56 var c 57 var t 54 var x = ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 5, 10).ToList(); 55 var u = ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 1, 2).ToList(); 56 var c = ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 3, 20).ToList(); 57 var t = ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 1, 2).ToList(); 58 58 59 59 var x1 = new List<double>(); … … 70 70 } 71 71 72 if (noiseRatio != null) { 73 var x1_noise = new List<double>(); 74 var sigma_noise = (double) noiseRatio * x1.StandardDeviationPop(); 75 x1_noise.AddRange(x1.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 76 data.Remove(x1); 77 data.Add(x1_noise); 78 } 72 var targetNoise = ValueGenerator.GenerateNoise(x1, rand, noiseRatio); 73 if (targetNoise != null) data.Add(targetNoise); 79 74 80 75 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman18.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("I.15.3t (t-u*x/c**2)/sqrt(1-u**2/c**2) | {0} samples | {1}",31 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));30 return string.Format("I.15.3t (t-u*x/c**2)/sqrt(1-u**2/c**2) | {0}", 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } 33 33 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"x", "c", "u", "t", noiseRatio == null ? "t1" : "t1_noise"}; }38 get { return noiseRatio == null ? new[] { "x", "c", "u", "t", "t1" } : new[] { "x", "c", "u", "t", "t1", "t1_noise" }; } 39 39 } 40 40 … … 70 70 } 71 71 72 if (noiseRatio != null) { 73 var t1_noise = new List<double>(); 74 var sigma_noise = (double) noiseRatio * t1.StandardDeviationPop(); 75 t1_noise.AddRange(t1.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 76 data.Remove(t1); 77 data.Add(t1_noise); 78 } 72 var targetNoise = ValueGenerator.GenerateNoise(t1, rand, noiseRatio); 73 if (targetNoise != null) data.Add(targetNoise); 79 74 80 75 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman19.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("I.15.10 m_0*v/sqrt(1-v**2/c**2) | {0} samples | {1}", trainingSamples,30 return string.Format("I.15.10 m_0*v/sqrt(1-v**2/c**2) | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"m_0", "v", "c", noiseRatio == null ? "p" : "p_noise"}; }38 get { return noiseRatio == null ? new[] { "m_0", "v", "c", "p" } : new[] { "m_0", "v", "c", "p", "p_noise" }; } 39 39 } 40 40 … … 68 68 } 69 69 70 if (noiseRatio != null) { 71 var p_noise = new List<double>(); 72 var sigma_noise = (double) noiseRatio * p.StandardDeviationPop(); 73 p_noise.AddRange(p.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 74 data.Remove(p); 75 data.Add(p_noise); 76 } 70 var targetNoise = ValueGenerator.GenerateNoise(p, rand, noiseRatio); 71 if (targetNoise != null) data.Add(targetNoise); 77 72 78 73 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman2.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("I.6.20 exp(-(theta/sigma)**2/2)/(sqrt(2*pi)*sigma) | {0} samples | {1}",31 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));30 return string.Format("I.6.20 exp(-(theta/sigma)**2/2)/(sqrt(2*pi)*sigma) | {0}", 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } 33 33 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"sigma", "theta", noiseRatio == null ? "f" : "f_noise"}; }38 get { return noiseRatio == null ? new[] { "sigma", "theta", "f" } : new[] { "sigma", "theta", "f", "f_noise" }; } 39 39 } 40 40 … … 66 66 } 67 67 68 if (noiseRatio != null) { 69 var f_noise = new List<double>(); 70 var sigma_noise = (double) noiseRatio * f.StandardDeviationPop(); 71 f_noise.AddRange(f.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 72 data.Remove(f); 73 data.Add(f_noise); 74 } 68 var targetNoise = ValueGenerator.GenerateNoise(f, rand, noiseRatio); 69 if (targetNoise != null) data.Add(targetNoise); 75 70 76 71 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman20.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("I.16.6 (u+v)/(1+u*v/c**2) | {0} samples | {1}", trainingSamples,30 return string.Format("I.16.6 (u+v)/(1+u*v/c**2) | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"c", "v", "u", noiseRatio == null ? "v1" : "v1_noise"}; }38 get { return noiseRatio == null ? new[] { "c", "v", "u", "v1" } : new[] { "c", "v", "u", "v1", "v1_noise" }; } 39 39 } 40 40 … … 68 68 } 69 69 70 if (noiseRatio != null) { 71 var v1_noise = new List<double>(); 72 var sigma_noise = (double) noiseRatio * v1.StandardDeviationPop(); 73 v1_noise.AddRange(v1.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 74 data.Remove(v1); 75 data.Add(v1_noise); 76 } 70 var targetNoise = ValueGenerator.GenerateNoise(v1, rand, noiseRatio); 71 if (targetNoise != null) data.Add(targetNoise); 77 72 78 73 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman21.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("I.18.4 (m1*r1 + m2*r2)/(m1 + m2) | {0} samples | {1}", trainingSamples,30 return string.Format("I.18.4 (m1*r1 + m2*r2)/(m1 + m2) | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"m1", "m2", "r1", "r2", noiseRatio == null ? "r" : "r_noise"}; }38 get { return noiseRatio == null ? new[] { "m1", "m2", "r1", "r2", "r" } : new[] { "m1", "m2", "r1", "r2", "r", "r_noise" }; } 39 39 } 40 40 … … 70 70 } 71 71 72 if (noiseRatio != null) { 73 var r_noise = new List<double>(); 74 var sigma_noise = (double) noiseRatio * r.StandardDeviationPop(); 75 r_noise.AddRange(r.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 76 data.Remove(r); 77 data.Add(r_noise); 78 } 72 var targetNoise = ValueGenerator.GenerateNoise(r, rand, noiseRatio); 73 if (targetNoise != null) data.Add(targetNoise); 79 74 80 75 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman22.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("I.18.12 r*F*sin(theta) | {0} samples | {1}", trainingSamples,30 return string.Format("I.18.12 r*F*sin(theta) | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"r", "F", "theta", noiseRatio == null ? "tau" : "tau_noise"}; }38 get { return noiseRatio == null ? new[] { "r", "F", "theta", "tau" } : new[] { "r", "F", "theta", "tau", "tau_noise" }; } 39 39 } 40 40 … … 68 68 } 69 69 70 if (noiseRatio != null) { 71 var tau_noise = new List<double>(); 72 var sigma_noise = (double) noiseRatio * tau.StandardDeviationPop(); 73 tau_noise.AddRange(tau.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 74 data.Remove(tau); 75 data.Add(tau_noise); 76 } 70 var targetNoise = ValueGenerator.GenerateNoise(tau, rand, noiseRatio); 71 if (targetNoise != null) data.Add(targetNoise); 77 72 78 73 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman23.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("I.18.16 m*r*v*sin(theta) | {0} samples | {1}", trainingSamples,30 return string.Format("I.18.16 m*r*v*sin(theta) | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"m", "r", "v", "theta", noiseRatio == null ? "L" : "L_noise"}; }38 get { return noiseRatio == null ? new[] { "m", "r", "v", "theta", "L" } : new[] { "m", "r", "v", "theta", "L", "L_noise" }; } 39 39 } 40 40 … … 70 70 } 71 71 72 if (noiseRatio != null) { 73 var L_noise = new List<double>(); 74 var sigma_noise = (double) noiseRatio * L.StandardDeviationPop(); 75 L_noise.AddRange(L.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 76 data.Remove(L); 77 data.Add(L_noise); 78 } 72 var targetNoise = ValueGenerator.GenerateNoise(L, rand, noiseRatio); 73 if (targetNoise != null) data.Add(targetNoise); 79 74 80 75 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman24.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("I.24.6 1/4*m*(omega**2 + omega_0**2)*x**2 | {0} samples | {1}",31 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));30 return string.Format("I.24.6 1/4*m*(omega**2 + omega_0**2)*x**2 | {0}", 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } 33 33 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"m", "omega", "omega_0", "x", noiseRatio == null ? "E_n" : "E_n_noise"}; }38 get { return noiseRatio == null ? new[] { "m", "omega", "omega_0", "x", "E_n" } : new[] { "m", "omega", "omega_0", "x", "E_n", "E_n_noise" }; } 39 39 } 40 40 … … 70 70 } 71 71 72 if (noiseRatio != null) { 73 var E_n_noise = new List<double>(); 74 var sigma_noise = (double) noiseRatio * E_n.StandardDeviationPop(); 75 E_n_noise.AddRange(E_n.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 76 data.Remove(E_n); 77 data.Add(E_n_noise); 78 } 72 var targetNoise = ValueGenerator.GenerateNoise(E_n, rand, noiseRatio); 73 if (targetNoise != null) data.Add(targetNoise); 79 74 80 75 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman25.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("I.25.13 q/C | {0} samples | {1}", trainingSamples,30 return string.Format("I.25.13 q/C | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"q", "C", noiseRatio == null ? "Volt" : "Volt_noise"}; }38 get { return noiseRatio == null ? new[] { "q", "C", "Volt" } : new[] { "q", "C", "Volt", "Volt_noise" }; } 39 39 } 40 40 … … 66 66 } 67 67 68 if (noiseRatio != null) { 69 var Volt_noise = new List<double>(); 70 var sigma_noise = (double) noiseRatio * Volt.StandardDeviationPop(); 71 Volt_noise.AddRange(Volt.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 72 data.Remove(Volt); 73 data.Add(Volt_noise); 74 } 68 var targetNoise = ValueGenerator.GenerateNoise(Volt, rand, noiseRatio); 69 if (targetNoise != null) data.Add(targetNoise); 75 70 76 71 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman26.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("I.26.2 arcsin(n*sin(theta2)) | {0} samples | {1}", trainingSamples,30 return string.Format("I.26.2 arcsin(n*sin(theta2)) | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"n", "theta2", noiseRatio == null ? "theta1" : "theta1_noise"}; }38 get { return noiseRatio == null ? new[] { "n", "theta2", "theta1" } : new[] { "n", "theta2", "theta1", "theta1_noise" }; } 39 39 } 40 40 … … 66 66 } 67 67 68 if (noiseRatio != null) { 69 var theta1_noise = new List<double>(); 70 var sigma_noise = (double) noiseRatio * theta1.StandardDeviationPop(); 71 theta1_noise.AddRange(theta1.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 72 data.Remove(theta1); 73 data.Add(theta1_noise); 74 } 68 var targetNoise = ValueGenerator.GenerateNoise(theta1, rand, noiseRatio); 69 if (targetNoise != null) data.Add(targetNoise); 75 70 76 71 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman27.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("I.27.6 1/(1/d1+n/d2) | {0} samples | {1}", trainingSamples,30 return string.Format("I.27.6 1/(1/d1+n/d2) | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"d1", "d2", "n", noiseRatio == null ? "foc" : "foc_noise"}; }38 get { return noiseRatio == null ? new[] { "d1", "d2", "n", "foc" } : new[] { "d1", "d2", "n", "foc", "foc_noise" }; } 39 39 } 40 40 … … 68 68 } 69 69 70 if (noiseRatio != null) { 71 var foc_noise = new List<double>(); 72 var sigma_noise = (double) noiseRatio * foc.StandardDeviationPop(); 73 foc_noise.AddRange(foc.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 74 data.Remove(foc); 75 data.Add(foc_noise); 76 } 70 var targetNoise = ValueGenerator.GenerateNoise(foc, rand, noiseRatio); 71 if (targetNoise != null) data.Add(targetNoise); 77 72 78 73 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman28.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("I.29.4 omega/c | {0} samples | {1}", trainingSamples,30 return string.Format("I.29.4 omega/c | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"omega", "c", noiseRatio == null ? "k" : "k_noise"}; }38 get { return noiseRatio == null ? new[] { "omega", "c", "k" } : new[] { "omega", "c", "k", "k_noise" }; } 39 39 } 40 40 … … 66 66 } 67 67 68 if (noiseRatio != null) { 69 var k_noise = new List<double>(); 70 var sigma_noise = (double) noiseRatio * k.StandardDeviationPop(); 71 k_noise.AddRange(k.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 72 data.Remove(k); 73 data.Add(k_noise); 74 } 68 var targetNoise = ValueGenerator.GenerateNoise(k, rand, noiseRatio); 69 if (targetNoise != null) data.Add(targetNoise); 75 70 76 71 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman29.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("I.29.16 sqrt(x1**2+x2**2 - 2*x1*x2*cos(theta1 - theta2)) | {0} samples | {1}",31 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));30 return string.Format("I.29.16 sqrt(x1**2+x2**2 - 2*x1*x2*cos(theta1 - theta2)) | {0}", 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } 33 33 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"x1", "x2", "theta1", "theta2", noiseRatio == null ? "x" : "x_noise"}; }38 get { return noiseRatio == null ? new[] { "x1", "x2", "theta1", "theta2", "x" } : new[] { "x1", "x2", "theta1", "theta2", "x", "x_noise" }; } 39 39 } 40 40 … … 71 71 } 72 72 73 if (noiseRatio != null) { 74 var x_noise = new List<double>(); 75 var sigma_noise = (double) noiseRatio * x.StandardDeviationPop(); 76 x_noise.AddRange(x.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 77 data.Remove(x); 78 data.Add(x_noise); 79 } 73 var targetNoise = ValueGenerator.GenerateNoise(x, rand, noiseRatio); 74 if (targetNoise != null) data.Add(targetNoise); 80 75 81 76 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman3.cs
r17678 r18086 29 29 get { 30 30 return string.Format( 31 "I.6.20b exp(-((theta-theta1)/sigma)**2/2)/(sqrt(2*pi)*sigma) | {0} samples | {1}",32 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));31 "I.6.20b exp(-((theta-theta1)/sigma)**2/2)/(sqrt(2*pi)*sigma) | {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[] {"sigma", "theta", "theta1", noiseRatio == null ? "f" : "f_noise"}; }39 get { return noiseRatio == null ? new[] { "sigma", "theta", "theta1", "f" } : new[] { "sigma", "theta", "theta1", "f", "f_noise" }; } 40 40 } 41 41 … … 69 69 } 70 70 71 if (noiseRatio != null) { 72 var f_noise = new List<double>(); 73 var sigma_noise = (double) noiseRatio * f.StandardDeviationPop(); 74 f_noise.AddRange(f.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 75 data.Remove(f); 76 data.Add(f_noise); 77 } 71 var targetNoise = ValueGenerator.GenerateNoise(f, rand, noiseRatio); 72 if (targetNoise != null) data.Add(targetNoise); 78 73 79 74 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman30.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("I.30.3 Int_0*sin(n*theta/2)**2/sin(theta/2)**2 | {0} samples | {1}",31 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));30 return string.Format("I.30.3 Int_0*sin(n*theta/2)**2/sin(theta/2)**2 | {0}", 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } 33 33 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"Int_0", "theta", "n", noiseRatio == null ? "Int" : "Int_noise"}; }38 get { return noiseRatio == null ? new[] { "Int_0", "theta", "n", "Int" } : new[] { "Int_0", "theta", "n", "Int", "Int_noise" }; } 39 39 } 40 40 … … 68 68 } 69 69 70 if (noiseRatio != null) { 71 var Int_noise = new List<double>(); 72 var sigma_noise = (double) noiseRatio * Int.StandardDeviationPop(); 73 Int_noise.AddRange(Int.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 74 data.Remove(Int); 75 data.Add(Int_noise); 76 } 70 var targetNoise = ValueGenerator.GenerateNoise(Int, rand, noiseRatio); 71 if (targetNoise != null) data.Add(targetNoise); 77 72 78 73 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman31.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("I.30.5 arcsin(lambd/(n*d)) | {0} samples | {1}", trainingSamples,30 return string.Format("I.30.5 arcsin(lambd/(n*d)) | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"lambd", "d", "n", noiseRatio == null ? "theta" : "theta_noise"}; }38 get { return noiseRatio == null ? new[] { "lambd", "d", "n", "theta" } : new[] { "lambd", "d", "n", "theta", "theta_noise" }; } 39 39 } 40 40 … … 68 68 } 69 69 70 if (noiseRatio != null) { 71 var theta_noise = new List<double>(); 72 var sigma_noise = (double) noiseRatio * theta.StandardDeviationPop(); 73 theta_noise.AddRange(theta.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 74 data.Remove(theta); 75 data.Add(theta_noise); 76 } 70 var targetNoise = ValueGenerator.GenerateNoise(theta, rand, noiseRatio); 71 if (targetNoise != null) data.Add(targetNoise); 77 72 78 73 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman32.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("I.32.5 q**2*a**2/(6*pi*epsilon*c**3) | {0} samples | {1}",31 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));30 return string.Format("I.32.5 q**2*a**2/(6*pi*epsilon*c**3) | {0}", 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } 33 33 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"q", "a", "epsilon", "c", noiseRatio == null ? "Pwr" : "Pwr_noise"}; }38 get { return noiseRatio == null ? new[] { "q", "a", "epsilon", "c", "Pwr" } : new[] { "q", "a", "epsilon", "c", "Pwr", "Pwr_noise" }; } 39 39 } 40 40 … … 70 70 } 71 71 72 if (noiseRatio != null) { 73 var Pwr_noise = new List<double>(); 74 var sigma_noise = (double) noiseRatio * Pwr.StandardDeviationPop(); 75 Pwr_noise.AddRange(Pwr.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 76 data.Remove(Pwr); 77 data.Add(Pwr_noise); 78 } 72 var targetNoise = ValueGenerator.GenerateNoise(Pwr, rand, noiseRatio); 73 if (targetNoise != null) data.Add(targetNoise); 79 74 80 75 return data; -
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; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman34.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("I.34.8 q*v*B/p | {0} samples | {1}", trainingSamples,30 return string.Format("I.34.8 q*v*B/p | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"q", "v", "B", "p", noiseRatio == null ? "omega" : "omega_noise"}; }38 get { return noiseRatio == null ? new[] { "q", "v", "B", "p", "omega" } : new[] { "q", "v", "B", "p", "omega", "omega_noise" }; } 39 39 } 40 40 … … 70 70 } 71 71 72 if (noiseRatio != null) { 73 var omega_noise = new List<double>(); 74 var sigma_noise = (double) noiseRatio * omega.StandardDeviationPop(); 75 omega_noise.AddRange(omega.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 76 data.Remove(omega); 77 data.Add(omega_noise); 78 } 72 var targetNoise = ValueGenerator.GenerateNoise(omega, rand, noiseRatio); 73 if (targetNoise != null) data.Add(targetNoise); 79 74 80 75 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman35.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("I.34.10 omega_0/(1-v/c) | {0} samples | {1}", trainingSamples,30 return string.Format("I.34.10 omega_0/(1-v/c) | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"c", "v", "omega_0", noiseRatio == null ? "omega" : "omega_noise"}; }38 get { return noiseRatio == null ? new[] { "c", "v", "omega_0", "omega" } : new[] { "c", "v", "omega_0", "omega", "omega_noise" }; } 39 39 } 40 40 … … 68 68 } 69 69 70 if (noiseRatio != null) { 71 var omega_noise = new List<double>(); 72 var sigma_noise = (double) noiseRatio * omega.StandardDeviationPop(); 73 omega_noise.AddRange(omega.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 74 data.Remove(omega); 75 data.Add(omega_noise); 76 } 70 var targetNoise = ValueGenerator.GenerateNoise(omega, rand, noiseRatio); 71 if (targetNoise != null) data.Add(targetNoise); 77 72 78 73 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman36.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("I.34.14 (1+v/c)/sqrt(1-v**2/c**2)*omega_0 | {0} samples | {1}",31 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));30 return string.Format("I.34.14 (1+v/c)/sqrt(1-v**2/c**2)*omega_0 | {0}", 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } 33 33 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"c", "v", "omega_0", noiseRatio == null ? "omega" : "omega_noise"}; }38 get { return noiseRatio == null ? new[] { "c", "v", "omega_0", "omega" } : new[] { "c", "v", "omega_0", "omega", "omega_noise" }; } 39 39 } 40 40 … … 68 68 } 69 69 70 if (noiseRatio != null) { 71 var omega_noise = new List<double>(); 72 var sigma_noise = (double) noiseRatio * omega.StandardDeviationPop(); 73 omega_noise.AddRange(omega.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 74 data.Remove(omega); 75 data.Add(omega_noise); 76 } 70 var targetNoise = ValueGenerator.GenerateNoise(omega, rand, noiseRatio); 71 if (targetNoise != null) data.Add(targetNoise); 77 72 78 73 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman37.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("I.34.27 h*omega | {0} samples | {1}", trainingSamples,30 return string.Format("I.34.27 h*omega | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"omega", "h", noiseRatio == null ? "E_n" : "E_n_noise"}; }38 get { return noiseRatio == null ? new[] { "omega", "h", "E_n" } : new[] { "omega", "h", "E_n", "E_n_noise" }; } 39 39 } 40 40 … … 66 66 } 67 67 68 if (noiseRatio != null) { 69 var E_n_noise = new List<double>(); 70 var sigma_noise = (double) noiseRatio * E_n.StandardDeviationPop(); 71 E_n_noise.AddRange(E_n.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 72 data.Remove(E_n); 73 data.Add(E_n_noise); 74 } 68 var targetNoise = ValueGenerator.GenerateNoise(E_n, rand, noiseRatio); 69 if (targetNoise != null) data.Add(targetNoise); 75 70 76 71 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman38.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("I.37.4 I1 + I2 + 2*sqrt(I1*I2)*cos(delta) | {0} samples | {1}",31 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));30 return string.Format("I.37.4 I1 + I2 + 2*sqrt(I1*I2)*cos(delta) | {0}", 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } 33 33 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"I1", "I2", "delta", noiseRatio == null ? "Int" : "Int_noise"}; }38 get { return noiseRatio == null ? new[] { "I1", "I2", "delta", "Int" } : new[] { "I1", "I2", "delta", "Int", "Int_noise" }; } 39 39 } 40 40 … … 68 68 } 69 69 70 if (noiseRatio != null) { 71 var Int_noise = new List<double>(); 72 var sigma_noise = (double) noiseRatio * Int.StandardDeviationPop(); 73 Int_noise.AddRange(Int.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 74 data.Remove(Int); 75 data.Add(Int_noise); 76 } 70 var targetNoise = ValueGenerator.GenerateNoise(Int, rand, noiseRatio); 71 if (targetNoise != null) data.Add(targetNoise); 77 72 78 73 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman39.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("I.38.12 4*pi*epsilon*h**2/(m*q**2) | {0} samples | {1}",31 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));30 return string.Format("I.38.12 4*pi*epsilon*h**2/(m*q**2) | {0}", 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } 33 33 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"m", "q", "h", "epsilon", noiseRatio == null ? "r" : "r_noise"}; }38 get { return noiseRatio == null ? new[] { "m", "q", "h", "epsilon", "r" } : new[] { "m", "q", "h", "epsilon", "r", "r_noise" }; } 39 39 } 40 40 … … 70 70 } 71 71 72 if (noiseRatio != null) { 73 var r_noise = new List<double>(); 74 var sigma_noise = (double) noiseRatio * r.StandardDeviationPop(); 75 r_noise.AddRange(r.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 76 data.Remove(r); 77 data.Add(r_noise); 78 } 72 var targetNoise = ValueGenerator.GenerateNoise(r, rand, noiseRatio); 73 if (targetNoise != null) data.Add(targetNoise); 79 74 80 75 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman4.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("I.8.14 sqrt((x2-x1)**2+(y2-y1)**2) | {0} samples | {1}", trainingSamples,30 return string.Format("I.8.14 sqrt((x2-x1)**2+(y2-y1)**2) | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"x1", "x2", "y1", "y2", noiseRatio == null ? "d" : "d_noise"}; }38 get { return noiseRatio == null ? new[] { "x1", "x2", "y1", "y2", "d" } : new[] { "x1", "x2", "y1", "y2", "d", "d_noise" }; } 39 39 } 40 40 … … 70 70 } 71 71 72 if (noiseRatio != null) { 73 var d_noise = new List<double>(); 74 var sigma_noise = (double) noiseRatio * d.StandardDeviationPop(); 75 d_noise.AddRange(d.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 76 data.Remove(d); 77 data.Add(d_noise); 78 } 72 var targetNoise = ValueGenerator.GenerateNoise(d, rand, noiseRatio); 73 if (targetNoise != null) data.Add(targetNoise); 79 74 80 75 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman40.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("I.39.10 3/2*pF*V | {0} samples | {1}", trainingSamples,30 return string.Format("I.39.10 3/2*pF*V | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"pF", "V", noiseRatio == null ? "E_n" : "E_n_noise"}; }38 get { return noiseRatio == null ? new[] { "pF", "V", "E_n" } : new[] { "pF", "V", "E_n", "E_n_noise" }; } 39 39 } 40 40 … … 66 66 } 67 67 68 if (noiseRatio != null) { 69 var E_n_noise = new List<double>(); 70 var sigma_noise = (double) noiseRatio * E_n.StandardDeviationPop(); 71 E_n_noise.AddRange(E_n.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 72 data.Remove(E_n); 73 data.Add(E_n_noise); 74 } 68 var targetNoise = ValueGenerator.GenerateNoise(E_n, rand, noiseRatio); 69 if (targetNoise != null) data.Add(targetNoise); 75 70 76 71 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman41.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("I.39.11 1/(gamma-1)*pF*V | {0} samples | {1}", trainingSamples,30 return string.Format("I.39.11 1/(gamma-1)*pF*V | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"gamma", "pF", "V", noiseRatio == null ? "E_n" : "E_n_noise"}; }38 get { return noiseRatio == null ? new[] { "gamma", "pF", "V", "E_n" } : new[] { "gamma", "pF", "V", "E_n", "E_n_noise" }; } 39 39 } 40 40 … … 68 68 } 69 69 70 if (noiseRatio != null) { 71 var E_n_noise = new List<double>(); 72 var sigma_noise = (double) noiseRatio * E_n.StandardDeviationPop(); 73 E_n_noise.AddRange(E_n.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 74 data.Remove(E_n); 75 data.Add(E_n_noise); 76 } 70 var targetNoise = ValueGenerator.GenerateNoise(E_n, rand, noiseRatio); 71 if (targetNoise != null) data.Add(targetNoise); 77 72 78 73 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman42.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("I.39.22 n*kb*T/V | {0} samples | {1}", trainingSamples,30 return string.Format("I.39.22 n*kb*T/V | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"n", "T", "V", "kb", noiseRatio == null ? "pr" : "pr_noise"}; }38 get { return noiseRatio == null ? new[] { "n", "T", "V", "kb", "pr" } : new[] { "n", "T", "V", "kb", "pr", "pr_noise" }; } 39 39 } 40 40 … … 70 70 } 71 71 72 if (noiseRatio != null) { 73 var pr_noise = new List<double>(); 74 var sigma_noise = (double) noiseRatio * pr.StandardDeviationPop(); 75 pr_noise.AddRange(pr.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 76 data.Remove(pr); 77 data.Add(pr_noise); 78 } 72 var targetNoise = ValueGenerator.GenerateNoise(pr, rand, noiseRatio); 73 if (targetNoise != null) data.Add(targetNoise); 79 74 80 75 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman43.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("I.40.1 n_0*exp(-m*g*x/(kb*T)) | {0} samples | {1}", trainingSamples,30 return string.Format("I.40.1 n_0*exp(-m*g*x/(kb*T)) | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"n_0", "m", "x", "T", "g", "kb", noiseRatio == null ? "n" : "n_noise"}; }38 get { return noiseRatio == null ? new[] { "n_0", "m", "x", "T", "g", "kb", "n" } : new[] { "n_0", "m", "x", "T", "g", "kb", "n", "n_noise" }; } 39 39 } 40 40 … … 74 74 } 75 75 76 if (noiseRatio != null) { 77 var n_noise = new List<double>(); 78 var sigma_noise = (double) noiseRatio * n.StandardDeviationPop(); 79 n_noise.AddRange(n.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 80 data.Remove(n); 81 data.Add(n_noise); 82 } 76 var targetNoise = ValueGenerator.GenerateNoise(n, rand, noiseRatio); 77 if (targetNoise != null) data.Add(targetNoise); 83 78 84 79 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman44.cs
r17678 r18086 29 29 get { 30 30 return string.Format( 31 "I.41.16 h*omega**3/(pi**2 * c**2 * (exp(h*omega/(kb*T))-1)) | {0} samples | {1}",32 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));31 "I.41.16 h*omega**3/(pi**2 * c**2 * (exp(h*omega/(kb*T))-1)) | {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[] {"omega", "T", "h", "kb", "c", noiseRatio == null ? "L_rad" : "L_rad_noise"}; }39 get { return noiseRatio == null ? new[] { "omega", "T", "h", "kb", "c", "L_rad" } : new[] { "omega", "T", "h", "kb", "c", "L_rad", "L_rad_noise" }; } 40 40 } 41 41 … … 75 75 } 76 76 77 if (noiseRatio != null) { 78 var L_rad_noise = new List<double>(); 79 var sigma_noise = (double) noiseRatio * L_rad.StandardDeviationPop(); 80 L_rad_noise.AddRange(L_rad.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 81 data.Remove(L_rad); 82 data.Add(L_rad_noise); 83 } 77 var targetNoise = ValueGenerator.GenerateNoise(L_rad, rand, noiseRatio); 78 if (targetNoise != null) data.Add(targetNoise); 84 79 85 80 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman45.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("I.43.16 mu_drift*q*Volt/d | {0} samples | {1}", trainingSamples,30 return string.Format("I.43.16 mu_drift*q*Volt/d | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"mu_drift", "q", "Volt", "d", noiseRatio == null ? "v" : "v_noise"}; }38 get { return noiseRatio == null ? new[] { "mu_drift", "q", "Volt", "d", "v" } : new[] { "mu_drift", "q", "Volt", "d", "v", "v_noise" }; } 39 39 } 40 40 … … 70 70 } 71 71 72 if (noiseRatio != null) { 73 var v_noise = new List<double>(); 74 var sigma_noise = (double) noiseRatio * v.StandardDeviationPop(); 75 v_noise.AddRange(v.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 76 data.Remove(v); 77 data.Add(v_noise); 78 } 72 var targetNoise = ValueGenerator.GenerateNoise(v, rand, noiseRatio); 73 if (targetNoise != null) data.Add(targetNoise); 79 74 80 75 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman46.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("I.43.31 mob*kb*T | {0} samples | {1}", trainingSamples,30 return string.Format("I.43.31 mob*kb*T | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"mob", "T", "kb", noiseRatio == null ? "D" : "D_noise"}; }38 get { return noiseRatio == null ? new[] { "mob", "T", "kb", "D" } : new[] { "mob", "T", "kb", "D", "D_noise" }; } 39 39 } 40 40 … … 68 68 } 69 69 70 if (noiseRatio != null) { 71 var D_noise = new List<double>(); 72 var sigma_noise = (double) noiseRatio * D.StandardDeviationPop(); 73 D_noise.AddRange(D.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 74 data.Remove(D); 75 data.Add(D_noise); 76 } 70 var targetNoise = ValueGenerator.GenerateNoise(D, rand, noiseRatio); 71 if (targetNoise != null) data.Add(targetNoise); 77 72 78 73 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman47.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("I.43.43 1/(gamma-1)*kb*v/A | {0} samples | {1}", trainingSamples,30 return string.Format("I.43.43 1/(gamma-1)*kb*v/A | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"gamma", "kb", "A", "v", noiseRatio == null ? "kappa" : "kappa_noise"}; }38 get { return noiseRatio == null ? new[] { "gamma", "kb", "A", "v", "kappa" } : new[] { "gamma", "kb", "A", "v", "kappa", "kappa_noise" }; } 39 39 } 40 40 … … 70 70 } 71 71 72 if (noiseRatio != null) { 73 var kappa_noise = new List<double>(); 74 var sigma_noise = (double) noiseRatio * kappa.StandardDeviationPop(); 75 kappa_noise.AddRange(kappa.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 76 data.Remove(kappa); 77 data.Add(kappa_noise); 78 } 72 var targetNoise = ValueGenerator.GenerateNoise(kappa, rand, noiseRatio); 73 if (targetNoise != null) data.Add(targetNoise); 79 74 80 75 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman48.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("I.44.4 n*kb*T*ln(V2/V1) | {0} samples | {1}", trainingSamples,30 return string.Format("I.44.4 n*kb*T*ln(V2/V1) | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"n", "kb", "T", "V1", "V2", noiseRatio == null ? "E_n" : "E_n_noise"}; }38 get { return noiseRatio == null ? new[] { "n", "kb", "T", "V1", "V2", "E_n" } : new[] { "n", "kb", "T", "V1", "V2", "E_n", "E_n_noise" }; } 39 39 } 40 40 … … 72 72 } 73 73 74 if (noiseRatio != null) { 75 var E_n_noise = new List<double>(); 76 var sigma_noise = (double) noiseRatio * E_n.StandardDeviationPop(); 77 E_n_noise.AddRange(E_n.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 78 data.Remove(E_n); 79 data.Add(E_n_noise); 80 } 74 var targetNoise = ValueGenerator.GenerateNoise(E_n, rand, noiseRatio); 75 if (targetNoise != null) data.Add(targetNoise); 81 76 82 77 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman49.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("I.47.23 sqrt(gamma*pr/rho) | {0} samples | {1}", trainingSamples,30 return string.Format("I.47.23 sqrt(gamma*pr/rho) | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"gamma", "pr", "rho", noiseRatio == null ? "c" : "c_noise"}; }38 get { return noiseRatio == null ? new[] { "gamma", "pr", "rho", "c" } : new[] { "gamma", "pr", "rho", "c", "c_noise" }; } 39 39 } 40 40 … … 68 68 } 69 69 70 if (noiseRatio != null) { 71 var c_noise = new List<double>(); 72 var sigma_noise = (double) noiseRatio * c.StandardDeviationPop(); 73 c_noise.AddRange(c.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 74 data.Remove(c); 75 data.Add(c_noise); 76 } 70 var targetNoise = ValueGenerator.GenerateNoise(c, rand, noiseRatio); 71 if (targetNoise != null) data.Add(targetNoise); 77 72 78 73 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman5.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("I.9.18 G*m1*m2/((x2-x1)**2+(y2-y1)**2+(z2-z1)**2) | {0} samples | {1}",31 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));30 return string.Format("I.9.18 G*m1*m2/((x2-x1)**2+(y2-y1)**2+(z2-z1)**2) | {0}", 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } 33 33 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"m1", "m2", "G", "x1", "x2", "y1", "y2", "z1", "z2", noiseRatio == null ? "F" : "F_noise"}; }38 get { return noiseRatio == null ? new[] { "m1", "m2", "G", "x1", "x2", "y1", "y2", "z1", "z2", "F" } : new[] { "m1", "m2", "G", "x1", "x2", "y1", "y2", "z1", "z2", "F", "F_noise" }; } 39 39 } 40 40 … … 83 83 } 84 84 85 if (noiseRatio != null) { 86 var F_noise = new List<double>(); 87 var sigma_noise = (double) noiseRatio * F.StandardDeviationPop(); 88 F_noise.AddRange(F.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 89 data.Remove(F); 90 data.Add(F_noise); 91 } 85 var targetNoise = ValueGenerator.GenerateNoise(F, rand, noiseRatio); 86 if (targetNoise != null) data.Add(targetNoise); 92 87 93 88 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman50.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("I.48.2 m*c**2/sqrt(1-v**2/c**2) | {0} samples | {1}", trainingSamples,30 return string.Format("I.48.2 m*c**2/sqrt(1-v**2/c**2) | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"m", "v", "c", noiseRatio == null ? "E_n" : "E_n_noise"}; }38 get { return noiseRatio == null ? new[] { "m", "v", "c", "E_n" } : new[] { "m", "v", "c", "E_n", "E_n_noise" }; } 39 39 } 40 40 … … 68 68 } 69 69 70 if (noiseRatio != null) { 71 var E_n_noise = new List<double>(); 72 var sigma_noise = (double) noiseRatio * E_n.StandardDeviationPop(); 73 E_n_noise.AddRange(E_n.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 74 data.Remove(E_n); 75 data.Add(E_n_noise); 76 } 70 var targetNoise = ValueGenerator.GenerateNoise(E_n, rand, noiseRatio); 71 if (targetNoise != null) data.Add(targetNoise); 77 72 78 73 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman51.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("I.50.26 x1*(cos(omega*t)+alpha*cos(omega*t)**2) | {0} samples | {1}",31 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));30 return string.Format("I.50.26 x1*(cos(omega*t)+alpha*cos(omega*t)**2) | {0}", 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } 33 33 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"x1", "omega", "t", "alpha", noiseRatio == null ? "x" : "x_noise"}; }38 get { return noiseRatio == null ? new[] { "x1", "omega", "t", "alpha", "x" } : new[] { "x1", "omega", "t", "alpha", "x", "x_noise" }; } 39 39 } 40 40 … … 70 70 } 71 71 72 if (noiseRatio != null) { 73 var x_noise = new List<double>(); 74 var sigma_noise = (double) noiseRatio * x.StandardDeviationPop(); 75 x_noise.AddRange(x.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 76 data.Remove(x); 77 data.Add(x_noise); 78 } 72 var targetNoise = ValueGenerator.GenerateNoise(x, rand, noiseRatio); 73 if (targetNoise != null) data.Add(targetNoise); 79 74 80 75 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman52.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("II.2.42 kappa*(T2-T1)*A/d | {0} samples | {1}", trainingSamples,30 return string.Format("II.2.42 kappa*(T2-T1)*A/d | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"kappa", "T1", "T2", "A", "d", noiseRatio == null ? "Pwr" : "Pwr_noise"}; }38 get { return noiseRatio == null ? new[] { "kappa", "T1", "T2", "A", "d", "Pwr" } : new[] { "kappa", "T1", "T2", "A", "d", "Pwr", "Pwr_noise" }; } 39 39 } 40 40 … … 72 72 } 73 73 74 if (noiseRatio != null) { 75 var Pwr_noise = new List<double>(); 76 var sigma_noise = (double) noiseRatio * Pwr.StandardDeviationPop(); 77 Pwr_noise.AddRange(Pwr.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 78 data.Remove(Pwr); 79 data.Add(Pwr_noise); 80 } 74 var targetNoise = ValueGenerator.GenerateNoise(Pwr, rand, noiseRatio); 75 if (targetNoise != null) data.Add(targetNoise); 81 76 82 77 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman53.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("II.3.24 Pwr/(4*pi*r**2) | {0} samples | {1}", trainingSamples,30 return string.Format("II.3.24 Pwr/(4*pi*r**2) | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"Pwr", "r", noiseRatio == null ? "flux" : "flux_noise"}; }38 get { return noiseRatio == null ? new[] { "Pwr", "r", "flux" } : new[] { "Pwr", "r", "flux", "flux_noise" }; } 39 39 } 40 40 … … 66 66 } 67 67 68 if (noiseRatio != null) { 69 var flux_noise = new List<double>(); 70 var sigma_noise = (double) noiseRatio * flux.StandardDeviationPop(); 71 flux_noise.AddRange(flux.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 72 data.Remove(flux); 73 data.Add(flux_noise); 74 } 68 var targetNoise = ValueGenerator.GenerateNoise(flux, rand, noiseRatio); 69 if (targetNoise != null) data.Add(targetNoise); 75 70 76 71 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman54.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("II.4.23 q/(4*pi*epsilon*r) | {0} samples | {1}", trainingSamples,30 return string.Format("II.4.23 q/(4*pi*epsilon*r) | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"q", "epsilon", "r", noiseRatio == null ? "Volt" : "Volt_noise"}; }38 get { return noiseRatio == null ? new[] { "q", "epsilon", "r", "Volt" } : new[] { "q", "epsilon", "r", "Volt", "Volt_noise" }; } 39 39 } 40 40 … … 68 68 } 69 69 70 if (noiseRatio != null) { 71 var Volt_noise = new List<double>(); 72 var sigma_noise = (double) noiseRatio * Volt.StandardDeviationPop(); 73 Volt_noise.AddRange(Volt.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 74 data.Remove(Volt); 75 data.Add(Volt_noise); 76 } 70 var targetNoise = ValueGenerator.GenerateNoise(Volt, rand, noiseRatio); 71 if (targetNoise != null) data.Add(targetNoise); 77 72 78 73 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman55.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("II.6.11 1/(4*pi*epsilon)*p_d*cos(theta)/r**2 | {0} samples | {1}",31 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));30 return string.Format("II.6.11 1/(4*pi*epsilon)*p_d*cos(theta)/r**2 | {0}", 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } 33 33 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"epsilon", "p_d", "theta", "r", noiseRatio == null ? "Volt" : "Volt_noise"}; }38 get { return noiseRatio == null ? new[] { "epsilon", "p_d", "theta", "r", "Volt" } : new[] { "epsilon", "p_d", "theta", "r", "Volt", "Volt_noise" }; } 39 39 } 40 40 … … 70 70 } 71 71 72 if (noiseRatio != null) { 73 var Volt_noise = new List<double>(); 74 var sigma_noise = (double) noiseRatio * Volt.StandardDeviationPop(); 75 Volt_noise.AddRange(Volt.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 76 data.Remove(Volt); 77 data.Add(Volt_noise); 78 } 72 var targetNoise = ValueGenerator.GenerateNoise(Volt, rand, noiseRatio); 73 if (targetNoise != null) data.Add(targetNoise); 79 74 80 75 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman56.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("II.6.15a 3/(4*pi*epsilon)*p_d*z/r**5*sqrt(x**2+y**2) | {0} samples | {1}",31 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));30 return string.Format("II.6.15a 3/(4*pi*epsilon)*p_d*z/r**5*sqrt(x**2+y**2) | {0}", 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } 33 33 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"epsilon", "p_d", "r", "x", "y", "z", noiseRatio == null ? "Ef" : "Ef_noise"}; }38 get { return noiseRatio == null ? new[] { "epsilon", "p_d", "r", "x", "y", "z", "Ef" } : new[] { "epsilon", "p_d", "r", "x", "y", "z", "Ef", "Ef_noise" }; } 39 39 } 40 40 … … 75 75 } 76 76 77 if (noiseRatio != null) { 78 var Ef_noise = new List<double>(); 79 var sigma_noise = (double) noiseRatio * Ef.StandardDeviationPop(); 80 Ef_noise.AddRange(Ef.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 81 data.Remove(Ef); 82 data.Add(Ef_noise); 83 } 77 var targetNoise = ValueGenerator.GenerateNoise(Ef, rand, noiseRatio); 78 if (targetNoise != null) data.Add(targetNoise); 84 79 85 80 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman57.cs
r17678 r18086 29 29 get { 30 30 return string.Format( 31 "II.6.15b 3/(4*pi*epsilon)*p_d/r**3*cos(theta)*sin(theta) | {0} samples | {1}",32 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));31 "II.6.15b 3/(4*pi*epsilon)*p_d/r**3*cos(theta)*sin(theta) | {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", "p_d", "theta", "r", noiseRatio == null ? "Ef" : "Ef_noise"}; }39 get { return noiseRatio == null ? new[] { "epsilon", "p_d", "theta", "r", "Ef" } : new[] { "epsilon", "p_d", "theta", "r", "Ef", "Ef_noise" }; } 40 40 } 41 41 … … 71 71 } 72 72 73 if (noiseRatio != null) { 74 var Ef_noise = new List<double>(); 75 var sigma_noise = (double) noiseRatio * Ef.StandardDeviationPop(); 76 Ef_noise.AddRange(Ef.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 77 data.Remove(Ef); 78 data.Add(Ef_noise); 79 } 73 var targetNoise = ValueGenerator.GenerateNoise(Ef, rand, noiseRatio); 74 if (targetNoise != null) data.Add(targetNoise); 80 75 81 76 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman58.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("II.8.7 3/5*q**2/(4*pi*epsilon*d) | {0} samples | {1}", trainingSamples,30 return string.Format("II.8.7 3/5*q**2/(4*pi*epsilon*d) | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"q", "epsilon", "d", noiseRatio == null ? "E_n" : "E_n_noise"}; }38 get { return noiseRatio == null ? new[] { "q", "epsilon", "d", "E_n" } : new[] { "q", "epsilon", "d", "E_n", "E_n_noise" }; } 39 39 } 40 40 … … 68 68 } 69 69 70 if (noiseRatio != null) { 71 var E_n_noise = new List<double>(); 72 var sigma_noise = (double) noiseRatio * E_n.StandardDeviationPop(); 73 E_n_noise.AddRange(E_n.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 74 data.Remove(E_n); 75 data.Add(E_n_noise); 76 } 70 var targetNoise = ValueGenerator.GenerateNoise(E_n, rand, noiseRatio); 71 if (targetNoise != null) data.Add(targetNoise); 77 72 78 73 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman59.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("II.8.31 epsilon*Ef**2/2 | {0} samples | {1}", trainingSamples,30 return string.Format("II.8.31 epsilon*Ef**2/2 | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"epsilon", "Ef", noiseRatio == null ? "E_den" : "E_den_noise"}; }38 get { return noiseRatio == null ? new[] { "epsilon", "Ef", "E_den" } : new[] { "epsilon", "Ef", "E_den", "E_den_noise" }; } 39 39 } 40 40 … … 66 66 } 67 67 68 if (noiseRatio != null) { 69 var E_den_noise = new List<double>(); 70 var sigma_noise = (double) noiseRatio * E_den.StandardDeviationPop(); 71 E_den_noise.AddRange(E_den.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 72 data.Remove(E_den); 73 data.Add(E_den_noise); 74 } 68 var targetNoise = ValueGenerator.GenerateNoise(E_den, rand, noiseRatio); 69 if (targetNoise != null) data.Add(targetNoise); 75 70 76 71 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman6.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("I.10.7 m_0/sqrt(1-v**2/c**2) | {0} samples | {1}", trainingSamples,30 return string.Format("I.10.7 m_0/sqrt(1-v**2/c**2) | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"m_0", "v", "c", noiseRatio == null ? "m" : "m_noise"}; }38 get { return noiseRatio == null ? new[] { "m_0", "v", "c", "m" } : new[] { "m_0", "v", "c", "m", "m_noise" }; } 39 39 } 40 40 … … 68 68 } 69 69 70 if (noiseRatio != null) { 71 var m_noise = new List<double>(); 72 var sigma_noise = (double) noiseRatio * m.StandardDeviationPop(); 73 m_noise.AddRange(m.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 74 data.Remove(m); 75 data.Add(m_noise); 76 } 70 var targetNoise = ValueGenerator.GenerateNoise(m, rand, noiseRatio); 71 if (targetNoise != null) data.Add(targetNoise); 77 72 78 73 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman60.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("II.10.9 sigma_den/epsilon*1/(1+chi) | {0} samples | {1}", trainingSamples,30 return string.Format("II.10.9 sigma_den/epsilon*1/(1+chi) | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"sigma_den", "epsilon", "chi", noiseRatio == null ? "Ef" : "Ef_noise"}; }38 get { return noiseRatio == null ? new[] { "sigma_den", "epsilon", "chi", "Ef" } : new[] { "sigma_den", "epsilon", "chi", "Ef", "Ef_noise" }; } 39 39 } 40 40 … … 68 68 } 69 69 70 if (noiseRatio != null) { 71 var Ef_noise = new List<double>(); 72 var sigma_noise = (double) noiseRatio * Ef.StandardDeviationPop(); 73 Ef_noise.AddRange(Ef.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 74 data.Remove(Ef); 75 data.Add(Ef_noise); 76 } 70 var targetNoise = ValueGenerator.GenerateNoise(Ef, rand, noiseRatio); 71 if (targetNoise != null) data.Add(targetNoise); 77 72 78 73 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman61.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("II.11.3 q*Ef/(m*(omega_0**2-omega**2)) | {0} samples | {1}",31 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));30 return string.Format("II.11.3 q*Ef/(m*(omega_0**2-omega**2)) | {0}", 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } 33 33 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"q", "Ef", "m", "omega_0", "omega", noiseRatio == null ? "x" : "x_noise"}; }38 get { return noiseRatio == null ? new[] { "q", "Ef", "m", "omega_0", "omega", "x" } : new[] { "q", "Ef", "m", "omega_0", "omega", "x", "x_noise" }; } 39 39 } 40 40 … … 72 72 } 73 73 74 if (noiseRatio != null) { 75 var x_noise = new List<double>(); 76 var sigma_noise = (double) noiseRatio * x.StandardDeviationPop(); 77 x_noise.AddRange(x.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 78 data.Remove(x); 79 data.Add(x_noise); 80 } 74 var targetNoise = ValueGenerator.GenerateNoise(x, rand, noiseRatio); 75 if (targetNoise != null) data.Add(targetNoise); 81 76 82 77 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman62.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("II.11.17 n_0*(1 + p_d*Ef*cos(theta)/(kb*T)) | {0} samples | {1}",31 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));30 return string.Format("II.11.17 n_0*(1 + p_d*Ef*cos(theta)/(kb*T)) | {0}", 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } 33 33 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"n_0", "kb", "T", "theta", "p_d", "Ef", noiseRatio == null ? "n" : "n_noise"}; }38 get { return noiseRatio == null ? new[] { "n_0", "kb", "T", "theta", "p_d", "Ef", "n" } : new[] { "n_0", "kb", "T", "theta", "p_d", "Ef", "n", "n_noise" }; } 39 39 } 40 40 … … 74 74 } 75 75 76 if (noiseRatio != null) { 77 var n_noise = new List<double>(); 78 var sigma_noise = (double) noiseRatio * n.StandardDeviationPop(); 79 n_noise.AddRange(n.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 80 data.Remove(n); 81 data.Add(n_noise); 82 } 76 var targetNoise = ValueGenerator.GenerateNoise(n, rand, noiseRatio); 77 if (targetNoise != null) data.Add(targetNoise); 83 78 84 79 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman63.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("II.11.20 n_rho*p_d**2*Ef/(3*kb*T) | {0} samples | {1}", trainingSamples,30 return string.Format("II.11.20 n_rho*p_d**2*Ef/(3*kb*T) | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"n_rho", "p_d", "Ef", "kb", "T", noiseRatio == null ? "Pol" : "Pol_noise"}; }38 get { return noiseRatio == null ? new[] { "n_rho", "p_d", "Ef", "kb", "T", "Pol" } : new[] { "n_rho", "p_d", "Ef", "kb", "T", "Pol", "Pol_noise" }; } 39 39 } 40 40 … … 72 72 } 73 73 74 if (noiseRatio != null) { 75 var Pol_noise = new List<double>(); 76 var sigma_noise = (double) noiseRatio * Pol.StandardDeviationPop(); 77 Pol_noise.AddRange(Pol.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 78 data.Remove(Pol); 79 data.Add(Pol_noise); 80 } 74 var targetNoise = ValueGenerator.GenerateNoise(Pol, rand, noiseRatio); 75 if (targetNoise != null) data.Add(targetNoise); 81 76 82 77 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman64.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("II.11.27 n*alpha/(1-(n*alpha/3))*epsilon*Ef | {0} samples | {1}",31 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));30 return string.Format("II.11.27 n*alpha/(1-(n*alpha/3))*epsilon*Ef | {0}", 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } 33 33 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"n", "alpha", "epsilon", "Ef", noiseRatio == null ? "Pol" : "Pol_noise"}; }38 get { return noiseRatio == null ? new[] { "n", "alpha", "epsilon", "Ef", "Pol" } : new[] { "n", "alpha", "epsilon", "Ef", "Pol", "Pol_noise" }; } 39 39 } 40 40 … … 70 70 } 71 71 72 if (noiseRatio != null) { 73 var Pol_noise = new List<double>(); 74 var sigma_noise = (double) noiseRatio * Pol.StandardDeviationPop(); 75 Pol_noise.AddRange(Pol.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 76 data.Remove(Pol); 77 data.Add(Pol_noise); 78 } 72 var targetNoise = ValueGenerator.GenerateNoise(Pol, rand, noiseRatio); 73 if (targetNoise != null) data.Add(targetNoise); 79 74 80 75 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman65.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("II.11.28 1+n*alpha/(1-(n*alpha/3)) | {0} samples | {1}", trainingSamples,30 return string.Format("II.11.28 1+n*alpha/(1-(n*alpha/3)) | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"n", "alpha", noiseRatio == null ? "theta" : "theta_noise"}; }38 get { return noiseRatio == null ? new[] { "n", "alpha", "theta" } : new[] { "n", "alpha", "theta", "theta_noise" }; } 39 39 } 40 40 … … 66 66 } 67 67 68 if (noiseRatio != null) { 69 var theta_noise = new List<double>(); 70 var sigma_noise = (double) noiseRatio * theta.StandardDeviationPop(); 71 theta_noise.AddRange(theta.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 72 data.Remove(theta); 73 data.Add(theta_noise); 74 } 68 var targetNoise = ValueGenerator.GenerateNoise(theta, rand, noiseRatio); 69 if (targetNoise != null) data.Add(targetNoise); 75 70 76 71 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman66.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("II.13.17 1/(4*pi*epsilon*c**2)*2*I/r | {0} samples | {1}",31 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));30 return string.Format("II.13.17 1/(4*pi*epsilon*c**2)*2*I/r | {0}", 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } 33 33 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"epsilon", "c", "I", "r", noiseRatio == null ? "B" : "B_noise"}; }38 get { return noiseRatio == null ? new[] { "epsilon", "c", "I", "r", "B" } : new[] { "epsilon", "c", "I", "r", "B", "B_noise" }; } 39 39 } 40 40 … … 70 70 } 71 71 72 if (noiseRatio != null) { 73 var B_noise = new List<double>(); 74 var sigma_noise = (double) noiseRatio * B.StandardDeviationPop(); 75 B_noise.AddRange(B.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 76 data.Remove(B); 77 data.Add(B_noise); 78 } 72 var targetNoise = ValueGenerator.GenerateNoise(B, rand, noiseRatio); 73 if (targetNoise != null) data.Add(targetNoise); 79 74 80 75 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman67.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("II.13.23 rho_c_0/sqrt(1-v**2/c**2) | {0} samples | {1}", trainingSamples,30 return string.Format("II.13.23 rho_c_0/sqrt(1-v**2/c**2) | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"rho_c_0", "v", "c", noiseRatio == null ? "rho_c" : "rho_c_noise"}; }38 get { return noiseRatio == null ? new[] { "rho_c_0", "v", "c", "rho_c" } : new[] { "rho_c_0", "v", "c", "rho_c", "rho_c_noise" }; } 39 39 } 40 40 … … 68 68 } 69 69 70 if (noiseRatio != null) { 71 var rho_c_noise = new List<double>(); 72 var sigma_noise = (double) noiseRatio * rho_c.StandardDeviationPop(); 73 rho_c_noise.AddRange(rho_c.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 74 data.Remove(rho_c); 75 data.Add(rho_c_noise); 76 } 70 var targetNoise = ValueGenerator.GenerateNoise(rho_c, rand, noiseRatio); 71 if (targetNoise != null) data.Add(targetNoise); 77 72 78 73 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman68.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("II.13.34 rho_c_0*v/sqrt(1-v**2/c**2) | {0} samples | {1}",31 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));30 return string.Format("II.13.34 rho_c_0*v/sqrt(1-v**2/c**2) | {0}", 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } 33 33 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"rho_c_0", "v", "c", noiseRatio == null ? "j" : "j_noise"}; }38 get { return noiseRatio == null ? new[] { "rho_c_0", "v", "c", "j" } : new[] { "rho_c_0", "v", "c", "j", "j_noise" }; } 39 39 } 40 40 … … 68 68 } 69 69 70 if (noiseRatio != null) { 71 var j_noise = new List<double>(); 72 var sigma_noise = (double) noiseRatio * j.StandardDeviationPop(); 73 j_noise.AddRange(j.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 74 data.Remove(j); 75 data.Add(j_noise); 76 } 70 var targetNoise = ValueGenerator.GenerateNoise(j, rand, noiseRatio); 71 if (targetNoise != null) data.Add(targetNoise); 77 72 78 73 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman69.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("II.15.4 -mom*B*cos(theta) | {0} samples | {1}", trainingSamples,30 return string.Format("II.15.4 -mom*B*cos(theta) | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"mom", "B", "theta", noiseRatio == null ? "E_n" : "E_n_noise"}; }38 get { return noiseRatio == null ? new[] { "mom", "B", "theta", "E_n" } : new[] { "mom", "B", "theta", "E_n", "E_n_noise" }; } 39 39 } 40 40 … … 68 68 } 69 69 70 if (noiseRatio != null) { 71 var E_n_noise = new List<double>(); 72 var sigma_noise = (double) noiseRatio * E_n.StandardDeviationPop(); 73 E_n_noise.AddRange(E_n.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 74 data.Remove(E_n); 75 data.Add(E_n_noise); 76 } 70 var targetNoise = ValueGenerator.GenerateNoise(E_n, rand, noiseRatio); 71 if (targetNoise != null) data.Add(targetNoise); 77 72 78 73 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman7.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("I.11.19 x1*y1+x2*y2+x3*y3 | {0} samples | {1}", trainingSamples,30 return string.Format("I.11.19 x1*y1+x2*y2+x3*y3 | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"x1", "x2", "x3", "y1", "y2", "y3", noiseRatio == null ? "A" : "A_noise"}; }38 get { return noiseRatio == null ? new[] { "x1", "x2", "x3", "y1", "y2", "y3", "A" } : new[] { "x1", "x2", "x3", "y1", "y2", "y3", "A", "A_noise" }; } 39 39 } 40 40 … … 74 74 } 75 75 76 if (noiseRatio != null) { 77 var A_noise = new List<double>(); 78 var sigma_noise = (double) noiseRatio * A.StandardDeviationPop(); 79 A_noise.AddRange(A.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 80 data.Remove(A); 81 data.Add(A_noise); 82 } 76 var targetNoise = ValueGenerator.GenerateNoise(A, rand, noiseRatio); 77 if (targetNoise != null) data.Add(targetNoise); 83 78 84 79 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman70.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("II.15.5 -p_d*Ef*cos(theta) | {0} samples | {1}", trainingSamples,30 return string.Format("II.15.5 -p_d*Ef*cos(theta) | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"p_d", "Ef", "theta", noiseRatio == null ? "E_n" : "E_n_noise"}; }38 get { return noiseRatio == null ? new[] { "p_d", "Ef", "theta", "E_n" } : new[] { "p_d", "Ef", "theta", "E_n", "E_n_noise" }; } 39 39 } 40 40 … … 68 68 } 69 69 70 if (noiseRatio != null) { 71 var E_n_noise = new List<double>(); 72 var sigma_noise = (double) noiseRatio * E_n.StandardDeviationPop(); 73 E_n_noise.AddRange(E_n.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 74 data.Remove(E_n); 75 data.Add(E_n_noise); 76 } 70 var targetNoise = ValueGenerator.GenerateNoise(E_n, rand, noiseRatio); 71 if (targetNoise != null) data.Add(targetNoise); 77 72 78 73 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman71.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("II.21.32 q/(4*pi*epsilon*r*(1-v/c)) | {0} samples | {1}", trainingSamples,30 return string.Format("II.21.32 q/(4*pi*epsilon*r*(1-v/c)) | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"q", "epsilon", "r", "v", "c", noiseRatio == null ? "Volt" : "Volt_noise"}; }38 get { return noiseRatio == null ? new[] { "q", "epsilon", "r", "v", "c", "Volt" } : new[] { "q", "epsilon", "r", "v", "c", "Volt", "Volt_noise" }; } 39 39 } 40 40 … … 72 72 } 73 73 74 if (noiseRatio != null) { 75 var Volt_noise = new List<double>(); 76 var sigma_noise = (double) noiseRatio * Volt.StandardDeviationPop(); 77 Volt_noise.AddRange(Volt.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 78 data.Remove(Volt); 79 data.Add(Volt_noise); 80 } 74 var targetNoise = ValueGenerator.GenerateNoise(Volt, rand, noiseRatio); 75 if (targetNoise != null) data.Add(targetNoise); 81 76 82 77 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman72.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("II.24.17 sqrt(omega**2/c**2-pi**2/d**2) | {0} samples | {1}",31 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));30 return string.Format("II.24.17 sqrt(omega**2/c**2-pi**2/d**2) | {0}", 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } 33 33 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"omega", "c", "d", noiseRatio == null ? "k" : "k_noise"}; }38 get { return noiseRatio == null ? new[] { "omega", "c", "d", "k" } : new[] { "omega", "c", "d", "k", "k_noise" }; } 39 39 } 40 40 … … 68 68 } 69 69 70 if (noiseRatio != null) { 71 var k_noise = new List<double>(); 72 var sigma_noise = (double) noiseRatio * k.StandardDeviationPop(); 73 k_noise.AddRange(k.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 74 data.Remove(k); 75 data.Add(k_noise); 76 } 70 var targetNoise = ValueGenerator.GenerateNoise(k, rand, noiseRatio); 71 if (targetNoise != null) data.Add(targetNoise); 77 72 78 73 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman73.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("II.27.16 epsilon*c*Ef**2 | {0} samples | {1}", trainingSamples,30 return string.Format("II.27.16 epsilon*c*Ef**2 | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"epsilon", "c", "Ef", noiseRatio == null ? "flux" : "flux_noise"}; }38 get { return noiseRatio == null ? new[] { "epsilon", "c", "Ef", "flux" } : new[] { "epsilon", "c", "Ef", "flux", "flux_noise" }; } 39 39 } 40 40 … … 68 68 } 69 69 70 if (noiseRatio != null) { 71 var flux_noise = new List<double>(); 72 var sigma_noise = (double) noiseRatio * flux.StandardDeviationPop(); 73 flux_noise.AddRange(flux.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 74 data.Remove(flux); 75 data.Add(flux_noise); 76 } 70 var targetNoise = ValueGenerator.GenerateNoise(flux, rand, noiseRatio); 71 if (targetNoise != null) data.Add(targetNoise); 77 72 78 73 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman74.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("II.27.18 epsilon*Ef**2 | {0} samples | {1}", trainingSamples,30 return string.Format("II.27.18 epsilon*Ef**2 | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"epsilon", "Ef", noiseRatio == null ? "E_den" : "E_den_noise"}; }38 get { return noiseRatio == null ? new[] { "epsilon", "Ef", "E_den" } : new[] { "epsilon", "Ef", "E_den", "E_den_noise" }; } 39 39 } 40 40 … … 66 66 } 67 67 68 if (noiseRatio != null) { 69 var E_den_noise = new List<double>(); 70 var sigma_noise = (double) noiseRatio * E_den.StandardDeviationPop(); 71 E_den_noise.AddRange(E_den.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 72 data.Remove(E_den); 73 data.Add(E_den_noise); 74 } 68 var targetNoise = ValueGenerator.GenerateNoise(E_den, rand, noiseRatio); 69 if (targetNoise != null) data.Add(targetNoise); 75 70 76 71 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman75.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("II.34.2a q*v/(2*pi*r) | {0} samples | {1}", trainingSamples,30 return string.Format("II.34.2a q*v/(2*pi*r) | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"q", "v", "r", noiseRatio == null ? "I" : "I_noise"}; }38 get { return noiseRatio == null ? new[] { "q", "v", "r", "I" } : new[] { "q", "v", "r", "I", "I_noise" }; } 39 39 } 40 40 … … 68 68 } 69 69 70 if (noiseRatio != null) { 71 var I_noise = new List<double>(); 72 var sigma_noise = (double) noiseRatio * I.StandardDeviationPop(); 73 I_noise.AddRange(I.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 74 data.Remove(I); 75 data.Add(I_noise); 76 } 70 var targetNoise = ValueGenerator.GenerateNoise(I, rand, noiseRatio); 71 if (targetNoise != null) data.Add(targetNoise); 77 72 78 73 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman76.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("II.34.2 q*v*r/2 | {0} samples | {1}", trainingSamples,30 return string.Format("II.34.2 q*v*r/2 | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"q", "v", "r", noiseRatio == null ? "mom" : "mom_noise"}; }38 get { return noiseRatio == null ? new[] { "q", "v", "r", "mom" } : new[] { "q", "v", "r", "mom", "mom_noise" }; } 39 39 } 40 40 … … 68 68 } 69 69 70 if (noiseRatio != null) { 71 var mom_noise = new List<double>(); 72 var sigma_noise = (double) noiseRatio * mom.StandardDeviationPop(); 73 mom_noise.AddRange(mom.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 74 data.Remove(mom); 75 data.Add(mom_noise); 76 } 70 var targetNoise = ValueGenerator.GenerateNoise(mom, rand, noiseRatio); 71 if (targetNoise != null) data.Add(targetNoise); 77 72 78 73 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman77.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("II.34.11 g_*q*B/(2*m) | {0} samples | {1}", trainingSamples,30 return string.Format("II.34.11 g_*q*B/(2*m) | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"g_", "q", "B", "m", noiseRatio == null ? "omega" : "omega_noise"}; }38 get { return noiseRatio == null ? new[] { "g_", "q", "B", "m", "omega" } : new[] { "g_", "q", "B", "m", "omega", "omega_noise" }; } 39 39 } 40 40 … … 70 70 } 71 71 72 if (noiseRatio != null) { 73 var omega_noise = new List<double>(); 74 var sigma_noise = (double) noiseRatio * omega.StandardDeviationPop(); 75 omega_noise.AddRange(omega.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 76 data.Remove(omega); 77 data.Add(omega_noise); 78 } 72 var targetNoise = ValueGenerator.GenerateNoise(omega, rand, noiseRatio); 73 if (targetNoise != null) data.Add(targetNoise); 79 74 80 75 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman78.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("II.34.29a q*h/(4*pi*m) | {0} samples | {1}", trainingSamples,30 return string.Format("II.34.29a q*h/(4*pi*m) | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"q", "h", "m", noiseRatio == null ? "mom" : "mom_noise"}; }38 get { return noiseRatio == null ? new[] { "q", "h", "m", "mom" } : new[] { "q", "h", "m", "mom", "mom_noise" }; } 39 39 } 40 40 … … 68 68 } 69 69 70 if (noiseRatio != null) { 71 var mom_noise = new List<double>(); 72 var sigma_noise = (double) noiseRatio * mom.StandardDeviationPop(); 73 mom_noise.AddRange(mom.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 74 data.Remove(mom); 75 data.Add(mom_noise); 76 } 70 var targetNoise = ValueGenerator.GenerateNoise(mom, rand, noiseRatio); 71 if (targetNoise != null) data.Add(targetNoise); 77 72 78 73 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman79.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("II.34.29b g_*mom*B*Jz/h | {0} samples | {1}", trainingSamples,30 return string.Format("II.34.29b g_*mom*B*Jz/h | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"g_", "h", "Jz", "mom", "B", noiseRatio == null ? "E_n" : "E_n_noise"}; }38 get { return noiseRatio == null ? new[] { "g_", "h", "Jz", "mom", "B", "E_n" } : new[] { "g_", "h", "Jz", "mom", "B", "E_n", "E_n_noise" }; } 39 39 } 40 40 … … 72 72 } 73 73 74 if (noiseRatio != null) { 75 var E_n_noise = new List<double>(); 76 var sigma_noise = (double) noiseRatio * E_n.StandardDeviationPop(); 77 E_n_noise.AddRange(E_n.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 78 data.Remove(E_n); 79 data.Add(E_n_noise); 80 } 74 var targetNoise = ValueGenerator.GenerateNoise(E_n, rand, noiseRatio); 75 if (targetNoise != null) data.Add(targetNoise); 81 76 82 77 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman8.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("I.12.1 mu*Nn | {0} samples | {1}", trainingSamples,30 return string.Format("I.12.1 mu*Nn | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"mu", "Nn", noiseRatio == null ? "F" : "F_noise"}; }38 get { return noiseRatio == null ? new[] { "mu", "Nn", "F" } : new[] { "mu", "Nn", "F", "F_noise" }; } 39 39 } 40 40 … … 66 66 } 67 67 68 if (noiseRatio != null) { 69 var F_noise = new List<double>(); 70 var sigma_noise = (double) noiseRatio * F.StandardDeviationPop(); 71 F_noise.AddRange(F.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 72 data.Remove(F); 73 data.Add(F_noise); 74 } 68 var targetNoise = ValueGenerator.GenerateNoise(F, rand, noiseRatio); 69 if (targetNoise != null) data.Add(targetNoise); 75 70 76 71 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman80.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("II.35.18 n_0/(exp(mom*B/(kb*T))+exp(-mom*B/(kb*T))) | {0} samples | {1}",31 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));30 return string.Format("II.35.18 n_0/(exp(mom*B/(kb*T))+exp(-mom*B/(kb*T))) | {0}", 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } 33 33 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"n_0", "kb", "T", "mom", "B", noiseRatio == null ? "n" : "n_noise"}; }38 get { return noiseRatio == null ? new[] { "n_0", "kb", "T", "mom", "B", "n" } : new[] { "n_0", "kb", "T", "mom", "B", "n", "n_noise" }; } 39 39 } 40 40 … … 72 72 } 73 73 74 if (noiseRatio != null) { 75 var n_noise = new List<double>(); 76 var sigma_noise = (double) noiseRatio * n.StandardDeviationPop(); 77 n_noise.AddRange(n.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 78 data.Remove(n); 79 data.Add(n_noise); 80 } 74 var targetNoise = ValueGenerator.GenerateNoise(n, rand, noiseRatio); 75 if (targetNoise != null) data.Add(targetNoise); 81 76 82 77 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman81.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("II.35.21 n_rho*mom*tanh(mom*B/(kb*T)) | {0} samples | {1}",31 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));30 return string.Format("II.35.21 n_rho*mom*tanh(mom*B/(kb*T)) | {0}", 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } 33 33 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"n_rho", "mom", "B", "kb", "T", noiseRatio == null ? "M" : "M_noise"}; }38 get { return noiseRatio == null ? new[] { "n_rho", "mom", "B", "kb", "T", "M" } : new[] { "n_rho", "mom", "B", "kb", "T", "M", "M_noise" }; } 39 39 } 40 40 … … 72 72 } 73 73 74 if (noiseRatio != null) { 75 var M_noise = new List<double>(); 76 var sigma_noise = (double) noiseRatio * M.StandardDeviationPop(); 77 M_noise.AddRange(M.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 78 data.Remove(M); 79 data.Add(M_noise); 80 } 74 var targetNoise = ValueGenerator.GenerateNoise(M, rand, noiseRatio); 75 if (targetNoise != null) data.Add(targetNoise); 81 76 82 77 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman82.cs
r17678 r18086 29 29 get { 30 30 return string.Format( 31 "II.36.38 mom*B/(kb*T)+(mom*alpha*M)/(epsilon*c**2*kb*T) | {0} samples | {1}",32 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));31 "II.36.38 mom*B/(kb*T)+(mom*alpha*M)/(epsilon*c**2*kb*T) | {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[] {"mom", "B", "kb", "T", "alpha", "epsilon", "c", "M", noiseRatio == null ? "f" : "f_noise"}; }39 get { return noiseRatio == null ? new[] { "mom", "B", "kb", "T", "alpha", "epsilon", "c", "M", "f" } : new[] { "mom", "B", "kb", "T", "alpha", "epsilon", "c", "M", "f", "f_noise" }; } 40 40 } 41 41 … … 82 82 } 83 83 84 if (noiseRatio != null) { 85 var f_noise = new List<double>(); 86 var sigma_noise = (double) noiseRatio * f.StandardDeviationPop(); 87 f_noise.AddRange(f.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 88 data.Remove(f); 89 data.Add(f_noise); 90 } 84 var targetNoise = ValueGenerator.GenerateNoise(f, rand, noiseRatio); 85 if (targetNoise != null) data.Add(targetNoise); 91 86 92 87 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman83.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("II.37.1 mom*(1+chi)*B | {0} samples | {1}", trainingSamples,30 return string.Format("II.37.1 mom*(1+chi)*B | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"mom", "B", "chi", noiseRatio == null ? "E_n" : "E_n_noise"}; }38 get { return noiseRatio == null ? new[] { "mom", "B", "chi", "E_n" } : new[] { "mom", "B", "chi", "E_n", "E_n_noise" }; } 39 39 } 40 40 … … 68 68 } 69 69 70 if (noiseRatio != null) { 71 var E_n_noise = new List<double>(); 72 var sigma_noise = (double) noiseRatio * E_n.StandardDeviationPop(); 73 E_n_noise.AddRange(E_n.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 74 data.Remove(E_n); 75 data.Add(E_n_noise); 76 } 70 var targetNoise = ValueGenerator.GenerateNoise(E_n, rand, noiseRatio); 71 if (targetNoise != null) data.Add(targetNoise); 77 72 78 73 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman84.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("II.38.3 Y*A*x/d | {0} samples | {1}", trainingSamples,30 return string.Format("II.38.3 Y*A*x/d | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"Y", "A", "d", "x", noiseRatio == null ? "F" : "F_noise"}; }38 get { return noiseRatio == null ? new[] { "Y", "A", "d", "x", "F" } : new[] { "Y", "A", "d", "x", "F", "F_noise" }; } 39 39 } 40 40 … … 70 70 } 71 71 72 if (noiseRatio != null) { 73 var F_noise = new List<double>(); 74 var sigma_noise = (double) noiseRatio * F.StandardDeviationPop(); 75 F_noise.AddRange(F.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 76 data.Remove(F); 77 data.Add(F_noise); 78 } 72 var targetNoise = ValueGenerator.GenerateNoise(F, rand, noiseRatio); 73 if (targetNoise != null) data.Add(targetNoise); 79 74 80 75 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman85.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("II.38.14 Y/(2*(1+sigma)) | {0} samples | {1}", trainingSamples,30 return string.Format("II.38.14 Y/(2*(1+sigma)) | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"Y", "sigma", noiseRatio == null ? "mu_S" : "mu_S_noise"}; }38 get { return noiseRatio == null ? new[] { "Y", "sigma", "mu_S" } : new[] { "Y", "sigma", "mu_S", "mu_S_noise" }; } 39 39 } 40 40 … … 66 66 } 67 67 68 if (noiseRatio != null) { 69 var mu_S_noise = new List<double>(); 70 var sigma_noise = (double) noiseRatio * mu_S.StandardDeviationPop(); 71 mu_S_noise.AddRange(mu_S.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 72 data.Remove(mu_S); 73 data.Add(mu_S_noise); 74 } 68 var targetNoise = ValueGenerator.GenerateNoise(mu_S, rand, noiseRatio); 69 if (targetNoise != null) data.Add(targetNoise); 75 70 76 71 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman86.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("III.4.32 1/(exp(h*omega/(kb*T))-1) | {0} samples | {1}",31 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));30 return string.Format("III.4.32 1/(exp(h*omega/(kb*T))-1) | {0}", 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } 33 33 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"h", "omega", "kb", "T", noiseRatio == null ? "n" : "n_noise"}; }38 get { return noiseRatio == null ? new[] { "h", "omega", "kb", "T", "n" } : new[] { "h", "omega", "kb", "T", "n", "n_noise" }; } 39 39 } 40 40 … … 70 70 } 71 71 72 if (noiseRatio != null) { 73 var n_noise = new List<double>(); 74 var sigma_noise = (double) noiseRatio * n.StandardDeviationPop(); 75 n_noise.AddRange(n.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 76 data.Remove(n); 77 data.Add(n_noise); 78 } 72 var targetNoise = ValueGenerator.GenerateNoise(n, rand, noiseRatio); 73 if (targetNoise != null) data.Add(targetNoise); 79 74 80 75 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman87.cs
r17678 r18086 29 29 get { 30 30 return string.Format( 31 "III.4.33 h*omega/(exp(h*omega/(kb*T))-1) | {0} samples | {1}",32 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));31 "III.4.33 h*omega/(exp(h*omega/(kb*T))-1) | {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[] {"h", "omega", "kb", "T", noiseRatio == null ? "E_n" : "E_n_noise"}; }39 get { return noiseRatio == null ? new[] { "h", "omega", "kb", "T", "E_n" } : new[] { "h", "omega", "kb", "T", "E_n", "E_n_noise" }; } 40 40 } 41 41 … … 71 71 } 72 72 73 if (noiseRatio != null) { 74 var E_n_noise = new List<double>(); 75 var sigma_noise = (double) noiseRatio * E_n.StandardDeviationPop(); 76 E_n_noise.AddRange(E_n.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 77 data.Remove(E_n); 78 data.Add(E_n_noise); 79 } 73 var targetNoise = ValueGenerator.GenerateNoise(E_n, rand, noiseRatio); 74 if (targetNoise != null) data.Add(targetNoise); 80 75 81 76 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman88.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("III.7.38 2*mom*B/h | {0} samples | {1}", trainingSamples,30 return string.Format("III.7.38 2*mom*B/h | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"mom", "B", "h", noiseRatio == null ? "omega" : "omega_noise"}; }38 get { return noiseRatio == null ? new[] { "mom", "B", "h", "omega" } : new[] { "mom", "B", "h", "omega", "omega_noise" }; } 39 39 } 40 40 … … 68 68 } 69 69 70 if (noiseRatio != null) { 71 var omega_noise = new List<double>(); 72 var sigma_noise = (double) noiseRatio * omega.StandardDeviationPop(); 73 omega_noise.AddRange(omega.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 74 data.Remove(omega); 75 data.Add(omega_noise); 76 } 70 var targetNoise = ValueGenerator.GenerateNoise(omega, rand, noiseRatio); 71 if (targetNoise != null) data.Add(targetNoise); 77 72 78 73 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman89.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("III.8.54 sin(E_n*t/h)**2 | {0} samples | {1}", trainingSamples,30 return string.Format("III.8.54 sin(E_n*t/h)**2 | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"E_n", "t", "h", noiseRatio == null ? "prob" : "prob_noise"}; }38 get { return noiseRatio == null ? new[] { "E_n", "t", "h", "prob" } : new[] { "E_n", "t", "h", "prob", "prob_noise" }; } 39 39 } 40 40 … … 68 68 } 69 69 70 if (noiseRatio != null) { 71 var prob_noise = new List<double>(); 72 var sigma_noise = (double) noiseRatio * prob.StandardDeviationPop(); 73 prob_noise.AddRange(prob.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 74 data.Remove(prob); 75 data.Add(prob_noise); 76 } 70 var targetNoise = ValueGenerator.GenerateNoise(prob, rand, noiseRatio); 71 if (targetNoise != null) data.Add(targetNoise); 77 72 78 73 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman9.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("I.12.2 q1*q2/(4*pi*epsilon*r**2) | {0} samples | {1}", trainingSamples,30 return string.Format("I.12.2 q1*q2/(4*pi*epsilon*r**2) | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"q1", "q2", "epsilon", "r", noiseRatio == null ? "F" : "F_noise"}; }38 get { return noiseRatio == null ? new[] { "q1", "q2", "epsilon", "r", "F" } : new[] { "q1", "q2", "epsilon", "r", "F", "F_noise" }; } 39 39 } 40 40 … … 70 70 } 71 71 72 if (noiseRatio != null) { 73 var F_noise = new List<double>(); 74 var sigma_noise = (double) noiseRatio * F.StandardDeviationPop(); 75 F_noise.AddRange(F.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 76 data.Remove(F); 77 data.Add(F_noise); 78 } 72 var targetNoise = ValueGenerator.GenerateNoise(F, rand, noiseRatio); 73 if (targetNoise != null) data.Add(targetNoise); 79 74 80 75 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman90.cs
r17678 r18086 29 29 get { 30 30 return string.Format( 31 "III.9.52 (p_d*Ef*t/h*sin((omega-omega_0)*t/2)**2/((omega-omega_0)*t/2)**2 | {0} samples | {1}",32 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));31 "III.9.52 (p_d*Ef*t/h*sin((omega-omega_0)*t/2)**2/((omega-omega_0)*t/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[] {"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) noiseRatio * prob.StandardDeviationPop(); 84 prob_noise.AddRange(prob.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 85 data.Remove(prob); 86 data.Add(prob_noise); 87 } 81 var targetNoise = ValueGenerator.GenerateNoise(prob, rand, noiseRatio); 82 if (targetNoise != null) data.Add(targetNoise); 88 83 89 84 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman91.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("III.10.19 mom*sqrt(Bx**2+By**2+Bz**2) | {0} samples | {1}",31 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));30 return string.Format("III.10.19 mom*sqrt(Bx**2+By**2+Bz**2) | {0}", 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } 33 33 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"mom", "Bx", "By", "Bz", noiseRatio == null ? "E_n" : "E_n_noise"}; }38 get { return noiseRatio == null ? new[] { "mom", "Bx", "By", "Bz", "E_n" } : new[] { "mom", "Bx", "By", "Bz", "E_n", "E_n_noise" }; } 39 39 } 40 40 … … 70 70 } 71 71 72 if (noiseRatio != null) { 73 var E_n_noise = new List<double>(); 74 var sigma_noise = (double) noiseRatio * E_n.StandardDeviationPop(); 75 E_n_noise.AddRange(E_n.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 76 data.Remove(E_n); 77 data.Add(E_n_noise); 78 } 72 var targetNoise = ValueGenerator.GenerateNoise(E_n, rand, noiseRatio); 73 if (targetNoise != null) data.Add(targetNoise); 79 74 80 75 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman92.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("III.12.43 n*h | {0} samples | {1}", trainingSamples,30 return string.Format("III.12.43 n*h | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 34 34 35 35 protected override string TargetVariable { get { return noiseRatio == null ? "L" : "L_noise"; } } 36 protected override string[] VariableNames { get { return new[] {"n", "h", noiseRatio == null ? "L" : "L_noise"}; } } 36 37 protected override string[] VariableNames { 38 get { return noiseRatio == null ? new[] { "n", "h", "L" } : new[] { "n", "h", "L", "L_noise" }; } 39 } 37 40 protected override string[] AllowedInputVariables { get { return new[] {"n", "h"}; } } 38 41 … … 62 65 } 63 66 64 if (noiseRatio != null) { 65 var L_noise = new List<double>(); 66 var sigma_noise = (double) noiseRatio * L.StandardDeviationPop(); 67 L_noise.AddRange(L.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 68 data.Remove(L); 69 data.Add(L_noise); 70 } 67 var targetNoise = ValueGenerator.GenerateNoise(L, rand, noiseRatio); 68 if (targetNoise != null) data.Add(targetNoise); 71 69 72 70 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman93.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("III.13.18 2*E_n*d**2*k/h | {0} samples | {1}", trainingSamples,30 return string.Format("III.13.18 2*E_n*d**2*k/h | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"E_n", "d", "k", "h", noiseRatio == null ? "v" : "v_noise"}; }38 get { return noiseRatio == null ? new[] { "E_n", "d", "k", "h", "v" } : new[] { "E_n", "d", "k", "h", "v", "v_noise" }; } 39 39 } 40 40 … … 70 70 } 71 71 72 if (noiseRatio != null) { 73 var v_noise = new List<double>(); 74 var sigma_noise = (double) noiseRatio * v.StandardDeviationPop(); 75 v_noise.AddRange(v.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 76 data.Remove(v); 77 data.Add(v_noise); 78 } 72 var targetNoise = ValueGenerator.GenerateNoise(v, rand, noiseRatio); 73 if (targetNoise != null) data.Add(targetNoise); 79 74 80 75 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman94.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("III.14.14 I_0*(exp(q*Volt/(kb*T))-1) | {0} samples | {1}",31 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));30 return string.Format("III.14.14 I_0*(exp(q*Volt/(kb*T))-1) | {0}", 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } 33 33 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"I_0", "q", "Volt", "kb", "T", noiseRatio == null ? "I" : "I_noise"}; }38 get { return noiseRatio == null ? new[] { "I_0", "q", "Volt", "kb", "T", "I" } : new[] { "I_0", "q", "Volt", "kb", "T", "I", "I_noise" }; } 39 39 } 40 40 … … 72 72 } 73 73 74 if (noiseRatio != null) { 75 var I_noise = new List<double>(); 76 var sigma_noise = (double) noiseRatio * I.StandardDeviationPop(); 77 I_noise.AddRange(I.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 78 data.Remove(I); 79 data.Add(I_noise); 80 } 74 var targetNoise = ValueGenerator.GenerateNoise(I, rand, noiseRatio); 75 if (targetNoise != null) data.Add(targetNoise); 81 76 82 77 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman95.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("III.15.12 2*U*(1-cos(k*d)) | {0} samples | {1}", trainingSamples,30 return string.Format("III.15.12 2*U*(1-cos(k*d)) | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"U", "k", "d", noiseRatio == null ? "E_n" : "E_n_noise"}; }38 get { return noiseRatio == null ? new[] { "U", "k", "d", "E_n" } : new[] { "U", "k", "d", "E_n", "E_n_noise" }; } 39 39 } 40 40 … … 68 68 } 69 69 70 if (noiseRatio != null) { 71 var E_n_noise = new List<double>(); 72 var sigma_noise = (double) noiseRatio * E_n.StandardDeviationPop(); 73 E_n_noise.AddRange(E_n.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 74 data.Remove(E_n); 75 data.Add(E_n_noise); 76 } 70 var targetNoise = ValueGenerator.GenerateNoise(E_n, rand, noiseRatio); 71 if (targetNoise != null) data.Add(targetNoise); 77 72 78 73 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman96.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("III.15.14 h**2/(2*E_n*d**2) | {0} samples | {1}",31 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));30 return string.Format("III.15.14 h**2/(2*E_n*d**2) | {0}", 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } 33 33 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"h", "E_n", "d", noiseRatio == null ? "m" : "m_noise"}; }38 get { return noiseRatio == null ? new[] { "h", "E_n", "d", "m" } : new[] { "h", "E_n", "d", "m", "m_noise" }; } 39 39 } 40 40 … … 68 68 } 69 69 70 if (noiseRatio != null) { 71 var m_noise = new List<double>(); 72 var sigma_noise = (double) noiseRatio * m.StandardDeviationPop(); 73 m_noise.AddRange(m.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 74 data.Remove(m); 75 data.Add(m_noise); 76 } 70 var targetNoise = ValueGenerator.GenerateNoise(m, rand, noiseRatio); 71 if (targetNoise != null) data.Add(targetNoise); 77 72 78 73 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman97.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("III.15.27 2*pi*alpha/(n*d) | {0} samples | {1}", trainingSamples,30 return string.Format("III.15.27 2*pi*alpha/(n*d) | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"alpha", "n", "d", noiseRatio == null ? "k" : "k_noise"}; }38 get { return noiseRatio == null ? new[] { "alpha", "n", "d", "k" } : new[] { "alpha", "n", "d", "k", "k_noise" }; } 39 39 } 40 40 … … 68 68 } 69 69 70 if (noiseRatio != null) { 71 var k_noise = new List<double>(); 72 var sigma_noise = (double) noiseRatio * k.StandardDeviationPop(); 73 k_noise.AddRange(k.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 74 data.Remove(k); 75 data.Add(k_noise); 76 } 70 var targetNoise = ValueGenerator.GenerateNoise(k, rand, noiseRatio); 71 if (targetNoise != null) data.Add(targetNoise); 77 72 78 73 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman98.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("III.17.37 beta*(1+alpha*cos(theta)) | {0} samples | {1}", trainingSamples,30 return string.Format("III.17.37 beta*(1+alpha*cos(theta)) | {0}", 31 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"beta", "alpha", "theta", noiseRatio == null ? "f" : "f_noise"}; }38 get { return noiseRatio == null ? new[] { "beta", "alpha", "theta", "f" } : new[] { "beta", "alpha", "theta", "f", "f_noise" }; } 39 39 } 40 40 … … 68 68 } 69 69 70 if (noiseRatio != null) { 71 var f_noise = new List<double>(); 72 var sigma_noise = (double) noiseRatio * f.StandardDeviationPop(); 73 f_noise.AddRange(f.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 74 data.Remove(f); 75 data.Add(f_noise); 76 } 70 var targetNoise = ValueGenerator.GenerateNoise(f, rand, noiseRatio); 71 if (targetNoise != null) data.Add(targetNoise); 77 72 78 73 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/Feynman99.cs
r17678 r18086 29 29 get { 30 30 return string.Format( 31 "III.19.51 -m*q**4/(2*(4*pi*epsilon)**2*h**2)*(1/n**2) | {0} samples | {1}",32 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));31 "III.19.51 -m*q**4/(2*(4*pi*epsilon)**2*h**2)*(1/n**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[] {"m", "q", "h", "n", "epsilon", noiseRatio == null ? "E_n" : "E_n_noise"}; }39 get { return noiseRatio == null ? new[] { "m", "q", "h", "n", "epsilon", "E_n" } : new[] { "m", "q", "h", "n", "epsilon", "E_n", "E_n_noise" }; } 40 40 } 41 41 … … 74 74 } 75 75 76 if (noiseRatio != null) { 77 var E_n_noise = new List<double>(); 78 var sigma_noise = (double) noiseRatio * E_n.StandardDeviationPop(); 79 E_n_noise.AddRange(E_n.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 80 data.Remove(E_n); 81 data.Add(E_n_noise); 82 } 76 var targetNoise = ValueGenerator.GenerateNoise(E_n, rand, noiseRatio); 77 if (targetNoise != null) data.Add(targetNoise); 83 78 84 79 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/FeynmanBonus1.cs
r17678 r18086 29 29 get { 30 30 return string.Format( 31 "Rutherford scattering: (Z_1*Z_2*alpha*hbar*c/(4*E_n*sin(theta/2)**2))**2 | {0} samples | {1}",32 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));31 "Rutherford scattering: (Z_1*Z_2*alpha*hbar*c/(4*E_n*sin(theta/2)**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[] {"Z_1", "Z_2", "alpha", "hbar", "c", "E_n", "theta", noiseRatio == null ? "A" : "A_noise"}; }39 get { return noiseRatio == null ? new[] { "Z_1", "Z_2", "alpha", "hbar", "c", "E_n", "theta", "A" } : new[] { "Z_1", "Z_2", "alpha", "hbar", "c", "E_n", "theta", "A", "A_noise" }; } 40 40 } 41 41 … … 80 80 } 81 81 82 if (noiseRatio != null) { 83 var A_noise = new List<double>(); 84 var sigma_noise = (double) noiseRatio * A.StandardDeviationPop(); 85 A_noise.AddRange(A.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 86 data.Remove(A); 87 data.Add(A_noise); 88 } 82 var targetNoise = ValueGenerator.GenerateNoise(A, rand, noiseRatio); 83 if (targetNoise != null) data.Add(targetNoise); 89 84 90 85 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/FeynmanBonus10.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("Goldstein 3.74: 2*pi*d**(3/2)/sqrt(G*(m1+m2)) | {0} samples | {1}",31 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));30 return string.Format("Goldstein 3.74: 2*pi*d**(3/2)/sqrt(G*(m1+m2)) | {0}", 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } 33 33 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"d", "G", "m1", "m2", noiseRatio == null ? "t" : "t_noise"}; }38 get { return noiseRatio == null ? new[] { "d", "G", "m1", "m2", "t" } : new[] { "d", "G", "m1", "m2", "t", "t_noise" }; } 39 39 } 40 40 … … 70 70 } 71 71 72 if (noiseRatio != null) { 73 var t_noise = new List<double>(); 74 var sigma_noise = (double) noiseRatio * t.StandardDeviationPop(); 75 t_noise.AddRange(t.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 76 data.Remove(t); 77 data.Add(t_noise); 78 } 72 var targetNoise = ValueGenerator.GenerateNoise(t, rand, noiseRatio); 73 if (targetNoise != null) data.Add(targetNoise); 79 74 80 75 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/FeynmanBonus11.cs
r17678 r18086 29 29 get { 30 30 return string.Format( 31 "Goldstein 3.99: sqrt(1+2*epsilon**2*E_n*L**2/(m*(Z_1*Z_2*q**2)**2)) | {0} samples | {1}",32 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));31 "Goldstein 3.99: sqrt(1+2*epsilon**2*E_n*L**2/(m*(Z_1*Z_2*q**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 { 40 return new[] {"epsilon", "L", "m", "Z_1", "Z_2", "q", "E_n", noiseRatio == null ? "alpha" : "alpha_noise"}; 41 } 39 get { return noiseRatio == null ? new[] { "epsilon", "L", "m", "Z_1", "Z_2", "q", "E_n", "alpha" } : new[] { "epsilon", "L", "m", "Z_1", "Z_2", "q", "E_n", "alpha", "alpha_noise" }; } 42 40 } 43 41 … … 82 80 } 83 81 84 if (noiseRatio != null) { 85 var alpha_noise = new List<double>(); 86 var sigma_noise = (double) noiseRatio * alpha.StandardDeviationPop(); 87 alpha_noise.AddRange(alpha.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 88 data.Remove(alpha); 89 data.Add(alpha_noise); 90 } 82 var targetNoise = ValueGenerator.GenerateNoise(alpha, rand, noiseRatio); 83 if (targetNoise != null) data.Add(targetNoise); 91 84 92 85 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/FeynmanBonus12.cs
r17678 r18086 29 29 get { 30 30 return string.Format( 31 "Goldstein 8.56: sqrt((p-q*A_vec)**2*c**2+m**2*c**4)+q*Volt | {0} samples | {1}",32 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));31 "Goldstein 8.56: sqrt((p-q*A_vec)**2*c**2+m**2*c**4)+q*Volt | {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[] {"m", "c", "p", "q", "A_vec", "Volt", noiseRatio == null ? "E_n" : "E_n_noise"}; }39 get { return noiseRatio == null ? new[] { "m", "c", "p", "q", "A_vec", "Volt", "E_n" } : new[] { "m", "c", "p", "q", "A_vec", "Volt", "E_n", "E_n_noise" }; } 40 40 } 41 41 … … 76 76 } 77 77 78 if (noiseRatio != null) { 79 var E_n_noise = new List<double>(); 80 var sigma_noise = (double) noiseRatio * E_n.StandardDeviationPop(); 81 E_n_noise.AddRange(E_n.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 82 data.Remove(E_n); 83 data.Add(E_n_noise); 84 } 78 var targetNoise = ValueGenerator.GenerateNoise(E_n, rand, noiseRatio); 79 if (targetNoise != null) data.Add(targetNoise); 85 80 86 81 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/FeynmanBonus13.cs
r17678 r18086 29 29 get { 30 30 return string.Format( 31 "Goldstein 12.80: 1/(2*m)*(p**2+m**2*omega**2*x**2*(1+alpha*x/y)) | {0} samples | {1}",32 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));31 "Goldstein 12.80: 1/(2*m)*(p**2+m**2*omega**2*x**2*(1+alpha*x/y)) | {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[] {"m", "omega", "p", "y", "x", "alpha", noiseRatio == null ? "E_n" : "E_n_noise"}; }39 get { return noiseRatio == null ? new[] { "m", "omega", "p", "y", "x", "alpha", "E_n" } : new[] { "m", "omega", "p", "y", "x", "alpha", "E_n", "E_n_noise" }; } 40 40 } 41 41 … … 77 77 } 78 78 79 if (noiseRatio != null) { 80 var E_n_noise = new List<double>(); 81 var sigma_noise = (double) noiseRatio * E_n.StandardDeviationPop(); 82 E_n_noise.AddRange(E_n.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 83 data.Remove(E_n); 84 data.Add(E_n_noise); 85 } 79 var targetNoise = ValueGenerator.GenerateNoise(E_n, rand, noiseRatio); 80 if (targetNoise != null) data.Add(targetNoise); 86 81 87 82 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/FeynmanBonus14.cs
r17678 r18086 29 29 get { 30 30 return string.Format( 31 "Jackson 2.11: q/(4*pi*epsilon*y**2)*(4*pi*epsilon*Volt*d-q*d*y**3/(y**2-d**2)**2) | {0} samples | {1}",32 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));31 "Jackson 2.11: q/(4*pi*epsilon*y**2)*(4*pi*epsilon*Volt*d-q*d*y**3/(y**2-d**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[] {"q", "y", "Volt", "d", "epsilon", noiseRatio == null ? "F" :"F_noise"}; }39 get { return noiseRatio == null ? new[] { "q", "y", "Volt", "d", "epsilon", "F" } : new[] { "q", "y", "Volt", "d", "epsilon", "F", "F_noise"}; } 40 40 } 41 41 … … 75 75 } 76 76 77 if (noiseRatio != null) { 78 var F_noise = new List<double>(); 79 var sigma_noise = (double) noiseRatio * F.StandardDeviationPop(); 80 F_noise.AddRange(F.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 81 data.Remove(F); 82 data.Add(F_noise); 83 } 77 var targetNoise = ValueGenerator.GenerateNoise(F, rand, noiseRatio); 78 if (targetNoise != null) data.Add(targetNoise); 84 79 85 80 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/FeynmanBonus15.cs
r17678 r18086 29 29 get { 30 30 return string.Format( 31 "Jackson 3.45: q/sqrt(r**2+d**2-2*r*d*cos(alpha)) | {0} samples | {1}",32 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));31 "Jackson 3.45: q/sqrt(r**2+d**2-2*r*d*cos(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[] {"q", "r", "d", "alpha", noiseRatio == null ? "Volt" : "Volt_noise"}; }39 get { return noiseRatio == null ? new[] { "q", "r", "d", "alpha", "Volt" } : new[] { "q", "r", "d", "alpha", "Volt", "Volt_noise" }; } 40 40 } 41 41 … … 72 72 } 73 73 74 if (noiseRatio != null) { 75 var Volt_noise = new List<double>(); 76 var sigma_noise = (double) noiseRatio * Volt.StandardDeviationPop(); 77 Volt_noise.AddRange(Volt.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 78 data.Remove(Volt); 79 data.Add(Volt_noise); 80 } 74 var targetNoise = ValueGenerator.GenerateNoise(Volt, rand, noiseRatio); 75 if (targetNoise != null) data.Add(targetNoise); 81 76 82 77 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/FeynmanBonus16.cs
r17678 r18086 29 29 get { 30 30 return string.Format( 31 "Jackson 4.60: Ef*cos(theta)*((alpha-1)/(alpha+2)*d**3/r**2-r) | {0} samples | {1}",32 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));31 "Jackson 4.60: Ef*cos(theta)*((alpha-1)/(alpha+2)*d**3/r**2-r) | {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[] {"Ef", "theta", "r", "d", "alpha", noiseRatio == null ? "Volt" : "Volt_noise"}; }39 get { return noiseRatio == null ? new[] { "Ef", "theta", "r", "d", "alpha", "Volt" } : new[] { "Ef", "theta", "r", "d", "alpha", "Volt", "Volt_noise" }; } 40 40 } 41 41 … … 74 74 } 75 75 76 if (noiseRatio != null) { 77 var Volt_noise = new List<double>(); 78 var sigma_noise = (double) noiseRatio * Volt.StandardDeviationPop(); 79 Volt_noise.AddRange(Volt.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 80 data.Remove(Volt); 81 data.Add(Volt_noise); 82 } 76 var targetNoise = ValueGenerator.GenerateNoise(Volt, rand, noiseRatio); 77 if (targetNoise != null) data.Add(targetNoise); 83 78 84 79 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/FeynmanBonus17.cs
r17678 r18086 29 29 get { 30 30 return string.Format( 31 "Jackson 11.38: sqrt(1-v**2/c**2)*omega/(1+v/c*cos(theta)) | {0} samples | {1}",32 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));31 "Jackson 11.38: sqrt(1-v**2/c**2)*omega/(1+v/c*cos(theta)) | {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[] {"c", "v", "omega", "theta", noiseRatio == null ? "omega_0" :"omega_0_noise"}; }39 get { return noiseRatio == null ? new[] { "c", "v", "omega", "theta", "omega_0" } : new[] { "c", "v", "omega", "theta", "omega_0", "omega_0_noise"}; } 40 40 } 41 41 … … 72 72 } 73 73 74 if (noiseRatio != null) { 75 var omega_0_noise = new List<double>(); 76 var sigma_noise = (double) noiseRatio * omega_0.StandardDeviationPop(); 77 omega_0_noise.AddRange(omega_0.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 78 data.Remove(omega_0); 79 data.Add(omega_0_noise); 80 } 74 var targetNoise = ValueGenerator.GenerateNoise(omega_0, rand, noiseRatio); 75 if (targetNoise != null) data.Add(targetNoise); 81 76 82 77 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/FeynmanBonus18.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("Weinberg 15.2.1: 3/(8*pi*G)*(c**2*k_f/r**2+H_G**2) | {0} samples | {1}",31 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));30 return string.Format("Weinberg 15.2.1: 3/(8*pi*G)*(c**2*k_f/r**2+H_G**2) | {0}", 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } 33 33 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"G", "k_f", "r", "H_G", "c", noiseRatio == null ? "rho_0" : "rho_0_noise"}; }38 get { return noiseRatio == null ? new[] { "G", "k_f", "r", "H_G", "c", "rho_0" } : new[] { "G", "k_f", "r", "H_G", "c", "rho_0", "rho_0_noise" }; } 39 39 } 40 40 … … 72 72 } 73 73 74 if (noiseRatio != null) { 75 var rho_0_noise = new List<double>(); 76 var sigma_noise = (double) noiseRatio * rho_0.StandardDeviationPop(); 77 rho_0_noise.AddRange(rho_0.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 78 data.Remove(rho_0); 79 data.Add(rho_0_noise); 80 } 74 var targetNoise = ValueGenerator.GenerateNoise(rho_0, rand, noiseRatio); 75 if (targetNoise != null) data.Add(targetNoise); 81 76 82 77 return data; -
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; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/FeynmanBonus2.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("Friedman Equation: sqrt(8*pi*G*rho/3-alpha*c**2/d**2) | {0} samples | {1}",31 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));30 return string.Format("Friedman Equation: sqrt(8*pi*G*rho/3-alpha*c**2/d**2) | {0}", 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } 33 33 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"G", "rho", "alpha", "c", "d", noiseRatio == null ? "H_G" : "H_G_noise"}; }38 get { return noiseRatio == null ? new[] { "G", "rho", "alpha", "c", "d", "H_G" } : new[] { "G", "rho", "alpha", "c", "d", "H_G", "H_G_noise" }; } 39 39 } 40 40 … … 72 72 } 73 73 74 if (noiseRatio != null) { 75 var H_G_noise = new List<double>(); 76 var sigma_noise = (double) noiseRatio * H_G.StandardDeviationPop(); 77 H_G_noise.AddRange(H_G.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 78 data.Remove(H_G); 79 data.Add(H_G_noise); 80 } 74 var targetNoise = ValueGenerator.GenerateNoise(H_G, rand, noiseRatio); 75 if (targetNoise != null) data.Add(targetNoise); 81 76 82 77 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/FeynmanBonus20.cs
r17678 r18086 29 29 get { 30 30 return string.Format( 31 "Schwarz 13.132 (Klein-Nishina): pi*alpha**2*h**2/(m**2*c**2)*(omega_0/omega)**2*(omega_0/omega+omega/omega_0-sin(beta)**2) | {0} samples | {1}",32 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));31 "Schwarz 13.132 (Klein-Nishina): pi*alpha**2*h**2/(m**2*c**2)*(omega_0/omega)**2*(omega_0/omega+omega/omega_0-sin(beta)**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[] {"omega", "omega_0", "alpha", "h", "m", "c", "beta", noiseRatio == null ? "A" : "A_noise"}; }39 get { return noiseRatio == null ? new[] { "omega", "omega_0", "alpha", "h", "m", "c", "beta", "A" } : new[] { "omega", "omega_0", "alpha", "h", "m", "c", "beta", "A", "A_noise" }; } 40 40 } 41 41 … … 81 81 } 82 82 83 if (noiseRatio != null) { 84 var A_noise = new List<double>(); 85 var sigma_noise = (double) noiseRatio * A.StandardDeviationPop(); 86 A_noise.AddRange(A.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 87 data.Remove(A); 88 data.Add(A_noise); 89 } 83 var targetNoise = ValueGenerator.GenerateNoise(A, rand, noiseRatio); 84 if (targetNoise != null) data.Add(targetNoise); 90 85 91 86 return data; -
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; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/FeynmanBonus4.cs
r17678 r18086 29 29 get { 30 30 return string.Format( 31 "Radiated gravitational wave power: -32/5*G**4/c**5*(m1*m2)**2*(m1+m2)/r**5 | {0} samples | {1}",32 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));31 "Radiated gravitational wave power: -32/5*G**4/c**5*(m1*m2)**2*(m1+m2)/r**5 | {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", "c", "m1", "m2", "r", noiseRatio == null ? "Pwr" : "Pwr_noise"}; }39 get { return noiseRatio == null ? new[] { "G", "c", "m1", "m2", "r", "Pwr" } : new[] { "G", "c", "m1", "m2", "r", "Pwr", "Pwr_noise" }; } 40 40 } 41 41 … … 74 74 } 75 75 76 if (noiseRatio != null) { 77 var Pwr_noise = new List<double>(); 78 var sigma_noise = (double) noiseRatio * Pwr.StandardDeviationPop(); 79 Pwr_noise.AddRange(Pwr.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 80 data.Remove(Pwr); 81 data.Add(Pwr_noise); 82 } 76 var targetNoise = ValueGenerator.GenerateNoise(Pwr, rand, noiseRatio); 77 if (targetNoise != null) data.Add(targetNoise); 83 78 84 79 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/FeynmanBonus5.cs
r17678 r18086 29 29 get { 30 30 return string.Format( 31 "Relativistic aberation: arccos((cos(theta2)-v/c)/(1-v/c*cos(theta2))) | {0} samples | {1}",32 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));31 "Relativistic aberation: arccos((cos(theta2)-v/c)/(1-v/c*cos(theta2))) | {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[] {"c", "v", "theta2", noiseRatio == null ? "theta1" : "theta1_noise"}; }39 get { return noiseRatio == null ? new[] { "c", "v", "theta2", "theta1" } : new[] { "c", "v", "theta2", "theta1", "theta1_noise" }; } 40 40 } 41 41 … … 69 69 } 70 70 71 if (noiseRatio != null) { 72 var theta1_noise = new List<double>(); 73 var sigma_noise = (double) noiseRatio * theta1.StandardDeviationPop(); 74 theta1_noise.AddRange(theta1.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 75 data.Remove(theta1); 76 data.Add(theta1_noise); 77 } 71 var targetNoise = ValueGenerator.GenerateNoise(theta1, rand, noiseRatio); 72 if (targetNoise != null) data.Add(targetNoise); 78 73 79 74 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/FeynmanBonus6.cs
r17678 r18086 29 29 get { 30 30 return string.Format( 31 "N-slit diffraction: I_0*(sin(alpha/2)*sin(n*delta/2)/(alpha/2*sin(delta/2)))**2 | {0} samples | {1}",32 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));31 "N-slit diffraction: I_0*(sin(alpha/2)*sin(n*delta/2)/(alpha/2*sin(delta/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[] {"I_0", "alpha", "delta", "n", noiseRatio == null ? "I" : "I_noise"}; }39 get { return noiseRatio == null ? new[] { "I_0", "alpha", "delta", "n", "I" } : new[] { "I_0", "alpha", "delta", "n", "I", "I_noise" }; } 40 40 } 41 41 … … 73 73 } 74 74 75 if (noiseRatio != null) { 76 var I_noise = new List<double>(); 77 var sigma_noise = (double) noiseRatio * I.StandardDeviationPop(); 78 I_noise.AddRange(I.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 79 data.Remove(I); 80 data.Add(I_noise); 81 } 75 var targetNoise = ValueGenerator.GenerateNoise(I, rand, noiseRatio); 76 if (targetNoise != null) data.Add(targetNoise); 82 77 83 78 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/FeynmanBonus7.cs
r17678 r18086 28 28 public override string Name { 29 29 get { 30 return string.Format("Goldstein 3.16: sqrt(2/m*(E_n-U-L**2/(2*m*r**2))) | {0} samples | {1}",31 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));30 return string.Format("Goldstein 3.16: sqrt(2/m*(E_n-U-L**2/(2*m*r**2))) | {0}", 31 noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio)); 32 32 } 33 33 } … … 36 36 37 37 protected override string[] VariableNames { 38 get { return n ew[] {"m", "E_n", "U", "L", "r", noiseRatio == null ? "v" : "v_noise"}; }38 get { return noiseRatio == null ? new[] { "m", "E_n", "U", "L", "r", "v" } : new[] { "m", "E_n", "U", "L", "r", "v", "v_noise" }; } 39 39 } 40 40 … … 72 72 } 73 73 74 if (noiseRatio != null) { 75 var v_noise = new List<double>(); 76 var sigma_noise = (double) noiseRatio * v.StandardDeviationPop(); 77 v_noise.AddRange(v.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 78 data.Remove(v); 79 data.Add(v_noise); 80 } 74 var targetNoise = ValueGenerator.GenerateNoise(v, rand, noiseRatio); 75 if (targetNoise != null) data.Add(targetNoise); 81 76 82 77 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/FeynmanBonus8.cs
r17678 r18086 29 29 get { 30 30 return string.Format( 31 "Goldstein 3.55: m*k_G/L**2*(1+sqrt(1+2*E_n*L**2/(m*k_G**2))*cos(theta1-theta2)) | {0} samples | {1}",32 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));31 "Goldstein 3.55: m*k_G/L**2*(1+sqrt(1+2*E_n*L**2/(m*k_G**2))*cos(theta1-theta2)) | {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[] {"m", "k_G", "L", "E_n", "theta1", "theta2", noiseRatio == null ? "k" : "k_noise"}; }39 get { return noiseRatio == null ? new[] { "m", "k_G", "L", "E_n", "theta1", "theta2", "k" } : new[] { "m", "k_G", "L", "E_n", "theta1", "theta2", "k", "k_noise" }; } 40 40 } 41 41 … … 79 79 } 80 80 81 if (noiseRatio != null) { 82 var k_noise = new List<double>(); 83 var sigma_noise = (double) noiseRatio * k.StandardDeviationPop(); 84 k_noise.AddRange(k.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 85 data.Remove(k); 86 data.Add(k_noise); 87 } 81 var targetNoise = ValueGenerator.GenerateNoise(k, rand, noiseRatio); 82 if (targetNoise != null) data.Add(targetNoise); 88 83 89 84 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/FeynmanBonus9.cs
r17678 r18086 29 29 get { 30 30 return string.Format( 31 "Goldstein 3.64: d*(1-alpha**2)/(1+alpha*cos(theta1-theta2)) | {0} samples | {1}",32 trainingSamples,noiseRatio == null ? "no noise" : string.Format(System.Globalization.CultureInfo.InvariantCulture, "noise={0:g}",noiseRatio));31 "Goldstein 3.64: d*(1-alpha**2)/(1+alpha*cos(theta1-theta2)) | {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[] {"d", "alpha", "theta1", "theta2", noiseRatio == null ? "r" : "r_noise"}; }39 get { return noiseRatio == null ? new[] { "d", "alpha", "theta1", "theta2", "r" } : new[] { "d", "alpha", "theta1", "theta2", "r", "r_noise" }; } 40 40 } 41 41 … … 71 71 } 72 72 73 if (noiseRatio != null) { 74 var r_noise = new List<double>(); 75 var sigma_noise = (double) noiseRatio * r.StandardDeviationPop(); 76 r_noise.AddRange(r.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 77 data.Remove(r); 78 data.Add(r_noise); 79 } 73 var targetNoise = ValueGenerator.GenerateNoise(r, rand, noiseRatio); 74 if (targetNoise != null) data.Add(targetNoise); 75 76 //var targetNoise = GetNoisyTarget(r, rand); 77 //if (targetNoise != null) data.Add(targetNoise); 80 78 81 79 return data; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/FeynmanDescriptor.cs
r17647 r18086 4 4 using System.Text; 5 5 using System.Threading.Tasks; 6 using HeuristicLab.Common; 7 using HeuristicLab.Core; 8 using HeuristicLab.Random; 6 9 7 10 namespace HeuristicLab.Problems.Instances.DataAnalysis { … … 14 17 } 15 18 19 public List<double> GetNoisyTarget(List<double> target, IRandom rand) { 20 if (noiseRatio == null) return null; 21 22 var targetNoise = new List<double>(); 23 var sigmaNoise = Math.Sqrt(noiseRatio.Value) * target.StandardDeviationPop(); 24 targetNoise.AddRange(target.Select(md => md + NormalDistributedRandomPolar.NextDouble(rand, 0, sigmaNoise))); 25 return targetNoise; 26 27 } 28 16 29 protected override int TrainingPartitionStart { get { return 0; } } 17 30 protected override int TrainingPartitionEnd { get { return 100; } } -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/FeynmanLargeInstanceProvider.cs
r17677 r18086 35 35 36 36 37 var noiseRatio = new double?[] { null, 1, 10E-2, 10E-4};37 var noiseRatio = new double?[] { null, 0.1, 0.3, 1 }; 38 38 39 39 #region types … … 163 163 164 164 165 foreach (var n in noiseRatio) {166 foreach (var type in descriptorTypes) {165 foreach (var type in descriptorTypes) { 166 foreach (var n in noiseRatio) { 167 167 descriptorList.Add((IDataDescriptor)Activator.CreateInstance(type, rand.Next(), 10000, 10000, n)); 168 168 } -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Feynman/FeynmanSmallInstanceProvider.cs
r17677 r18086 35 35 36 36 37 var noiseRatio = new double?[] { null, 1, 10E-2, 10E-4};37 var noiseRatio = new double?[] { null, 0.1, 0.3, 1 }; 38 38 39 39 #region types … … 163 163 164 164 165 foreach (var n in noiseRatio) {166 foreach (var type in descriptorTypes) {165 foreach (var type in descriptorTypes) { 166 foreach (var n in noiseRatio) { 167 167 descriptorList.Add((IDataDescriptor)Activator.CreateInstance(type, rand.Next(), 100, 100, n)); 168 168 }
Note: See TracChangeset
for help on using the changeset viewer.