Changeset 10578


Ignore:
Timestamp:
03/12/14 15:09:17 (5 years ago)
Author:
mkommend
Message:

#2166: Adapted GP data analysis test to include the verification of the validation solution.

File:
1 edited

Legend:

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

    r10324 r10578  
    265265      Assert.AreEqual(0, GetDoubleResult(ga, "CurrentWorstQuality"), 1E-8);
    266266      Assert.AreEqual(50950, GetIntResult(ga, "EvaluatedSolutions"));
     267      var bestTrainingSolution = (IRegressionSolution)ga.Results["Best training solution"].Value;
     268      Assert.AreEqual(0.85504801557844745, bestTrainingSolution.TrainingRSquared, 1E-8);
     269      Assert.AreEqual(0.86259381948647817, bestTrainingSolution.TestRSquared, 1E-8);
     270      var bestValidationSolution = (IRegressionSolution)ga.Results["Best validation solution"].Value;
     271      Assert.AreEqual(0.84854338315539746, bestValidationSolution.TrainingRSquared, 1E-8);
     272      Assert.AreEqual(0.8662813452656678, bestValidationSolution.TestRSquared, 1E-8);
    267273    }
    268274
     
    377383      Assert.AreEqual(0.80875, bestTrainingSolution.TrainingAccuracy, 1E-8);
    378384      Assert.AreEqual(0.795031055900621, bestTrainingSolution.TestAccuracy, 1E-8);
     385      var bestValidationSolution = (IClassificationSolution)ga.Results["Best validation solution"].Value;
     386      Assert.AreEqual(0.81375, bestValidationSolution.TrainingAccuracy, 1E-8);
     387      Assert.AreEqual(0.788819875776398, bestValidationSolution.TestAccuracy, 1E-8);
    379388    }
    380389
Note: See TracChangeset for help on using the changeset viewer.