Free cookie consent management tool by TermsFeed Policy Generator

Changeset 16335


Ignore:
Timestamp:
11/30/18 14:12:11 (6 years ago)
Author:
gkronber
Message:

#2929 changed criterion for updating the solution to testScore < bestTestScore

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2929_PrioritizedGrammarEnumeration/HeuristicLab.Algorithms.DataAnalysis.PGE/3.3/PGE.cs

    r16316 r16335  
    290290      Results.Add(new Result("Lengths", lengthsTable));
    291291
     292
    292293      var bestSolutionResult = new Result("Best solution", typeof(IRegressionSolution));
    293294      Results.Add(bestSolutionResult);
     
    356357        ProblemTypeString: cProblemTypeString, numProcs: numProc);
    357358
     359      var bestTestScore = int.MaxValue;
    358360      for (int iter = 1; iter <= MaxIterations; iter++) {
    359361        iterationsResult.Value = iter;
     
    378380          log.LogMessage("Push/Pop (" + iResult + ", " + bestlen1 + ", " + bestlen2 + ", " + testScore + ", noBestPush: " + (nobestpush > 0) + ", bestNewMin: " + (bestNewMinError > 0) + ") " + eqnStr + " coeff: " + string.Join(" ", coeff));
    379381
    380           if (bestNewMinError > 0) {
     382          if (testScore < bestTestScore) {
    381383            // update best quality
     384            bestTestScore = testScore;
    382385            bestTestScoreResult.Value = testScore;
    383386            var sol = CreateSolution(problemData, eqnStr, coeff, problemData.AllowedInputVariables.ToArray());
Note: See TracChangeset for help on using the changeset viewer.