Changeset 18180 for branches/3138_Shape_Constraints_Transformations/HeuristicLab.Tests/HeuristicLab-3.3
- Timestamp:
- 01/10/22 10:15:25 (2 years ago)
- Location:
- branches/3138_Shape_Constraints_Transformations
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3138_Shape_Constraints_Transformations
- Property svn:mergeinfo changed
-
branches/3138_Shape_Constraints_Transformations/HeuristicLab.Tests
- Property svn:mergeinfo changed
/branches/3140_NumberSymbol/HeuristicLab.Tests (added) merged: 18119-18120,18123,18126-18127,18131,18145,18147 /trunk/HeuristicLab.Tests (added) merged: 18132,18148,18167-18173
- Property svn:mergeinfo changed
-
branches/3138_Shape_Constraints_Transformations/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPSymbolicClassificationSampleTest.cs
r17180 r18180 109 109 varSymbol.WeightManipulatorSigma = 0.05; 110 110 varSymbol.MultiplicativeWeightManipulatorSigma = 0.03; 111 var constSymbol = grammar.Symbols.OfType<Constant>().Single();112 constSymbol.MaxValue = 20;113 constSymbol.MinValue = -20;114 constSymbol.ManipulatorMu = 0.0;115 constSymbol.ManipulatorSigma = 1;116 constSymbol.MultiplicativeManipulatorSigma = 0.03;111 var numSymbol = grammar.Symbols.OfType<Number>().Single(); 112 numSymbol.MaxValue = 20; 113 numSymbol.MinValue = -20; 114 numSymbol.ManipulatorMu = 0.0; 115 numSymbol.ManipulatorSigma = 1; 116 numSymbol.MultiplicativeManipulatorSigma = 0.03; 117 117 symbClassProblem.SymbolicExpressionTreeGrammar = grammar; 118 118 -
branches/3138_Shape_Constraints_Transformations/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPSymbolicRegressionSampleTest.cs
r17180 r18180 110 110 varSymbol.WeightManipulatorSigma = 0.05; 111 111 varSymbol.MultiplicativeWeightManipulatorSigma = 0.03; 112 var constSymbol = grammar.Symbols.OfType<Constant>().Single();113 constSymbol.MaxValue = 20;114 constSymbol.MinValue = -20;115 constSymbol.ManipulatorMu = 0.0;116 constSymbol.ManipulatorSigma = 1;117 constSymbol.MultiplicativeManipulatorSigma = 0.03;112 var numSymbol = grammar.Symbols.OfType<Number>().Single(); 113 numSymbol.MaxValue = 20; 114 numSymbol.MinValue = -20; 115 numSymbol.ManipulatorMu = 0.0; 116 numSymbol.ManipulatorSigma = 1; 117 numSymbol.MultiplicativeManipulatorSigma = 0.03; 118 118 symbRegProblem.SymbolicExpressionTreeGrammar = grammar; 119 119 -
branches/3138_Shape_Constraints_Transformations/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPSymbolicRegressionSampleWithOSTest.cs
r17948 r18180 66 66 // Unfortunately, running the same test on a different machine results in different values 67 67 // For x86 environments the results below match but on x64 there is a difference 68 // We tracked down the ConstantOptimizationEvaluator as a possible cause but have not68 // We tracked down the ParameterOptimizationEvaluator as a possible cause but have not 69 69 // been able to identify the real cause. Presumably, execution on a Xeon and a Core i7 processor 70 70 // leads to different results. … … 184 184 problem.MaximumFunctionArguments.Value = 0; 185 185 186 var evaluator = new SymbolicRegression ConstantOptimizationEvaluator();187 evaluator. ConstantOptimizationIterations.Value = 5;186 var evaluator = new SymbolicRegressionParameterOptimizationEvaluator(); 187 evaluator.ParameterOptimizationIterations.Value = 5; 188 188 problem.EvaluatorParameter.Value = evaluator; 189 189 problem.RelativeNumberOfEvaluatedSamplesParameter.Hidden = true; -
branches/3138_Shape_Constraints_Transformations/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GeSymbolicRegressionSampleTest.cs
r17180 r18180 113 113 problem.SymbolicExpressionTreeGrammar.RemoveSymbol(c); 114 114 } 115 var numbers = problem.SymbolicExpressionTreeGrammar.AllowedSymbols.OfType<Number>().ToList(); 116 foreach (var n in numbers) { 117 problem.SymbolicExpressionTreeGrammar.RemoveSymbol(n); 118 } 115 119 116 120 SamplesUtils.ConfigureOsGeneticAlgorithmParameters<GenderSpecificSelector, Encodings.IntegerVectorEncoding.SinglePointCrossover, Encodings.IntegerVectorEncoding.UniformOnePositionManipulator>( -
branches/3138_Shape_Constraints_Transformations/HeuristicLab.Tests/HeuristicLab-3.3/Samples/ShapeConstrainedRegressionSampleTest.cs
r17968 r18180 35 35 [TestClass] 36 36 public class ShapeConstrainedRegressionSampleTest { 37 private const string SampleFileName = "G A_Shape_Constrained_Regression";37 private const string SampleFileName = "GP_Shape_Constrained_Regression"; 38 38 private static readonly ProtoBufSerializer serializer = new ProtoBufSerializer(); 39 39 … … 47 47 48 48 if (Environment.Is64BitProcess) { 49 Assert.AreEqual(0. 355347729912352, SamplesUtils.GetDoubleResult(ga, "BestQuality"), 1E-8);50 Assert.AreEqual(2 7.6606834433137, SamplesUtils.GetDoubleResult(ga, "CurrentAverageQuality"), 1E-8);51 Assert.AreEqual(3 359.91748220025, SamplesUtils.GetDoubleResult(ga, "CurrentWorstQuality"), 1E-8);49 Assert.AreEqual(0.035536903914644882, SamplesUtils.GetDoubleResult(ga, "BestQuality"), 1E-8); 50 Assert.AreEqual(26.707437555596698, SamplesUtils.GetDoubleResult(ga, "CurrentAverageQuality"), 1E-8); 51 Assert.AreEqual(3294.1754151628993, SamplesUtils.GetDoubleResult(ga, "CurrentWorstQuality"), 1E-8); 52 52 Assert.AreEqual(150200, SamplesUtils.GetIntResult(ga, "EvaluatedSolutions")); 53 53 } else { … … 57 57 Assert.AreEqual(150200, SamplesUtils.GetIntResult(ga, "EvaluatedSolutions")); 58 58 } 59 } 60 61 [TestMethod] 62 [TestCategory("Samples.Create")] 63 [TestProperty("Time", "medium")] 64 public void CreateShapeConstrainedRegressionSampleTest() { 65 var ga = CreateShapeConstrainedRegressionSample(); 66 string path = Path.Combine(SamplesUtils.SamplesDirectory, SampleFileName + SamplesUtils.SampleFileExtension); 67 serializer.Serialize(ga, path); 59 68 } 60 69 … … 82 91 83 92 #region Algorithm Configuration 84 alg.Name = "Genetic Programming - Shape 93 alg.Name = "Genetic Programming - Shape-constrained Regression"; 85 94 alg.Description = "A standard genetic programming algorithm to solve a shape constrained regression problem (Radiated gravitational wave power - Feynman instance)"; 86 95 alg.Problem = problem; … … 93 102 94 103 alg.Engine = new ParallelEngine.ParallelEngine(); 104 95 105 return alg; 96 106 }
Note: See TracChangeset
for help on using the changeset viewer.