Changeset 6474


Ignore:
Timestamp:
06/24/11 10:56:56 (8 years ago)
Author:
gkronber
Message:

#1553: updated result assertions for GA samples

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab/3.3/Tests/GeneticAlgorithmSamplesTest.cs

    r6468 r6474  
    9797      RunAlgorithm(ga);
    9898      Assert.AreEqual(1828.9368669428336, GetDoubleResult(ga, "BestQuality"));
    99       Assert.AreEqual(1832.0882694567929, GetDoubleResult(ga, "CurrentAverageQuality"));
    100       Assert.AreEqual(1948.386456294867, GetDoubleResult(ga, "CurrentWorstQuality"));
     99      Assert.AreEqual(1832.7272021720889, GetDoubleResult(ga, "CurrentAverageQuality"));
     100      Assert.AreEqual(1929.5220133155044, GetDoubleResult(ga, "CurrentWorstQuality"));
    101101      Assert.AreEqual(99100, GetIntResult(ga, "EvaluatedSolutions"));
    102102    }
     
    179179      RunAlgorithm(ga);
    180180      Assert.AreEqual(89, GetDoubleResult(ga, "BestQuality"));
    181       Assert.AreEqual(79.834, GetDoubleResult(ga, "CurrentAverageQuality"));
     181      Assert.AreEqual(68.635, GetDoubleResult(ga, "CurrentAverageQuality"));
    182182      Assert.AreEqual(0, GetDoubleResult(ga, "CurrentWorstQuality"));
    183       Assert.AreEqual(100900, GetIntResult(ga, "EvaluatedSolutions"));
     183      Assert.AreEqual(50950, GetIntResult(ga, "EvaluatedSolutions"));
    184184    }
    185185
     
    200200      ga.Problem = antProblem;
    201201      ConfigureGeneticAlgorithmParameters<TournamentSelector, SubtreeCrossover, MultiSymbolicExpressionTreeArchitectureManipulator>(
    202         ga, 1000, 1, 100, 0.15, 5);
     202        ga, 1000, 1, 50, 0.15, 5);
    203203      var mutator = (MultiSymbolicExpressionTreeArchitectureManipulator)ga.Mutator;
    204204      mutator.Operators.SetItemCheckedState(mutator.Operators
     
    230230      ga.SetSeedRandomly.Value = false;
    231231      RunAlgorithm(ga);
    232       Assert.AreEqual(0.87577096276191879, 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"));
    234234      Assert.AreEqual(0, GetDoubleResult(ga, "CurrentWorstQuality"));
    235       Assert.AreEqual(100900, GetIntResult(ga, "EvaluatedSolutions"));
     235      Assert.AreEqual(50950, GetIntResult(ga, "EvaluatedSolutions"));
    236236    }
    237237
     
    308308      symbRegProblem.ValidationPartition.Start = 2800;
    309309      symbRegProblem.ValidationPartition.End = 4000;
    310       symbRegProblem.RelativeNumberOfEvaluatedSamples.Value = 0.3;
     310      symbRegProblem.RelativeNumberOfEvaluatedSamples.Value = 1;
    311311      symbRegProblem.MaximumSymbolicExpressionTreeLength.Value = 150;
    312312      symbRegProblem.MaximumSymbolicExpressionTreeDepth.Value = 12;
     
    321321      ga.Description = "A standard genetic programming algorithm to solve a symbolic regression problem (tower dataset)";
    322322      ConfigureGeneticAlgorithmParameters<TournamentSelector, SubtreeCrossover, MultiSymbolicExpressionTreeManipulator>(
    323         ga, 1000, 1, 100, 0.15, 5);
     323        ga, 1000, 1, 50, 0.15, 5);
    324324      var mutator = (MultiSymbolicExpressionTreeManipulator)ga.Mutator;
    325325      mutator.Operators.OfType<FullTreeShaker>().Single().ShakingFactor = 0.1;
     
    330330        .OfType<SymbolicRegressionSingleObjectiveOverfittingAnalyzer>()
    331331        .Single(), false);
     332      ga.Analyzer.Operators.SetItemCheckedState(
     333        ga.Analyzer.Operators
     334        .OfType<SymbolicDataAnalysisAlleleFrequencyAnalyzer>()
     335        .First(), false);
    332336      #endregion
    333337      return ga;
     
    347351      ga.SetSeedRandomly.Value = false;
    348352      RunAlgorithm(ga);
    349       Assert.AreEqual(0.1385094551576456, 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"));
    351355      Assert.AreEqual(100.62175156249987, GetDoubleResult(ga, "CurrentWorstQuality"));
    352356      Assert.AreEqual(100900, GetIntResult(ga, "EvaluatedSolutions"));
     
    442446        .OfType<SymbolicClassificationSingleObjectiveOverfittingAnalyzer>()
    443447        .Single(), false);
     448      ga.Analyzer.Operators.SetItemCheckedState(
     449        ga.Analyzer.Operators
     450        .OfType<SymbolicDataAnalysisAlleleFrequencyAnalyzer>()
     451        .First(), false);
    444452      #endregion
    445453      return ga;
Note: See TracChangeset for help on using the changeset viewer.