Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/06/12 09:52:52 (12 years ago)
Author:
ascheibe
Message:

#1861 merged changes from trunk into branch

Location:
branches/HeuristicLab.Mono
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Mono

  • branches/HeuristicLab.Mono/HeuristicLab.Tests

  • branches/HeuristicLab.Mono/HeuristicLab.Tests/HeuristicLab-3.3/SamplesTest.cs

    r8335 r8585  
    9797      ConfigureGeneticAlgorithmParameters<ProportionalSelector, OrderCrossover2, InversionManipulator>(
    9898        ga, 100, 1, 1000, 0.05);
    99 
    100       ga.Analyzer.Operators.SetItemCheckedState(ga.Analyzer.Operators
    101         .OfType<TSPAlleleFrequencyAnalyzer>()
    102         .Single(), false);
    103       ga.Analyzer.Operators.SetItemCheckedState(ga.Analyzer.Operators
    104         .OfType<TSPPopulationDiversityAnalyzer>()
    105         .Single(), false);
    10699      #endregion
    107100      return ga;
     
    350343      Assert.AreEqual(100.62175156249987, GetDoubleResult(ga, "CurrentWorstQuality"), 1E-8);
    351344      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);
    352348    }
    353349
     
    555551        UnidirectionalRingMigrator, BestSelector, WorstReplacer>(
    556552        ga, 100, 1, 1000, 0.05, 5, 50, 0.25);
    557 
    558       ga.Analyzer.Operators.SetItemCheckedState(ga.Analyzer.Operators
    559         .OfType<TSPAlleleFrequencyAnalyzer>()
    560         .Single(), false);
    561       ga.Analyzer.Operators.SetItemCheckedState(ga.Analyzer.Operators
    562         .OfType<TSPPopulationDiversityAnalyzer>()
    563         .Single(), false);
    564553      #endregion
    565554      return ga;
     
    836825      ts.TabuTenure.Value = 60;
    837826
    838       ts.Analyzer.Operators.SetItemCheckedState(ts.Analyzer.Operators
    839         .OfType<TSPAlleleFrequencyAnalyzer>()
    840         .Single(), false);
    841       ts.Analyzer.Operators.SetItemCheckedState(ts.Analyzer.Operators
    842         .OfType<TSPPopulationDiversityAnalyzer>()
    843         .Single(), false);
    844827      #endregion
    845828      ts.Engine = new ParallelEngine();
     
    920903        .Single(), false);
    921904      vns.ShakingOperator = shakingOperator;
    922       vns.Analyzer.Operators.SetItemCheckedState(vns.Analyzer.Operators
    923         .OfType<TSPAlleleFrequencyAnalyzer>()
    924         .Single(), false);
    925       vns.Analyzer.Operators.SetItemCheckedState(vns.Analyzer.Operators
    926         .OfType<TSPPopulationDiversityAnalyzer>()
    927         .Single(), false);
    928905      #endregion
    929906      vns.Engine = new ParallelEngine();
Note: See TracChangeset for help on using the changeset viewer.