- Timestamp:
- 09/14/12 18:58:15 (12 years ago)
- Location:
- branches/GP-MoveOperators
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GP-MoveOperators
- Property svn:ignore
-
old new 21 21 protoc.exe 22 22 _ReSharper.HeuristicLab 3.3 Tests 23 Google.ProtocolBuffers-2.4.1.473.dll
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/GP-MoveOperators/HeuristicLab.Tests
- Property svn:ignore
-
old new 4 4 *.vs10x 5 5 _ReSharper.HeuristicLab 3.3 Tests 6 *.user
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/GP-MoveOperators/HeuristicLab.Tests/HeuristicLab-3.3/SamplesTest.cs
r8206 r8660 97 97 ConfigureGeneticAlgorithmParameters<ProportionalSelector, OrderCrossover2, InversionManipulator>( 98 98 ga, 100, 1, 1000, 0.05); 99 100 ga.Analyzer.Operators.SetItemCheckedState(ga.Analyzer.Operators101 .OfType<TSPAlleleFrequencyAnalyzer>()102 .Single(), false);103 ga.Analyzer.Operators.SetItemCheckedState(ga.Analyzer.Operators104 .OfType<TSPPopulationDiversityAnalyzer>()105 .Single(), false);106 99 #endregion 107 100 return ga; … … 190 183 ga.SetSeedRandomly.Value = false; 191 184 RunAlgorithm(ga); 192 Assert.AreEqual( 67, GetDoubleResult(ga, "BestQuality"));193 Assert.AreEqual(4 5.813, GetDoubleResult(ga, "CurrentAverageQuality"));185 Assert.AreEqual(81, GetDoubleResult(ga, "BestQuality")); 186 Assert.AreEqual(48.19, GetDoubleResult(ga, "CurrentAverageQuality")); 194 187 Assert.AreEqual(0, GetDoubleResult(ga, "CurrentWorstQuality")); 195 188 Assert.AreEqual(50950, GetIntResult(ga, "EvaluatedSolutions")); … … 241 234 ga.SetSeedRandomly.Value = false; 242 235 RunAlgorithm(ga); 243 Assert.AreEqual(0. 78855594192122458, GetDoubleResult(ga, "BestQuality"), 1E-8);244 Assert.AreEqual(0. 61395271071681523, GetDoubleResult(ga, "CurrentAverageQuality"), 1E-8);236 Assert.AreEqual(0.84966698918060757, GetDoubleResult(ga, "BestQuality"), 1E-8); 237 Assert.AreEqual(0.59815405391256571, GetDoubleResult(ga, "CurrentAverageQuality"), 1E-8); 245 238 Assert.AreEqual(0, GetDoubleResult(ga, "CurrentWorstQuality"), 1E-8); 246 239 Assert.AreEqual(50950, GetIntResult(ga, "EvaluatedSolutions")); … … 346 339 ga.SetSeedRandomly.Value = false; 347 340 RunAlgorithm(ga); 348 Assert.AreEqual(0.1 3775264138895371, GetDoubleResult(ga, "BestQuality"), 1E-8);349 Assert.AreEqual( 14.232802217120254, GetDoubleResult(ga, "CurrentAverageQuality"), 1E-8);350 Assert.AreEqual(10 4.24339008411457, GetDoubleResult(ga, "CurrentWorstQuality"), 1E-8);341 Assert.AreEqual(0.14458636369766503, GetDoubleResult(ga, "BestQuality"), 1E-8); 342 Assert.AreEqual(2.5613992769560352, GetDoubleResult(ga, "CurrentAverageQuality"), 1E-8); 343 Assert.AreEqual(100.62175156249987, GetDoubleResult(ga, "CurrentWorstQuality"), 1E-8); 351 344 Assert.AreEqual(100900, GetIntResult(ga, "EvaluatedSolutions")); 345 var bestTrainingSolution = (IClassificationSolution)ga.Results["Best training solution"].Value; 346 Assert.AreEqual(0.80625, bestTrainingSolution.TrainingAccuracy, 1E-8); 347 Assert.AreEqual(0.782608695652174, bestTrainingSolution.TestAccuracy, 1E-8); 352 348 } 353 349 … … 358 354 symbClassProblem.Name = "Mammography Classification Problem"; 359 355 symbClassProblem.Description = "Mammography dataset imported from the UCI machine learning repository (http://archive.ics.uci.edu/ml/datasets/Mammographic+Mass)"; 360 ClassificationRealWorldInstanceProvider provider = new ClassificationRealWorldInstanceProvider();356 UCIInstanceProvider provider = new UCIInstanceProvider(); 361 357 var instance = provider.GetDataDescriptors().Where(x => x.Name.Equals("Mammography")).Single(); 362 358 var mammoData = (ClassificationProblemData)provider.LoadData(instance); … … 555 551 UnidirectionalRingMigrator, BestSelector, WorstReplacer>( 556 552 ga, 100, 1, 1000, 0.05, 5, 50, 0.25); 557 558 ga.Analyzer.Operators.SetItemCheckedState(ga.Analyzer.Operators559 .OfType<TSPAlleleFrequencyAnalyzer>()560 .Single(), false);561 ga.Analyzer.Operators.SetItemCheckedState(ga.Analyzer.Operators562 .OfType<TSPPopulationDiversityAnalyzer>()563 .Single(), false);564 553 #endregion 565 554 return ga; … … 836 825 ts.TabuTenure.Value = 60; 837 826 838 ts.Analyzer.Operators.SetItemCheckedState(ts.Analyzer.Operators839 .OfType<TSPAlleleFrequencyAnalyzer>()840 .Single(), false);841 ts.Analyzer.Operators.SetItemCheckedState(ts.Analyzer.Operators842 .OfType<TSPPopulationDiversityAnalyzer>()843 .Single(), false);844 827 #endregion 845 828 ts.Engine = new ParallelEngine(); … … 920 903 .Single(), false); 921 904 vns.ShakingOperator = shakingOperator; 922 vns.Analyzer.Operators.SetItemCheckedState(vns.Analyzer.Operators923 .OfType<TSPAlleleFrequencyAnalyzer>()924 .Single(), false);925 vns.Analyzer.Operators.SetItemCheckedState(vns.Analyzer.Operators926 .OfType<TSPPopulationDiversityAnalyzer>()927 .Single(), false);928 905 #endregion 929 906 vns.Engine = new ParallelEngine();
Note: See TracChangeset
for help on using the changeset viewer.