Changeset 6474
- Timestamp:
- 06/24/11 10:56:56 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab/3.3/Tests/GeneticAlgorithmSamplesTest.cs
r6468 r6474 97 97 RunAlgorithm(ga); 98 98 Assert.AreEqual(1828.9368669428336, GetDoubleResult(ga, "BestQuality")); 99 Assert.AreEqual(1832. 0882694567929, GetDoubleResult(ga, "CurrentAverageQuality"));100 Assert.AreEqual(19 48.386456294867, GetDoubleResult(ga, "CurrentWorstQuality"));99 Assert.AreEqual(1832.7272021720889, GetDoubleResult(ga, "CurrentAverageQuality")); 100 Assert.AreEqual(1929.5220133155044, GetDoubleResult(ga, "CurrentWorstQuality")); 101 101 Assert.AreEqual(99100, GetIntResult(ga, "EvaluatedSolutions")); 102 102 } … … 179 179 RunAlgorithm(ga); 180 180 Assert.AreEqual(89, GetDoubleResult(ga, "BestQuality")); 181 Assert.AreEqual( 79.834, GetDoubleResult(ga, "CurrentAverageQuality"));181 Assert.AreEqual(68.635, GetDoubleResult(ga, "CurrentAverageQuality")); 182 182 Assert.AreEqual(0, GetDoubleResult(ga, "CurrentWorstQuality")); 183 Assert.AreEqual( 100900, GetIntResult(ga, "EvaluatedSolutions"));183 Assert.AreEqual(50950, GetIntResult(ga, "EvaluatedSolutions")); 184 184 } 185 185 … … 200 200 ga.Problem = antProblem; 201 201 ConfigureGeneticAlgorithmParameters<TournamentSelector, SubtreeCrossover, MultiSymbolicExpressionTreeArchitectureManipulator>( 202 ga, 1000, 1, 100, 0.15, 5);202 ga, 1000, 1, 50, 0.15, 5); 203 203 var mutator = (MultiSymbolicExpressionTreeArchitectureManipulator)ga.Mutator; 204 204 mutator.Operators.SetItemCheckedState(mutator.Operators … … 230 230 ga.SetSeedRandomly.Value = false; 231 231 RunAlgorithm(ga); 232 Assert.AreEqual(0.8 7577096276191879, GetDoubleResult(ga, "BestQuality"));233 Assert.AreEqual(0. 65140971696668726, GetDoubleResult(ga, "CurrentAverageQuality"));232 Assert.AreEqual(0.82895806566669916, GetDoubleResult(ga, "BestQuality")); 233 Assert.AreEqual(0.50808259256341926, GetDoubleResult(ga, "CurrentAverageQuality")); 234 234 Assert.AreEqual(0, GetDoubleResult(ga, "CurrentWorstQuality")); 235 Assert.AreEqual( 100900, GetIntResult(ga, "EvaluatedSolutions"));235 Assert.AreEqual(50950, GetIntResult(ga, "EvaluatedSolutions")); 236 236 } 237 237 … … 308 308 symbRegProblem.ValidationPartition.Start = 2800; 309 309 symbRegProblem.ValidationPartition.End = 4000; 310 symbRegProblem.RelativeNumberOfEvaluatedSamples.Value = 0.3;310 symbRegProblem.RelativeNumberOfEvaluatedSamples.Value = 1; 311 311 symbRegProblem.MaximumSymbolicExpressionTreeLength.Value = 150; 312 312 symbRegProblem.MaximumSymbolicExpressionTreeDepth.Value = 12; … … 321 321 ga.Description = "A standard genetic programming algorithm to solve a symbolic regression problem (tower dataset)"; 322 322 ConfigureGeneticAlgorithmParameters<TournamentSelector, SubtreeCrossover, MultiSymbolicExpressionTreeManipulator>( 323 ga, 1000, 1, 100, 0.15, 5);323 ga, 1000, 1, 50, 0.15, 5); 324 324 var mutator = (MultiSymbolicExpressionTreeManipulator)ga.Mutator; 325 325 mutator.Operators.OfType<FullTreeShaker>().Single().ShakingFactor = 0.1; … … 330 330 .OfType<SymbolicRegressionSingleObjectiveOverfittingAnalyzer>() 331 331 .Single(), false); 332 ga.Analyzer.Operators.SetItemCheckedState( 333 ga.Analyzer.Operators 334 .OfType<SymbolicDataAnalysisAlleleFrequencyAnalyzer>() 335 .First(), false); 332 336 #endregion 333 337 return ga; … … 347 351 ga.SetSeedRandomly.Value = false; 348 352 RunAlgorithm(ga); 349 Assert.AreEqual(0.13 85094551576456, GetDoubleResult(ga, "BestQuality"));350 Assert.AreEqual(2. 8817699057253576, GetDoubleResult(ga, "CurrentAverageQuality"));353 Assert.AreEqual(0.13607488888377872, GetDoubleResult(ga, "BestQuality")); 354 Assert.AreEqual(2.1634701155600293, GetDoubleResult(ga, "CurrentAverageQuality")); 351 355 Assert.AreEqual(100.62175156249987, GetDoubleResult(ga, "CurrentWorstQuality")); 352 356 Assert.AreEqual(100900, GetIntResult(ga, "EvaluatedSolutions")); … … 442 446 .OfType<SymbolicClassificationSingleObjectiveOverfittingAnalyzer>() 443 447 .Single(), false); 448 ga.Analyzer.Operators.SetItemCheckedState( 449 ga.Analyzer.Operators 450 .OfType<SymbolicDataAnalysisAlleleFrequencyAnalyzer>() 451 .First(), false); 444 452 #endregion 445 453 return ga;
Note: See TracChangeset
for help on using the changeset viewer.